Page 1 of 1

PSSession to Skype-Server

Posted: Fri Mar 22, 2019 7:17 am
by bhnuser
Hello everybody,

i got some problems with a script from the internet. It works on my Skype for Business Server 2015 but if i create a PowerShell-Session to the Server it won't work. Which script i use is Get-fBNumbers.ps1 (can found on the internet).
My Problem is now, if i import the PowerShell-Session it doesn't import all cmdlets from the server (Skype for Business Server). There are missing cmdlets like Get-CSServerVersion or Get-CsUnassignedNumber.
Does anyone has a solution?

Here is my part to connect to the Skype Server:

Code: Select all

		
		$SkypeSession = New-PSSession -Credential $Credentials -ConnectionURI "https://$SkypeForBusinessServer/OcsPowershell" -AllowRedirection #-WarningAction SilentlyContinue
		if ($?)
		{
			Import-PSSession $SkypeSession

Re: PSSession to Skype-Server

Posted: Fri Mar 22, 2019 8:34 am
by jvierra
Those commands are not available for skype online.

The following will show you all available remote commands.

Code: Select all

$SkypeSession = New-PSSession -Credential $Credentials -ConnectionURI "https://$SkypeForBusinessServer/OcsPowershell" -AllowRedirection
Import-PSSession $SkypeSession

Get-Command Get-CS*

Re: PSSession to Skype-Server

Posted: Wed Apr 10, 2019 11:38 pm
by bhnuser
I'm aware of how I can see the cmdlets. The problem was that on the Skype server the cmdlets are displayed to me but not in a PowerShell session on my local machine.
Now I have solved the problem. It was a mistake in the permission. I missed a higher privilege group to pull all the commands in the PowerShellSession.