PSSession to Skype-Server

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
bhnuser
Posts: 48
Last visit: Tue Nov 21, 2023 10:33 pm

PSSession to Skype-Server

Post 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
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: PSSession to Skype-Server

Post 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*
User avatar
bhnuser
Posts: 48
Last visit: Tue Nov 21, 2023 10:33 pm

Re: PSSession to Skype-Server

Post 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.
This topic is 4 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked