Jump to content

enter-pssession to phoneserver and connect-ippbx failed


tmuellerchen
 Share


Recommended Posts

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


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


  • 4 months later...

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


  • 1 year later...

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


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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.