Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.

How to for installing for PowerShell

Alec Clews edited this page Feb 14, 2020 · 3 revisions

Powershell Binary lib installation information

This is the prefered approach

Follow the information at https://www.papercut.com/kb/Main/AdministeringPaperCutWithPowerShell

Pure Powershell XML-RPC library

Note: This information is draft and currently does not work because of limitations in the third party lib.

  1. Download the PSXmlRpcClient module from here https://github.com/PaperCutSoftware/PSXmlRpcClient

  2. You can then write some code like this

Import-Module .\PSXmlRpcClient\PSXmlRpcClient -Force

$appServer= $([uri]"http://localhost:9191/rpc/api/xmlrpc")

$auth="xtoken"

try {
     $r = Invoke-XmlRpcRequest -ServerUri $appServer  -MethodName  "api.getConfigValue"  -Params $($auth, "auth.webservices.auth-token")
     if ($r.faultCode -and  $r.faultstring ) {
         throw $r.faultstring
     }
}

catch { Write-Error -message $r.faultstring }

finally { Write-Host $r }