PowerShell

Extract M365 Licensing GUID's and Product names from MS Website

Andres Bohren
Hi All, For a Project i wanted to Extract the M365 License and ServicePlan Guids from the Website below Product names and service plan identifiers for licensing https://docs.microsoft.com/en-us/azure/active-directory/enterprise-users/licensing-service-plan-reference The whole Script is published at my GitHub Repo https://github.com/BohrenAn/GitHub_PowerShellScripts/blob/main/AzureAD/ExtractGUIDandLicensesFromWebsite.ps1 Why not using PowerShell for that $URI = "https://docs.microsoft.com/en-us/azure/active-directory/enterprise-users/licensing-service-plan-reference" $WebRequest = Invoke-WebRequest -URI $URI $WebRequest | get-member As you can see, with PowerShell 7 the Property "ParsedHtml" is missing. It somehow has a dependency to the local installed Browser.

Azure PowerShell Module Az 7.4.0 released

Andres Bohren
Hi All, Just a few Hours ago the new Microsoft Azure PowerShell Module AZ 7.4.0 has been released. Microsoft Azure PowerShell Module Az 7.4.0 https://www.powershellgallery.com/packages/az/7.4.0 To check your installed Module and what Version is available in the PowerShell Gallery you can use the following commands Get-InstalledModule AZ Find-Module AZ AZ is just a Wrapper - the Modules have names Az.* Get-InstalledModule AZ.* I've checked my installed Modules. It's a mess - multiple Versions of the Modules.

Exchange Online Plus addressing update

Andres Bohren
Hi All, There has been an update to Plus addressing in Exchange online. Plus adressing will be enabled by default starting from 17. April 2022 If you wish to Opt-Out of Plus Adressing you will need to use this command Set-OrganizationConfig -DisablePlusAddressInRecipients $true Plus Addressing in Exchange Online https://docs.microsoft.com/en-us/exchange/recipients-in-exchange-online/plus-addressing-in-exchange-online If you want to check your current Recipients for Plus addresses you can use my Script from GitHub https://github.com/BohrenAn/GitHub_PowerShellScripts/blob/main/ExchangeOnline/CheckPlusEmailAddresses.ps1 You can review your Exchange Online Settings in your tenant with the following Command

Cleanup Microsoft.Graph PowerShell Modules

Andres Bohren
Hi All, I wanted to check the amount of Commands available in the Microsoft.Graph Powershell Modules Get-Command -Module Microsoft.Graph* | measure That seemed a bit much and it turned out, i had multiple Versions of Microsoft.Graph PowerShell Module installed. Here is a Script do remove the Old Modules and install only the newest Version. $Modules = Get-Module Microsoft.Graph* -ListAvailable | Where {$_.Name -ne "Microsoft.Graph.Authentication"} | Select-Object Name -Unique Foreach ($Module in $Modules)

ExchangeOnlineManagement v206-Preview5 (Connect-IPPSSession with CBA)

Andres Bohren
Hi All, Today the ExchangeOnlineManagement Preview 5 PowerShell Module has been released to the PowerShell Gallery. As you can see it's the first time you can use Certificate Based Authentication (CBA) to Authenticate with Connect-IPPSSession. ExchangeOnlineManagement Preview5 https://www.powershellgallery.com/packages/ExchangeOnlineManagement/2.0.6-Preview5 Installing the Module (PowerShell must be startet "As Administrator") Find-Module ExchangeOnlineManagement -AllowPrerelease Install-Module ExchangeOnlineManagement -AllowPrerelease -Force How to set up the Azure AD App i have documented here https://blog.icewolf.ch/archive/2021/04/04/exchange-online-powershell-v2-authentication-with-app-in-azuread-update.aspx Connect to Exchange Online with a Certificate stored in your CurrentUser Certificate Store

PowerShell 7.2.2 released

Andres Bohren
Hi All, Yesterday PowerShell v7.2.2 has been released PowerShell 7 Downloads https://github.com/PowerShell/powershell/releases Regards Andres Bohren

Simple Example of Sending Mail via Microsoft Graph

Andres Bohren
Hi All, I did feel to write a simple PowerShell Script to demonstrate how to Send a Mail via Microsoft Graph. You need to create an Azure AD Application with the following Permission "Application -> Mail.Send". Authentication with a SelfSigned Certificate. The whole Script is published at my GitHub Repo https://github.com/BohrenAn/GitHub_PowerShellScripts/blob/main/ExchangeOnline/GraphAPI/SimpleGraphSendMail.ps1 ############################################################################### # Limiting application permissions to specific Exchange Online mailboxes # https://docs.microsoft.com/en-us/graph/auth-limit-mailbox-access # # Limit Microsoft Graph Access to specific Exchange Mailboxes

Azure Automation: PSGallery Version Check

Andres Bohren
Hi All, I don't check daily if there are any new PowerShell modules in PSGallery. So i wrote me a Script of my most used Modules to Inform me if there are any new Modules available. With the following Code i check for the current Version of the Modules and put them into a PSCustomObject with the Attributes Release, Module, Version (for GA and Prerelease Versions). ############################################################################### # Check PSGallery Modules

Check for Microsoft Teams Update with PowerShell

Andres Bohren
Hi All, I was inspired to look a little bit deeper into the Update Mechanism of Microsoft Teams by the "Teams MSI Override" GitHub Project. You can check your Version in Teams by Settings > Info > Version Then the current Version and update Date is shown in the top bar You can invoke a update check in Settings > check for updates Then Teams will search for updates I've traced this Action in Fiddler

Check your M365 Licenses with Azure Automation V2 (with Microsoft Graph)

Andres Bohren
Hi All, Over a Year ago i did wrote a Azure Automation Script to check your M365 Licenses. Check your M365 Licenses with Azure Automation https://blog.icewolf.ch/archive/2021/04/18/check-your-m365-licenses-with-azure-automation.aspx I did rewrite that code to support Microsoft Graph for query the Licenses and also send the Mail via Microsoft Graph. Setup Environement I first created a new AzureAD Application (just to make a clear separation of Graph Permissions for the purpose of this Demo).