Example Scripts
Here are some examples of using UcmPsTools in your own scripts to automate administrative tasks in Microsoft Teams
Moving users from OnPrem to O365
Script to Licence a user for Teams and Telstra calling, Enable the relevant Office365 Service Plans (apps), Clear the local attributes and move the user.
Uses functions from UcmPsTools to licence users and enable services.
[hashtable]$User = @{}
$User.UPN = "[email protected]"
#Assign Licences (UcmPsTools Cmdlets)
#Enterprise Voice
#Grant-UcmOffice365UserLicence -upn $user.upn -LicenceType 'MCOEV' -Country 'AU'
#Telstra Calling
#Grant-UcmOffice365UserLicence -upn $user.upn -LicenceType 'MCOPSTNEAU2' -Country 'AU'
#Enable O365 Apps (UcmPsTools Cmdlets)
#Skype for Business Online
#Enable-UcmO365Service -upn $user.upn -ServiceName MCOSTANDARD
#Teams
#Enable-UcmO365Service -upn $user.upn -ServiceName TEAMS1
#Telstra Calling
#Enable-UcmO365Service -upn $user.upn -ServiceName MCOPSTNEAU
#Clear Local attributes
SkypeForBusiness\Set-CsUser -Identity $user.upn -LineUri $null -EnterpriseVoiceEnabled $False
#Move the user to O365
Move-CsUser -Identity $user.upn -Target sipfed.online.lync.com -MoveToTeams -HostedMigrationOverrideUrl $url -Confirm:$false -ProxyPool SfbFe1.contoso.com -BypassAudioConferencingCheck -UseOAuth
Grant-CsTeamsUpgradePolicy -PolicyName UpgradeToTeams -Identity $user.upn
Grant-CsTenantDialPlan -Identity $user.upn -PolicyName "VICTasDialplan-Unrestricted"Remember: This is just an example, you should customize your scripts to your needs
Creating Number Forwards using Auto Attendants
Tip: New-CsFixedNumberDiversion does this with a lot more safety checks
Script to create and licence an Office365 AutoAttendant to forward a call to an external number.
Uses UcmPsTools cmdlets to check for an existing connection, and add licences.
Last updated