Since Microsoft open-sourced PowerShell in 2016, running it on Linux has become not only easier but a core part of the PowerShell roadmap. With PowerShell 7 in development, the stated goal is to make PowerShell accessible from not only Windows but Mac and Linux.
PowerShell on its own is a robust and versatile language that can help you accomplish any task at hand. Combine it with the ability to run remotely on other computers and it becomes unparalleled as a scripting language
Office 365 applications now create many guest accounts in Azure Active Directory. You can see what accounts exist, but it’s more difficult to discover who created the accounts – or why they were created. Fortunately, the Office 365 audit log holds a lot of useful data that can be interrogated to find some answers and PowerShell is a great tool for slicing and dicing audit data. See what you think of the answers I’ve come up with.
Although Teams has a PowerShell module, its cmdlets can’t get at some of the interesting information for team objects. But the Graph API reveals that information. Combining the Graph with PowerShell makes it possible to retrieve the information with just a little effort. A working example helps make the point, so here’s a script to report the Teams channels with email addresses.
Microsoft has updated the vererable Get-MailboxStatistics cmdlet in Exchange Online PowerShell to return a bunch of new mailbox activity properties. The properties cover different activities like email and calendar, but the problem with the LastLogon property remains and you still need to do some extra work to get accurate last login information for a user.
In February, I published a script to report the activity in Office 365 Groups and Teams. It is natural that some of those groups will be obsolete, so here’s another script to email the owners of those groups. I know the script works because I tested it against 200 groups, but it’s rough and ready and deserves some TLC from people who really know PowerShell.
You can add photos to Azure Active Directory guest accounts and have Office 365 apps display those photos. But it’s a lot of work to track down suitable photos for individual guests. If you want to change the default two-initial icon displayed by Office 365, you can use PowerShell to update all guest accounts with a photo. Here’s how I handled the problem.
PowerShell is a great way of automating common administrative Office 365 operations. That is, if you know what module to use and how to use the cmdlets in that module. Unfortunately things are a bit of a mess with too many modules and inconsistent behavior in areas like error handling. With so many development groups working on Office 365, the PowerShell situation might be inevitable, but it needs cleaning up.
PowerShell 7 (PS7) is based on .NET Core 3.0 and Microsoft is aiming to provide much greater compatibility with Windows PowerShell modules, as much as 90 percent.
You can now use Powershell with Azure Functions 2.0. This article provides a quick example using Visual Studio Code and the Azure Functions extension, which makes authoring and deployment easy.