How to delete disconnected mailbox
2011/08/03
Leave a comment
[PS] C:\>$users = Get-MailboxStatistics -Database “DatabaseName” | where {$_.disconnectdate -ne $null}
[PS] C:\>$users | ForEach { Remove-Mailbox -Database “DatabaseName” -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }
Categories: Exchange 2010, Exchange Management Shell (EMS)
Exchange Management Shell (EMS) shortcut is missing
2011/07/26
Leave a comment
After installing SP1 or Update Rollup, Exchange Management Shell shortcut is missing.
Action:
- Verify that the ConnectFunctions.ps1, RemoteExchange.ps1, CommonConnectFunctions.ps1 files are present in the %ExchangeInstallPath%\bin folder.
If these files are missing – copy the files from Exchange Server 2010 SP1 (\setup\serverroles\common) - Right click on desktop -> New -> Shortcut.
- Type the location of the item -> %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command “. ‘%ExchangeInstallPath%\bin\RemoteExchange.ps1’; Connect-ExchangeServer -auto”
- Type a name of this shortcut -> Exchange Management Shell -> Finish.
- Right click the Exchange Management Shell shortcut -> Properties -> Shortcut tab. Remove the text from Start In field.
- Click Change Icon -> Browse and enter %SystemRoot%\Installer\{4934D1EA-BE46-48B1-8847-F1AF20E892C1}\PowerShell.exe in the File name field.
- Select icon and click OK. Click Apply and click OK.
Categories: Exchange 2010, Exchange Management Shell (EMS)
The term ‘New-MailboxExportRequest’ is not recognized
2011/07/26
3 comments
The term ‘New-MailboxExportRequest’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Action:
- Launch Exchange Management Shell
- Run “Add-pssnapin microsoft*”
- Run “Install-CannedRbacRoles”
- Run “Install-CannedRbacRoleAssignments”
- Close and re-open Exchange Management Shell
Categories: Exchange 2010, Exchange Management Shell (EMS)