SOLVED

Get-UnifiedGroupLinks is not recognized as a cmdlet

%3CLINGO-SUB%20id%3D%22lingo-sub-1882400%22%20slang%3D%22en-US%22%3EGet-UnifiedGroupLinks%20is%20not%20recognized%20as%20a%20cmdlet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1882400%22%20slang%3D%22en-US%22%3E%3CP%3EI%20built%20a%20script%20a%20few%20months%20ago%20that%20connects%20to%20Exchange%20Online%20(connect-exchangeonline)%20then%20looks%20up%20an%20O365%20Group%20(Get-UnifiedGroupLinks).%26nbsp%3B%20This%20script%20ran%20without%20modifications%20several%20times%20since%20creation.%26nbsp%3B%20As%20of%20the%20past%20week%20or%20so%2C%20I%20get%20this%20when%20I%20run%20Get-UnifiedGroupLinks%3A%3C%2FP%3E%3CP%3EGet-UnifiedGroupLinks%20%3A%20The%20term%20'Get-UnifiedGroupLinks'%20is%20not%20recognized%20as%20the%20name%20of%20a%20cmdlet%2C%20function%2C%20script%3CBR%20%2F%3Efile%2C%20or%20operable%20program.%20Check%20the%20spelling%20of%20the%20name%2C%20or%20if%20a%20path%20was%20included%2C%20verify%20that%20the%20path%20is%20correct%3CBR%20%2F%3Eand%20try%20again.%3CBR%20%2F%3EAt%20line%3A1%20char%3A1%3CBR%20%2F%3E%2B%20Get-UnifiedGroupLinks%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%2B%20CategoryInfo%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3A%20ObjectNotFound%3A%20(Get-UnifiedGroupLinks%3AString)%20%5B%5D%2C%20CommandNotFoundException%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%2B%20FullyQualifiedErrorId%20%3A%20CommandNotFoundException%3C%2FP%3E%3CP%3EI%20no%20longer%20see%26nbsp%3BGet-UnifiedGroupLinks%20as%20a%20cmdlet%20in%20the%20ExchangeOnlineManagement%20module%20even%20though%20MS'%20documentation%20states%20it%20should%20be%20there%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fexchange%2Fget-unifiedgrouplinks%3Fview%3Dexchange-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fexchange%2Fget-unifiedgrouplinks%3Fview%3Dexchange-ps%3C%2FA%3E).%26nbsp%3B%20I%20even%20ran%26nbsp%3Bupdate-module%20exchangeonlinemanagement%20to%20make%20sure.%26nbsp%3B%20Has%20anybody%20else%20run%20in%20to%20this%20issue%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1882400%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1883549%22%20slang%3D%22en-US%22%3ERe%3A%20Get-UnifiedGroupLinks%20is%20not%20recognized%20as%20a%20cmdlet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1883549%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20cmdlet%20is%20not%20directly%20part%20of%20the%20module%2C%20it's%20one%20of%20the%20many%20cmdlets%20downloaded%20once%20a%20remote%20PowerShell%20session%20is%20created.%20I%20can%20assure%20you%20that%20it's%20still%20available%20when%20connecting%20to%20Exchange%20Online%2C%20and%20would%20suggest%20that%20you%20check%20your%20session%20validity%20and%2For%20permissions.%20At%20the%20very%20least%2C%20you%20need%20to%20have%20the%20%22View-Only%20Recipients%22%20role%20assigned%20in%20order%20to%20run%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I built a script a few months ago that connects to Exchange Online (connect-exchangeonline) then looks up an O365 Group (Get-UnifiedGroupLinks).  This script ran without modifications several times since creation.  As of the past week or so, I get this when I run Get-UnifiedGroupLinks:

Get-UnifiedGroupLinks : The term 'Get-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
+ Get-UnifiedGroupLinks
+ ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-UnifiedGroupLinks:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I no longer see Get-UnifiedGroupLinks as a cmdlet in the ExchangeOnlineManagement module even though MS' documentation states it should be there (https://docs.microsoft.com/en-us/powershell/module/exchange/get-unifiedgrouplinks?view=exchange-ps).  I even ran update-module exchangeonlinemanagement to make sure.  Has anybody else run in to this issue?

1 Reply
best response confirmed by thekurteichler (Occasional Contributor)
Solution

The cmdlet is not directly part of the module, it's one of the many cmdlets downloaded once a remote PowerShell session is created. I can assure you that it's still available when connecting to Exchange Online, and would suggest that you check your session validity and/or permissions. At the very least, you need to have the "View-Only Recipients" role assigned in order to run it.