scripts

PowerShell

How to Use the PowerShell Exit Keyword to Terminate Scripts

PowerShell’s built-in exit keyword allows you to terminate scripts without closing your PowerShell session. There are different ways to use PowerShell exit to break the execution of a script, function, loop, or switch statement. But it’s important to understand how the exit keyword works if you want to use it effectively. In this guide, I...

Last Update: Jul 31, 2023

LATEST

Everything You Need to Know About Azure Infrastructure — June 2018

We’re entering the laid-back days of Summer. There isn’t much Azure IaaS news, but we’re after quality, not quantity.  June was a good news month for those of us using Microsoft Azure.

View Article

Why the Last Login Date Reported by the Get-MailboxStatistics Cmdlet is so Wrong

The venerable Exchange Get-MailboxStatistics has been around for over ten years, but now it’s telling lies about Office 365 users. Well, just the last login date to their mailbox. The problem is that the world is a very different place to when Microsoft first introduced PowerShell in Exchange 2007. Mailboxes didn’t get so many visits from mailbox assistants then…

View Article

Version 2 of the Azure Active Directory PowerShell Module is Generally Available – But be Careful

Managing Azure Active Directory using PowerShell is a pretty common technique for Office 365 administrators to master. Many scripts to automate administrative processes have been written to leverage the -Msol* cmdlets included in version one of the Azure Active Directory PowerShell module. Version 2 of the module is now generally available, which is good, but be careful because scripts need to be updated before you can use the new module.

View Article