Devices are unable to install scripts by default. Run PowerShell as Administrator and run the following commands:
• Set-ExecutionPolicy Unrestricted
If you only want to run PowerShell commands that are signed by a trusted publisher. Then perform the below:
• Set-ExecutionPolicy RemoteSigned
Then type ‘A’ to select ‘Yes to All’

Run PowerShell as Admin and then run the below: (This is needed to install Exchange Online PowerShell)
• Install-Module PowershellGet -Force
Then run the below:
• Install-Module -Name ExchangeOnlineManagement
You can then run the below command to sign into Exchange:
• Connect-ExchangeOnline
You may find that you will need access to Microsoft Teams. You can install this module through:
• Install-Module -Name MicrosoftTeams