0% found this document useful (0 votes)
48 views12 pages

How to Install Exchange Online PowerShell Module

Uploaded by

bulwark208
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views12 pages

How to Install Exchange Online PowerShell Module

Uploaded by

bulwark208
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

Add a Meeting Room Display to your Office with Meeting Room 365 close

How to Install Exchange Online


PowerShell Module
James Futhey
Dec 6, 2023 • 6 min read

We Use Cookies
This website uses essential cookies to ensure its
Managing email
proper operation communication
and tracking processes can be a real challenge for
cookies to understand
how you interact
medium with it. Manage
and big-sized preferences
businesses.

AlthoughAccept
Microsoft ExchangeReject
offers different management features,
streamlining and managing administrative tasks is easier by using
https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 1/12
5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

the Exchange Online


Add a Meeting Room PowerShell Module.
Display to your Office with Meeting Room 365

The Exchange Online PowerShell Module allows administrators to easily


manage Exchange Online Environments using command lines.

In this blog post, we’ll simplify the installation process so you can learn how
to install Exchange Online PowerShell module by following five quick
steps.

Benefits of Installing the Exchange Online


PowerShell Module
The Exchange Online PowerShell module allows administrators to manage
their environments more easily, efficiently, and effectively.

Although it is possible to use the Exchange Admin Center (EAC) to


manage Exchange Online, using the PowerShell module brings way more
advantages and benefits to administrators, such as the following:

1. Helps you in bulk-data retrieval scenarios and allows you to


create mailboxes in bulk just by using cmdlets on PowerShell.

2. It allows you to automate tasks that would otherwise be time-


consuming, such as the creation of new users or the deletion of
Microsoft Exchange Online objects.

3. If things don’t go as planned, the PowerShell Module can help you


We Use Cookies
with bug
This website fixes by
uses essential identifying
cookies to ensure itswhat’s wrong with a certain mailbox
proper
oroperation
account. and tracking cookies to understand
how you interact with it.

https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 2/12
5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

Add a Meeting Room Display to your Office with Meeting Room 365

What Do You Need for Connecting to Exchange


Online PowerShell?
In order to install PowerShell and connect to the Online Module, there’s a
series of requirements that must be met beforehand:

1. A Microsoft Office 365 account with valid Exchange Licenses


enabled.

2. An Exchange Administrator Role and valid credentials to access the


Office 365 account.

3. A computer running Windows 7 or later.

4. The latest PowerShell version installed (7.3.6).

How to Install Exchange Online PowerShell Module


To install the Exchange Online PowerShell module, we are going to use
PowerShell cmdlets.

The process consists of enabling execution policies to run scripts, installing


the PowerShell module, and then connecting to Exchange Online PowerShell
V3. These are the five steps we need to follow.

We Use Cookies
Step 1: Set Windows PowerShell Execution Policy
This website uses essential cookies to ensure its
We can’t
proper install
operation PowerShell
and tracking scripts by default - this is the default
cookies to understand
how you interact with it.
behavior of PowerShell.

Therefore, we need to set the execution policy that will allow us to


subsequently install Exchange Online PowerShell.
https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 3/12
5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

Add a Meeting Room Display to your Office with Meeting Room 365
Open PowerShell on your computer, and let’s sign the execution policy,
which, in theory, protects you from scripts that you don’t trust.

To set Execution Policy in PowerShell, use the following command:

“Set-ExecutionPolicy RemoteSigned”

After implementing the command line, close and relaunch this


PowerShell Window for the changes to take effect.

Now, we are going to install the PowerShellGet module on our


system.

If, by any chance, you believe that the module is already installed, you can
check it out by using the following cmdlet:

Get-InstalledModule -Name ExchangeOnlineManagement

If the module hasn’t been installed before, you will see a message that says,
“No match was found for the specified search criteria.”

In this case, move on to the following step to continue with the installation
process.
We Use Cookies
This website uses essential cookies to ensure its
Step
proper2: Set Up
operation PowerShellGet
and tracking Module
cookies to understand
how you interact with it.
Now, we are going to set up the PowerShellGet module, which is the
previous step to connecting to Exchange Online.

