Load Exchange Management Shell in PowerShell ISE (2024)

In Exchange Server, we can load Exchange Management Shell module in Windows PowerShell ISE. This way, we can run Exchange cmdlets in PowerShell ISE just like we are used to in Exchange Management Shell. But, is there another way to connect to Exchange Server with PowerShell? This article will teach you how to load Exchange Management Shell snapin in PowerShell ISE.

Table of contents

  • Information
  • Error when running Exchange cmdlet in PowerShell ISE
  • Import Exchange Management Module in PowerShell ISE
    • Add Exchange Management snapin Exchange 2010
    • Add Exchange Management snapin Exchange 2013/2016/2019
  • Without Exchange Management Tools installed
  • Connect to Exchange Servers with remote PowerShell
    • 1. Enter the credentials
    • 2. Provide required connection settings
    • 3. Import Exchange cmdlets
  • Verify it’s working
  • Conclusion

Information

Microsoft PowerShell ISE stands for Integrated Scripting Environment. Why do we like to use Windows PowerShell ISE if it comes to running scripts or cmdlets?

  • Works more comfortable with the editor
  • Shows you the cmdlets as you type
  • Better interface (GUI)

Error when running Exchange cmdlet in PowerShell ISE

If you run an Exchange cmdlet in PowerShell ISE, you will get an error.

PS C:\> Get-MailboxGet-Mailbox : The term 'Get-Mailbox' 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.At line:1 char:1+ Get-Mailbox+ ~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-Mailbox:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

You did get this error because you don’t have Exchange Management Module imported in Windows PowerShell ISE.

Import Exchange Management Module in PowerShell ISE

We want to import the Exchange module in PowerShell ISE on the Exchange Server. We also like to do the same on another server with Exchange Management Tools installed.

To load Exchange snapin in PowerShell ISE, you can run the following cmdlets. Run Get-Mailbox cmdlet to verify that it’s working.

Add Exchange Management snapin Exchange 2010

Run PowerShell ISE as administrator. Add the Microsoft Exchange Management snapin.

PS C:\> Add-PSsnapin Microsoft.Exchange.Management.PowerShell.E2010

Add Exchange Management snapin Exchange 2013/2016/2019

PS C:\> Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapInPS C:\> Get-MailboxName Alias ServerName ProhibitSendQuota---- ----- ---------- -----------------Administrator Administrator ex01-2016 UnlimitedAli Tajran Ali.Tajran ex01-2016 UnlimitedAmanda Morgan Amanda.Morgan ex01-2016 Unlimited

We have a management server, and we want to connect to the Exchange Server with PowerShell ISE. If you open it on another server without Exchange Management Tools installed, it will not work.

PS C:\> Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.At line:1 char:1+ Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (Microsoft.Excha...werShell.SnapIn:String) [Add-PSSnapin], PSArgumentException + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

You get the error because you have to install Exchange Management Tools. After that, run the snapin cmdlet to import Exchange Management Tools.

Connect to Exchange Servers with remote PowerShell

The above Exchange snapin cmdlets will work fine. Is there another way to load the Exchange module in PowerShell? Yes, there is.

In three steps, we can create a remote PowerShell connection to Exchange Server:

  1. Enter credentials
  2. Provide required connection settings
  3. Import Exchange cmdlets

You can connect from Exchange Server itself or another server. For example, a Management Server. The good thing is that you can run this without installing Exchange Management Shell on the remote server. But, some cmdlets will not give you the correct output. For example, the Get-ExchangeCertificate cmdlet will not give you all the properties.

We do recommend to install the Exchange Management Tools on any server to administer Exchange Servers.

Run PowerShell ISE as administrator and run Get-ExecutionPolicy cmdlet to check if it’s correctly set. If it’s not set as RemoteSigned, run the second cmdlet.

PS C:\> Get-ExecutionPolicyPS C:\> Set-ExecutionPolicy RemoteSigned

1. Enter the credentials

PS C:\> $UserCredential = Get-Credential

A prompt will show. Fill in the account UPN with admin privileges.

Load Exchange Management Shell in PowerShell ISE (1)

2. Provide required connection settings

Replace EX01-2016.exoip.local to your Exchange server FQDN. The connectionUri is http and not https.

PS C:\> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://EX01-2016.exoip.local/PowerShell/ -Authentication Kerberos -Credential $UserCredential

3. Import Exchange cmdlets

