I'm running into an issue where simple commands (Get-Module, for example) are not present when remoting into an Exchange 2016 server.
The command I'm running is:
Invoke-Command -ConfigurationName Microsoft.Exchange -ConnectionUri http://SERVERNAME/powershell -Authentication Kerberos -Credential $cred -ScriptBlock { Get-Module }
The result is:
The term 'Get-Module' 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.
+ CategoryInfo : ObjectNotFound: (Get-Module:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
+ PSComputerName : SERVERNAME
Other core commands, like Get-Command, work as expected - including Exchange commands (Get-Mailbox, etc).
The only change I've made is changing PSLanguageMode within IIS for the Powershell site to be 'FullLanguage'. Reversing this change (and restarting applicable pools and sites) does not affect the result.
I don't regularly deal with Exchange or PowerShell, so any advice is appreciated.