Scenario: You want to see the last time AD replication happened between site-to-site. Scriptlet: repadmin.exe /showrepl * /csv > c:\temp\showrepl.csv
Scenario: You wish to see how many remote mailboxes have the correct email domain configured for their remote routing address (TargetAddress). You want to perform a AD PowerShell query for speed. Scriptlet: Get-ADuser -filter {TargetAddress -like “*.mail.onmicrosoft.com”} | Select Name, TargetAddress OR you just want a count: (Get-ADuser -filter {TargetAddress -like “*.mail.onmicrosoft.com”} | Select Name, […]
Scenario: You want to use Get-ADUser to find all Exchange mailboxes in your environment. Scriptlet: Running the following will provide you with the detail: #First, lets store some results into $1 for every mailbox $1 = Get-ADUser -filter {HomeMDB -ne ‘$null’} -Properties MailNickName, HomeMDB, DisplayName| Select MailNickName, HomeMDB, DisplayName #Now its time to play with […]
Scenario: You are going to install the latest CU for Exchange, but you want to check the AD Schema levels to see if they need to be upgraded before the CU install Command Line: Using CMD line, run the following: (Everything in bold needs to be edited to reflect your Exchange organization OR your domain) […]
Create distribution list with no members. Emails sent to this DL will go into blackhole and won’t NDR. Exchange silently deletes them.
Use Netstat to select specific strings, in this case Ip address 192.168.1.5, port 993: netstat -ano | Select-String 192.168.1.5
Below are examples of checking the event viewer via PowerShell. Running local with event id and date range Get-WinEvent -FilterHashtable @{logname=’application’;id=4107;StartTime=”1/15/11″;EndTime=”1/17/11″} Running on remote computer with event ID Get-WinEvent -computername <remote computer> -FilterHashtable @{logname=’application’;id=15006}
Scenario: Import pst into a mailbox Note: Must have mailbox export/import permissions to be able to do this. targetrootfolder is good if you are importing multiple psts into the mailbox. This way content is not merged under existing folders. From Powershell, type: New-MailboxImportRequest -Mailbox newmbox -filepath \serverpstfilesnewmbox.pst-BadItemLimit 50 -T argetRootFolder “Mailbox -newmbox”