I'm semi-new to PowerShell, so please excuse if I mix up some terminology. I need to manage M365-Groups via PS. I've inherited a productive machine which had a very old ExchangeOnlineModule installed (v. 0.4578.0). This version did allowed me to read the M365-Group members via get-unifiedGroupLinks -identity "zzz.test" -LinkType Members
, but not to add members.
Next installed the latest productive version of the ExchangeOnlineMangement module according to MS' manual. The command
Get-InstalledModule
shows me version 2.0.5. The command
Get-Module -ListAvailable
shows both old an new version, installed in "Directory: C:\Program Files\WindowsPowerShell\Modules"
When I now try to run the following Add-command, I receive the error below:
Add-UnifiedGroupLinks -Identity "zzz.test" -LinkType Members -Links "mytestuser@mydomain.com"
Add-UnifiedGroupLinks : The term 'Add-UnifiedGroupLinks' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:1
+ Add-UnifiedGroupLinks -Identity "zzz.test" -LinkType Members -Link ...
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Add-UnifiedGroupLinks:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Same after I "manually" import that specific module version with "Import-Module".
Can anyone help me understand why this command works on my test machine, but is simply not recognized on this one? I already restarted that productive machine after the installation.
Thank you in advance & best regards
MK