Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
Hi Coxy05,
It seems the error occurred at an earlier time. When running the Import-PSSession $Session parameter, you've already receive a warning message about unapproved verbs. However, you just ignored it and moved on.
Before using remote PowerShell to connect to Exchange Online on your local PC, please check whether you have met all the requirement.
1. You need to install the Microsoft.NET Framework 4.5 or later and then either the Windows Management Framework 3.0 or the Windows Management Framework 4.0. For more information, see Installing the .NET Framework and Windows Management Framework 3.0 or Windows Management Framework 4.0.
2. Windows PowerShell needs to be configured to run scripts, and by default, it isn't. You get the following error when you try to connect:
Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.
To enable Windows PowerShell to run signed scripts, run the following command in an elevated Windows PowerShell window (a Windows PowerShell window you open by selecting Run as administrator):
Set-ExecutionPolicy RemoteSigned
You need to configure this setting only once on your computer, not every time you connect.
For info, please refer to https://technet.microsoft.com/en-us/library/jj984289(v=exchg.160).aspx
If the issue persists, please share the screenshot of the PowerShell output for analysis.
Thanks,
Lance