Search-Mailbox” Command in Powershell: The Term “Search-Mailbox” Is Not Recognized as the Name of a cmdlet

 

Solution:
This error will be generated if the snap-in has not been registered. To register the snap-in use the following command:
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010