Managing Microsoft Licenses in PowerShell and Microsoft Graph

Most of the time, I manage the licensing part of Microsoft 365 manually, but from time to time, using PowerShell can be easy and clean. To view account license and service details First, connect to Microsoft Graph. Connect-Graph To list all license plans you purchased with part number and ID, Get-MgSubscribedSku | Select-Object SkuPartNumber, SkuID To list the services that […]

Audit Email Deletion in Microsoft 365

If you use a shared mailbox and sometimes wonder who deleted some of the emails from the inbox, you can search the audit log to find out. Before you go any further, check if you have turned on the Audit Log Search in your tenant first. Get-AdminAuditLogConfig | Format-List UnifiedAuditLogIngestionEnabled If you haven’t, do this to turn it on. Set-AdminAuditLogConfig […]

Self-Signing Certificate to Enable HTTPS on IIS

For internal-use IIS-based sites, you can enable HTTPS by self-signing a certificate and distributing it through the Group Policy so you can avoid seeing warning messages like this. Self-Signing a Certificate Simply open an elevated PowerShell window and run the following command to self-sign a 5-year certificate to the certificate store on the local machine. New-SelfSignedCertificate -DnsName “servername” -CertStoreLocation cert:\LocalMachine\My […]