---
title: "Windows PowerShell"
canonical: "https://docs.cuesystem.com/space/M3SG/211288092/Windows%20PowerShell"
format: markdown
---
Windows PowerShell allows you to set options that are not available through the Web interface.

More about PowerShell: [Manage Microsoft 365 with PowerShell](https://docs.microsoft.com/en-us/microsoft-365/enterprise/manage-microsoft-365-with-microsoft-365-powershell?view=o365-worldwide) 

In the default Microsoft 365 settings, some account properties are set rather inconveniently. It can happen that, for example:

- You schedule a meeting from Outlook and reserve a room, but in the room calendar, the subject of the meeting will be replaced with your name.
- Another troublesome feature is that when you cancel a meeting, it will stay in the room calendar, only renamed to "Cancelled". It means that the room still appears occupied, and it is not possible to use it for other meetings. It may happen that you call a meeting labeled as private, but this specification is only indicated in your personal calendar, while in the room calendar, it is shown as public.

You can change this behavior but not through the administrator web interface. The following method is suited for computers with Windows 10 and PowerShell ver. 5.

> ℹ️ To create and change settings of accounts, you need admin access to Microsoft 365 setup as well as admin rights to your computer.

To provide options settings, follow these steps:

## Run Windows PowerShell

On your computer, **run Windows Power Shell** as administrator. Either click on "Start" by the right mouse button and select the relevant item in the context menu, or find "Windows Power Shell" using Windows search, click the right mouse button above the found item and select "Run as administrator". A terminal window will open in which you can enter the respective commands.

> ⚠️ **Use PowerShell version 7**. Details of the upgrade are described here: [Migrating from Windows PowerShell 5.1 to PowerShell 7](https://learn.microsoft.com/en-us/powershell/scripting/whats-new/migrating-from-windows-powershell-51-to-powershell-7?view=powershell-7.3)

## Install packages for Microsoft 365

If it is your **first time editing** accounts on the given computer, you must start by installing packages for working with Microsoft 365. You can do this by the following commands:

- `Install-Module ExchangeOnlineManagement`

During the installation of the packages, each step has to be confirmed. If you have installed the packages before, you can skip the installation step.

> ℹ️ **Microsoft no longer supports ExchangeOnlineManagement module older than version 3. Therefore, the module must be upgraded to version 3** using this command:
> ℹ️ 
> ℹ️ - `Update-Module ExchangeOnlineManagement`
> ℹ️ 
> ℹ️ For a list of installed modules and their versions, use the following command:
> ℹ️ 
> ℹ️ - `Get-InstalledModule`

> ⚠️ If you have trouble executing the commands described below, try elevating your PowerShell permissions using the following command:
> ⚠️ 
> ⚠️ - `Set-ExecutionPolicy unrestricted -Force`

## Sign in

Now you have to sign in as administrator to the Microsoft 365 server. Enter the following command. Replace the expression <ADMINUPN> with the administrator UPN (User Principal Name), e.g. "admin@contoso.com":

- `Connect-ExchangeOnline -UserPrincipalName <ADMINUPN> -ShowBanner:$true`
- `Example: Connect-ExchangeOnline -UserPrincipalName admin@contoso.com -ShowBanner:$true`

Now a pop-up window will appear for you to log in to the administrator account, so enter the password of your Microsoft 365 administrator account. If you are using SSO (Single Sign-On), the pop-up may not appear and the login can be done automatically.

> Macro (children)

## Finish

After you have made all the necessary settings, exit PowerShell with the following command:

- `exit`