Powershell Scripts

Please share your most commonly used Powershell Scripts here

Disable Clutter from all users

Get-Mailbox | Set-Clutter -Enable $false

Share All User Calendars with One User

Get-Mailbox | ForEach-Object {$a=$_.identity; $a+”:\calendar”} | ForEach-Object {$a; Add-MailboxFolderPermission -Identity $a -User “username” -AccessRights PublishingAuthor}

Show list of users connecting with Mobile Device

Get-MobileDevice | Select -Property DeviceType,DeviceUserAgent,Identity

Show the device ID of the mobile devices for requested user

Get-MobileDevice -mailbox %username% | Format-List Identity

Remote Wipe Device

Clear-MobileDevice –Identity DEVICEID –NotificationEmailAddresses emailaddress@domain.com for example: Clear-MobileDevice –Identity “Bob Smith\ExchangeActiveSyncDevices\iPhone§GD4N05JLQ99VDR8NGKIN4VAI0C” –NotificationEmailAddresses emailaddress@domain.com

Remove Device from list of devices

Remove-MobileDevice –Identity DEVICEID for example: Remove-MobileDevice –Identity “Bob Smith\ExchangeActiveSyncDevices\iPhone§GD4N05JLQ99VDR8NGKIN4VAI0C”