Closed owenmurr closed 3 years ago
Any further updates on this?
So I have added a IF statement to check if the version is less than or equal to 2.0.3 or if its greater than or equal to 2.0.4.
This should resolve the issue if a user have <= 2.0.3 or if a user has >= 2.0.4.
The script runs on my machine without any issues on my machine, I have 2.0.3 and 2.0.4 installed.
The location of Microsoft.IdentityModel.Clients.ActiveDirectory.dll is looking at 2.0.3 version of ExchangeOnlineManagement. If the user doesnt have this version installed then the script will fail.
I have added in the following variable: $dllLocation = (Get-InstalledModule ExchangeOnlineManagement).InstalledLocation
And changed the import-module to: Import-Module "$($dllLocation)\netFramework\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" -force