Powershell Scripts Scripts Connect to Microsoft Intune Establish a connection to Intune using Microsoft Graph API. # Install Intune PowerShell module if not installed Install-Module -Name Microsoft.Graph.Intune -Force # Connect to Microsoft Graph...
Powershell Scripts Scripts Basic Enable Mailbox Auditing for All Users Enable auditing on all mailboxes to track user and admin actions. Use the Connect-ExchangeOnline function to use this code. Get-Mailbox -ResultSize Unlimited | Set-Mailbox -AuditEnabled...
Powershell Scripts Scripts Basic Check Mailbox Permissions for a User Check who has permissions to access a specific mailbox. Use the Connect-ExchangeOnline function to use this code. Get-MailboxPermission -Identity “user@yourdomain.com” | Select-Object...
Powershell Scripts Scripts Basic Block a User from Sending Emails Disable outbound email for a specific user. Use the Connect-ExchangeOnline function to use this code. Set-Mailbox -Identity “user@yourdomain.com” -AccountDisabled...
Powershell Scripts Scripts Basic Assign a Full Access Permission Grant another user full access to a specific mailbox. Use the Connect-ExchangeOnline function to use this code. Add-MailboxPermission -Identity “user@yourdomain.com” -User...