Jun 18 2021 11:48 AM - edited Jun 18 2021 02:26 PM
I have been working with a script that was handed off to me. Its purpose was to automate some of our off-boarding processes on our Hybrid Exchange/Microsoft O365 server. It's worked in the past, but has been slowly breaking as time has moved on.
Currently, my biggest challenge is trying to figure out why it won't let myself and a few other admins connect to our exchange/O365 server. I have a sneaking suspicion it's related to the currently installed modules/available cmdlets. The following modules are what is currently installed on my work machine;
Version Name Repository Description
------- ---- ---------- -----------
2.0.2.135 AzureAD PSGallery Azure Active Directory V2 General Availability Module....
2.0.5 ExchangeOnlineManagement PSGallery This is a General Availability (GA) release of Exchange Online PowerShell V2 module....
1.1.183.57 MSOnline PSGallery Microsoft Azure Active Directory Module for Windows PowerShell
1.4.7 PackageManagement PSGallery PackageManagement (a.k.a. OneGet) is a new way to discover and install software packages from around the web....
2.2.5 PowerShellGet PSGallery PowerShell module with commands for discovering, installing, updating and publishing the PowerShell artifacts like Mod...
------------------------------------
I'm currently using;
-----------------------------------------------------------------------------------------------------
New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message : For more information, see the about_Remote_Troubleshooting Help topic.
At line:2 char:12
+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Conne ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : -2144108477,PSSessionOpenFailed
Import-PSSession : Cannot validate argument on parameter 'Session'. The argument is null. Provide a valid value for the argument, and then try running the command again.
At line:3 char:18
+ Import-PSSession $Session
+ ~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Import-PSSession], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.ImportPSSessionCommand
----------------------------------------------------------------
Do these cmdlets only work in the EXO v1 Module?
Any advice would be great!
Jun 19 2021 09:03 AM