About UcmPSTools

UcmPSTools is a collection of PowerShell functions to ease the administration of Microsoft Teams Unified Communications features and its related services. If you're a Teams Voice engineer or transitioning from Skype for Business to Teams, you should find many of these functions useful.

This initially started out as a scratch pad for my commonly used UC-related functions. I took it as an opportunity to centralize much of the code I use in my daily work. Instead of just building things bespoke for me, I decided to clean all the functions up, heavily document them and release them on the PowerShell Gallery for you all to enjoy.

What can I actually use UcmPsTools for?

UcmPsTools isn't just the cmdlets you see here. It's also a framework for the future to allow expansion, cmdlets written in the future are designed to work together and will have the same reporting structures as today, so you can be confident that when a new feature lands, it will be simple to integrate into your existing automation. In fact, the current TeamsNumbers.com beta makes extensive use of UcmPsTools!

UcmPsTools Reporting Output

Most of the functions in this module will return an PSCustomObjectindicating the success or failure of each function and some descriptive text along with it. Detailed descriptions of the output of each function can be found in each function's documentation or in the included comment-based help.

$Return.Status

$Return.Status usually returns one of four values "OK" : The operation was successful, nothing of concern "Warn" : The operation was successful, but there is something you should be mindful of (For example trying to create a user that already exists, or running low on licences to assign) More information will be found in $Return.Message "Error" : The operation was unsuccessful, Something happened when attempting to perform the operation that the function couldn't handle automatically, check $Return.Message for more information "Unknown" : Cmdlet reached the end of the function without returning anything, this shouldn't happen, if it does please log an issue on GitHub with your relevant log files.

$Return.Message

$Return.Message returns descriptive text showing the connected tenant, mainly for logging, reporting or diagnosis.

If the function you are calling is working with multiple objects, then an array will be returned with multiple objects identified by their unique attribute, such as SIP Address. (presently, no function does this, but I am planning on multiple object support for many cmdlets. See the private folder for more.)

Security Information

As this module was designed to run as part of automation, it has been designed to hold on to creds and tokens as long as it can. As such great care should be taken to ensure that the scripts are unmodified before using them. Either download this directly from my GitHub Repo https://github.com/atreidae/ucmpstools or from the PowerShell Gallery

A Note on Creds.xml

The creds.xml file may be generated by any of the New-*Connection cmdlets and allows for auto reconnection should a session drop mid-user migration This file is encrypted with a per-user encryption key provided by Windows. These files are not portable and cannot be moved from one machine to another, or from one user profile to another.

If you don't wish for UcmPsTools to attempt to store any credentials, you will need to manage connections to Microsoft 365 yourself, each function will check to see if it's connected to the relevant PowerShell session and will not prompt you for anything if its already connected

With that sorted, you should probably jump over to the cmdlet reference to see what each of the functions can do!

Cmdlet Reference

Last updated