Nov 23 2020 01:07 PM
Hello,
Does anyone know how to get the CsTeamsShifts cmdlets to work with Teams powershell?
I'm trying to Manage shift-based access for Firstline Workers in Teams.
I am following the document from Microsoft to install Teams Powershell and get an error each time: The term 'New-CsTeamsShiftsPolicy' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
https://docs.microsoft.com/en-us/MicrosoftTeams/teams-powershell-overview
The document states:
Skype for Business PowerShell Connector: The Skype for Business PowerShell connector is now a part of Teams PowerShell module.
Thanks,
Denise
Nov 23 2020 11:17 PM
SolutionHi @Denise Child,
The cmdlets which have Cs in the name are part of the Skype for Business Powershell connector. Therefor you first need to setup a session to the connector. Can you try the following
$sfbSession = New-CsOnlineSession
Import-PSSession $sfbSession -AllowClobber
The first command, will ask you to authenticate and the second command will import the session with all the cmdlets you need. You should now be able to use the New-CsTeamsShiftsPolicy in your PowerShell session.
Regards,
Ruud
Nov 24 2020 03:28 AM
@RuudGijsbers Thank you! That worked.
These two commands allowed me to create the new teams shifts policy.
Connect-MicrosoftTeams
$sfbSession = New-CsOnlineSession
Import-PSSession $sfbSession -AllowClobber
Nov 23 2020 11:17 PM
SolutionHi @Denise Child,
The cmdlets which have Cs in the name are part of the Skype for Business Powershell connector. Therefor you first need to setup a session to the connector. Can you try the following
$sfbSession = New-CsOnlineSession
Import-PSSession $sfbSession -AllowClobber
The first command, will ask you to authenticate and the second command will import the session with all the cmdlets you need. You should now be able to use the New-CsTeamsShiftsPolicy in your PowerShell session.
Regards,
Ruud