Back in 2015 I developed a PowerShell script Start-RobustCloudCommand.ps1 to help Exchange Admins that were moving to Exchange Online and were used to running commands against large numbers of users at once. The script has been a success with lots of positive feedback from customers who have used it to successfully run expensive operations against very large user sets.
Today I am happy to announce that Start-RobustCloudCommand is moving from a PS script to a PowerShell module. The new RobustCloudCommand module will be easier to install and use. It also includes support for accounts that are MFA enabled.
The current implementation using ADAL v3 leverages the ADAL Dlls from the AzureAD module to call the proper .Net command to get an access token for the user and EXO PowerShell connections. After the initial token is gathered when Start-RobustCloudCommand rebuilds the correct at 15-minute interval it will use the Refresh Token to pull a new Access Token. Then ensures that the it can continue running without needing to further prompt the user for the MFA response.
Since the connection code involved here might be useful to other people writing scripts I broke it out into a separate PowerShell module CloudConnect. That module is also on GitHub and I intend to expand it further to offer support for connecting to other O365 PowerShell Endpoints in an enhanced manner.
Please feel free to provide feedback on any problems that are encountered or if there is a feature that you would love to see added to either of these modules going forward.
Matthew Byrd
Escalation Engineer, Microsoft Exchange Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.