tmuellerchen Posted April 8, 2021 #1 Share Posted April 8, 2021 Hello Swyx-Forum, I try to connect to our Swyx-Server via Remote-Powershell: enter-pssession svr-xxx I do this as admin and then I try to connect-ippbx but it fails with a lot of errors. I check the modules with get-modules and the ippbx modul is present. when I do the same direct on the swyx-server with the same user, the connection works fine. does the swyx-powershell dont work via pssession ? thanks in advance thomas Link to comment Share on other sites More sharing options...
Most Valued User Sebastian Dreier Posted April 8, 2021 Most Valued User #2 Share Posted April 8, 2021 Hello Thomas, please post the error messages here, otherwise it is hard to say why it does not work. Link to comment Share on other sites More sharing options...
tmuellerchen Posted April 8, 2021 Author #3 Share Posted April 8, 2021 It looks like this: PS C:\WINDOWS\system32> Enter-PSSession vsvr-XXX [vsvr-XXX]: PS C:\Users\admin-XXXX\Documents> Connect-IpPbx New-Object : Der Typ [LibManager] kann nicht gefunden werden. Stellen Sie sicher, dass die Assembly, die diesen Typ enthält, geladen wird. In C:\Program Files (x86)\SwyxWare Administration\Modules\IpPbx\IpPbxGeneral.ps1:100 Zeichen:38 + [LibManager]$Global:LibManager = New-Object "LibManager" + ~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand Die Variable "$Global:LibManager" kann nicht abgerufen werden, weil sie nicht festgelegt wurde. In C:\Program Files (x86)\SwyxWare Administration\Modules\IpPbx\IpPbxGeneral.ps1:103 Zeichen:5 + $Global:LibManager.BaseProtocol = "TCP" + ~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Global:LibManager:String) [], RuntimeException + FullyQualifiedErrorId : VariableIsUndefined Die Variable "$Global:LibManager" kann nicht abgerufen werden, weil sie nicht festgelegt wurde. In C:\Program Files (x86)\SwyxWare Administration\Modules\IpPbx\IpPbxGeneral.ps1:104 Zeichen:5 + $Global:LibManager.WSBaseUrl = $ServerName + ~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Global:LibManager:String) [], RuntimeException + FullyQualifiedErrorId : VariableIsUndefined Die Variable "$Global:LibManager" kann nicht abgerufen werden, weil sie nicht festgelegt wurde. In C:\Program Files (x86)\SwyxWare Administration\Modules\IpPbx\IpPbxGeneral.ps1:128 Zeichen:13 + $Global:LibManager.AuthenticationMode = [AuthenticationMo ... + ~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Global:LibManager:String) [], RuntimeException + FullyQualifiedErrorId : VariableIsUndefined Connect-IpPbx : Die Variable "$Global:LibManager" kann nicht abgerufen werden, weil sie nicht festgelegt wurde. + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Connect-IpPbx Link to comment Share on other sites More sharing options...
ITBBAG Posted August 17, 2021 #4 Share Posted August 17, 2021 I get the exact same error. You basically can't use Connect-IpPbx from a Remote Computer. Not with Invoke-Command and Also not With Enter-PSSession or New-PSSession. Without Connect-IpPbx you can't use any of the IpPbx Cmdlets. That's a pity because I would really like to include an automatised Setup of a Swyx User in my AD User Setup Script, so I would really be interested in an elegant solution. Any ideas? Edit: You have to install the IpPbx Module on your local machine (just copy the folder to C:\Program Files\WindowsPowerShell\Modules, and then you can use it like so: Connect-IpPbx -ServerName swyxserver Link to comment Share on other sites More sharing options...
Sebastian Heidrich Posted February 14 #5 Share Posted February 14 Hello, maybe a bit late but read it by accident. I myself have always worked with remote scripts. First establish the connection to the server with "New-PSSession". $psSession = New-PSSession -ComputerName "***" -Name "***" If credentials are required, simply provide them. Then transfer the commands via "Invoke-Command". Invoke-Command -Session $psSession -ScriptBlock {connect-IPPbx} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now