Import the Exchange cmdlets in the Windows PowerShell session so you can administer Exchange.

PS C:\> Import-PSSession $Session -DisableNameChecking

If you get errors when connecting to the PowerShell virtual directory, read Recreate virtual directories in Exchange Server.

Verify it’s working

Run the Get-Mailbox cmdlet and see the results.

PS C:\> Get-MailboxName Alias ServerName ProhibitSendQuota---- ----- ---------- -----------------Administrator Administrator ex01-2016 UnlimitedAli Tajran Ali.Tajran ex01-2016 UnlimitedAmanda Morgan Amanda.Morgan ex01-2016 Unlimited

If you finished with your work, don’t forget to sign off.

PS C:\> Remove-PSSession $Session

You did connect to Exchange Server from another server or from Exchange server itself. This time with remote PowerShell. Did this load Exchange cmdlets in PowerShell ISE for you?

Keep reading: Install Exchange Online PowerShell module »

Conclusion

In this article, you learned how to load Exchange Management Shell in PowerShell ISE. The next time you connect to the Exchange Server, you can connect with remote PowerShell and not load the Exchange snapin. Both ways will work.

It’s best to Install Exchange Management Tools on any server to administer Exchange Servers. After that, import the Exchange snapin in PowerShell ISE. This way, all the Exchange cmdlets are available.

Did you enjoy this article? You may also like Install Exchange Cumulative Update. Don’t forget to follow us and share this article.

Load Exchange Management Shell in PowerShell ISE (2024)

References

Top Articles
OM System OM-1 Mark II Mirrorless Camera with 12-40mm F/2.8 Pro II Lens
Gaming Microphone Guide: Best Picks, USB Mics Under $100 & FAQs
Mw2 Other Apps Vram
Get maximum control with JCB LiveLink | JCB.com
Charli D'Amelio: Wie die junge Amerikannerin TikTok-Sensation wurde
Weather Underground Merritt Island
Spaghetti Top Webcam Strip
7076605599
Craigslist Folkston Ga
Jack Daniels Pop Tarts
Generalausschreibung - The Race Days Stuttgart
Lynchburg Arrest.org
Grand Rapids Herald-Review Obituaries
Bobibanking Retail
R/Skinwalker
Las Mejores Tiendas Online en Estados Unidos - Aerobox Argentina
Sermon Collections, Sermons, Videos, PowerPoint Templates, Backgrounds
O'reilly's El Dorado Kansas
Ds Cuts Saugus
Does Publix Have Sephora Gift Cards
Www.binghamton Craigslist.com
Nissan Rogue Tire Size
Adventhealth Employee Handbook 2022
Pa Legion Baseball
Space Coast Rottweilers
Meritain Prior Authorization List
Suttermedicalfoundation.org/Urgent Care
Duen Boobs
What to know about Canada and China's foreign interference row
Erfahrungen mit Rheumaklinik Bad Aibling, Reha-Klinik, Bayern
Locals Canna House Deals
Gracex Rayne
Low Tide In Twilight Mangabuddy
10-5 Study Guide And Intervention Tangents Answer Key
Dpsmypepsico
Mula Pelada
Indiana Immediate Care.webpay.md
Wlox Jail Docket
Melanie, Singer Who Performed at Woodstock and Topped Charts With ‘Brand New Key,’ Dies at 76
Dumb Money Showtimes Near Cinemark Century Mountain View 16
Where does the Flying Pig come from? - EDC :: Engineering Design Center
Sydney V May Of Leaked
Fedex Express Location Near Me
Calverton-Galway Local Park Photos
Kristy Althaus Kansas
Lol Shot Io Unblocked
Katie Hamden Of
Pirates Bay Knaben
New Application Instructions · Government Portal
7-11 Paystub Portal
Craigslist Pgh Furniture
Diora Thothub
Latest Posts
Article information

Author: Prof. Nancy Dach

Last Updated:

Views: 5844

Rating: 4.7 / 5 (77 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Prof. Nancy Dach

Birthday: 1993-08-23

Address: 569 Waelchi Ports, South Blainebury, LA 11589

Phone: +9958996486049

Job: Sales Manager

Hobby: Web surfing, Scuba diving, Mountaineering, Writing, Sailing, Dance, Blacksmithing

Introduction: My name is Prof. Nancy Dach, I am a lively, joyous, courageous, lovely, tender, charming, open person who loves writing and wants to share my knowledge and understanding with you.