When working with on-premises Exchange there may be a requirement to create a PowerShell script using PowerShell ISE. Even if you run ISE on
Important: Getting Exchange Cmdlets on a client machine
If you are trying to add the Exchange cmdlets to your client machine then you will need to Install the Exchange Management Tools from the Exchange installation media on your device.
Importing the Exchange Cmdlets into PowerShell ISE
The following commands allow the import of the Exchange Management Cmdlets into PowerShell ISE. They are slight different for the listed versions of Exchange.
Exchange 2007
Use the following Add-PSSnapin to bring the cmdlets into PowerShell ISE
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin;
Exchange 2010
Use the following Add-PSSnapin to bring the cmdlets into PowerShell ISE
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010;
Exchange 2013, 2016, 2019
Use the following Add-PSSnapin to bring the cmdlets into PowerShell ISE
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;
Exchange Online
If you require the Exchange Online PowerShell Modules, you will need to install the new ExchangeOnlineManagement modules from the PowerShell Gallery.
https://www.powershellgallery.com/packages/ExchangeOnlineManagement/2.0.4-Preview6
Regards
The Author – Blogabout.Cloud