https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 4/12
5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

Add a Meeting Room Display to your Office with Meeting Room 365
To execute these cmdlets, it is necessary to run PowerShell as an
Administrator.

Type PowerShell on Windows search, right-click on the PowerShell icon, and


select “Run as Administrator.”

Afterward, use the following command and press enter:

Install-Module PowershellGet -Force

A message will pop up asking you for the newest NuGet Provider version.
The exact message is the following:

“​​PS C:\> Install-Module PowershellGet -Force

NuGet provider is required to continue

PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-
based repositories. The NuGet provider must be available in 'C:\Program
Files\PackageManagement\ProviderAssemblies' or

'C:\Users\administrator.EXOIP\AppData\Local\PackageManagement\ProviderAssemblies'.
You can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -
MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and import the
NuGet provider now?

[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y

We Use Cookies
You will be prompted to install NuGet Provider, so press Y and then
This website uses essential cookies to ensure its
Enter to install
proper operation the latest
and tracking cookies NuGet Provider version.
to understand
how you interact with it.

Likewise, you may be asked to install the NuGet Provider from an


untrusted repository - select “Yes” as this is entirely safe to do.

https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 5/12
5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

Add a Meeting Room Display to your Office with Meeting Room 365
After using the import module cmdlet, it’s time to get our hands into the
Exchange Online PowerShell module using the install-module cmdlet.

Step 3: Install the Exchange Online Management module


For this step, we are using the install-module cmdlet to finish the installation
of the module after all permissions have been previously granted.

Open PowerShell again, and run the following command:

Install-Module -Name ExchangeOnlineManagement

After running the command, the installation of the module will begin.

Keep in mind that the installation will take a few minutes, depending on
the speed of your Internet connection, so wait for a few minutes and move on
to the fourth step.

Step 4: Connect to Exchange Online PowerShell V3


Finally, after the module has been installed, it’s time to connect to
Exchange Online PowerShell V3.

To do this, go to the PowerShell window, and run the following command:


We Use Cookies
This website uses essential cookies
Connect-ExchangeOnline to ensure its [email protected]
-UserPrincipalName
proper operation and tracking cookies to understand
how you interact with it.

The Connect-ExchangeOnline cmdlet will prompt you to sign into your


Office account. Remember to replace [email protected] with the
https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 6/12
5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

principal
Add aname
Meetingof your
Room administrator
Display account
to your Office with before
Meeting running the
Room 365
cmdlet.

Afterward, a sign-in window will appear. Here, simply type in your


credentials in order to access your Exchange account.

If multi-factor authentication is enabled, you will need to type in the


verification code for the current user account in order to continue.

Once you have successfully logged into the Exchange Online Module, you will
receive the following message:

This V3 EXO PowerShell module contains new REST API backed Exchange Online cmdlets
which doesn't require WinRM for Client-Server

communication. You can now run these cmdlets after turning off WinRM Basic Auth in your
client machine thus making it more secure.

Unlike the EXO* prefixed cmdlets, the cmdlets in this module support full functional parity with
the RPS (V1) cmdlets.

V3 cmdlets in the downloaded module are resilient to transient failures, handling retries and
throttling errors inherently.

However, REST backed EOP and SCC cmdlets are not available yet. To use those, you will
need to enable WinRM Basic Auth.

This indicates that the connection to the Exchange Online


PowerShell module has been successful.
We Use Cookies
ItThis
also means that, as you can see, you don’t need basic authentication
website uses essential cookies to ensure its
inproper
order to manage
operation and trackingExchange Online V3, as it supports certificate-
cookies to understand
how you interact with it.
based authentication (connecting to PowerShell after basic authentication is
deprecated).

https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 7/12
5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

Add a Meeting Room Display to your Office with Meeting Room 365
Alternatively, you can also download and install the module from the
PowerShell Gallery (more info about the PowerShell Gallery here).

Step 5: Use Commands Available in the Exchange Online


Environment
You have now installed and connected to the Exchange Online PowerShell
module.

The Exchange Online Service allows you to run a series of rich cmdlets
that allow you to perform otherwise time-consuming tasks within a few
minutes or seconds.

This is a quick overview of the most important and used commands


available in the Exchange Online PowerShell module:

Command Explanation

Set-Mailbox Allows you to modify a mailbox that already exists.

Remove-Mailbox Let’s you delete a mailbox if necessary.

Get-Mailbox Retrieve mailbox information and set mailbox permissions if needed.

Get- Returns information about the number of messages in a mailbox.


Mailboxstatistics

Get-Recipient
We Use Cookies Show information about a recipient, such as recipient type and email
address.
This website uses essential cookies to ensure its
proper operation and tracking cookies to understand
New-Mailbox Create an entirely new mailbox as requested.
how you interact with it.

https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 8/12
5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

Add a Meeting Room Display to your Office with Meeting Room 365
In order to make the best out of the Exchange Online PowerShell module,
make sure to check out these three relevant tips:

1. Explain your PowerShell Script with comments before


running it to keep track of the task.

2. If you want to connect to the module faster, try disabling multi-


factor authentication to accelerate the connection process.

3. Keep the Exchange Online PowerShell Module updated - you can do


this by running the following command on PowerShell: “Update-
Module -Name "ExchangeOnlineManagement.”

How to Disconnect Remote PowerShell Session


After finishing with the Exchange Online Management module, you’ll
typically want to disconnect the session in order to use a different tenant
or free up resources.

To disconnect from your current PowerShell session, run the following


command:

Disconnect-ExchangeOnline

Running this command will remove the access token from the cache
We Use Cookies
and local uses
This website files, which
essential allows
cookies youitsto start a brand-new session the next time
to ensure
proper
you operation
connect toand
thetracking cookiesOnline
Exchange to understand
PowerShell module.
how you interact with it.

Summary: How to Install Exchange Online


PowerShell Module
https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 9/12
5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

Add a Meeting Room Display to your Office with Meeting Room 365
By installing and connecting to the Exchange Online PowerShell Module, you
can manage your Exchange Online Organization using
PowerShell’s cmdlets, which will save you a lot of time and resources.

Let’s summarize the process of installing the Exchange Online PowerShell


module in three relevant points:

1. Setting up policy permissions is crucial for running scripts on


PowerShell. Likewise, downloading the required modules is
necessary to continue the process.

2. Install the module by using the install-module cmdlet. The


module will download, which will allow you to establish an online
connection with the server when you run PowerShell.

3. Use connection-related cmdlets to establish a connection


with the Exchange Online PowerShell Module. Try to keep
MFA disabled to ensure a faster connection with the online module.

FAQ
Why Can’t I Install Exchange Online PowerShell Module?
If you are unable to install the Exchange Online PowerShell module, try to
disable multi-factor authentication on your Office account, ensure that
Weare
you Useusing
Cookiesthe right credentials, and make sure you have all the
This website uses essential
permissions cookies to
by checking ensure its policies again. Alternatively, try to
execution
proper operation and tracking cookies to understand
reinstall the module by using the install-module cmdlet mentioned above
how you interact with it.
from the beginning.

https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 10/12
5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

Add a Meeting Room Display to your Office with Meeting Room 365

Setting up a Managed Using Get-MgGroup in


Android Meeting Room Powershell: All You Need
Display with Hexnode To Know
MDM If you are looking to learn how to use the
Why do I need an MDM? MDM software PowerShell cmdlet Get-MgGroup within the…
provides an advantage when configuring an… May 16, 2024 5 min read

May 20, 2024 5 min read

We Use Cookies
This website uses essential cookies to ensure its
proper operation and tracking cookies to understand
how you interact with it.

https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 11/12
5/22/24, 2:26 PM How to Install Exchange Online PowerShell Module

Add a Meeting Room Display to your Office with Meeting Room 365

Meeting Room 365 © 2024

Sign up

Powered by Ghost

We Use Cookies
This website uses essential cookies to ensure its
proper operation and tracking cookies to understand
how you interact with it.

https://www.meetingroom365.com/blog/install-exchange-online-powershell-module/ 12/12

You might also like