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)
Top Articles
Overtime Megan Leaks: Controversial Revelations | WeaverMag
Overtime Megan drops her first clothing collab - Just Women's Sports
Instructional Resources
Botw Royal Guard
Cash4Life Maryland Winning Numbers
Wizard Build Season 28
The Daily News Leader from Staunton, Virginia
Black Gelato Strain Allbud
St Als Elm Clinic
Otis Department Of Corrections
Craigslist Phoenix Cars By Owner Only
Devourer Of Gods Resprite
83600 Block Of 11Th Street East Palmdale Ca
123 Movies Babylon
Iron Drop Cafe
Select Truck Greensboro
Myql Loan Login
ExploreLearning on LinkedIn: This month's featured product is our ExploreLearning Gizmos Pen Pack, the…
ocala cars & trucks - by owner - craigslist
The Banshees Of Inisherin Showtimes Near Regal Thornton Place
Stihl Km 131 R Parts Diagram
Wilmot Science Training Program for Deaf High School Students Expands Across the U.S.
Eva Mastromatteo Erie Pa
Tvtv.us Duluth Mn
DBZ Dokkan Battle Full-Power Tier List [All Cards Ranked]
Yakimacraigslist
Pretend Newlyweds Nikubou Maranoshin
Where to Find Scavs in Customs in Escape from Tarkov
Joann Ally Employee Portal
Military life insurance and survivor benefits | USAGov
Urban Dictionary Fov
FAQ's - KidCheck
Watson 853 White Oval
Encore Atlanta Cheer Competition
The Monitor Recent Obituaries: All Of The Monitor's Recent Obituaries
Greater Orangeburg
Abga Gestation Calculator
Swgoh Boba Fett Counter
47 Orchid Varieties: Different Types of Orchids (With Pictures)
Baldur's Gate 3 Dislocated Shoulder
Kokomo Mugshots Busted
Ma Scratch Tickets Codes
Sc Pick 4 Evening Archives
Aurora Il Back Pages
Birmingham City Schools Clever Login
Autum Catholic Store
Shipping Container Storage Containers 40'HCs - general for sale - by dealer - craigslist
Az Unblocked Games: Complete with ease | airSlate SignNow
Gli italiani buttano sempre più cibo, quasi 7 etti a settimana (a testa)
3500 Orchard Place
All Buttons In Blox Fruits
1Tamilmv.kids
Latest Posts
Article information

Author: Otha Schamberger

Last Updated:

Views: 5495

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Otha Schamberger

Birthday: 1999-08-15

Address: Suite 490 606 Hammes Ferry, Carterhaven, IL 62290

Phone: +8557035444877

Job: Forward IT Agent

Hobby: Fishing, Flying, Jewelry making, Digital arts, Sand art, Parkour, tabletop games

Introduction: My name is Otha Schamberger, I am a vast, good, healthy, cheerful, energetic, gorgeous, magnificent person who loves writing and wants to share my knowledge and understanding with you.