Folks, please forgive me if I’m using this forum all wrong. I’m getting the error in the subject when attempting to run the Get-Help command for any remotely connected sessions. So, in case I’m describing that wrong let me expand. So if I set up some credentials in $cred and say do a:
I’ve moved this to the General PowerShell Q&A board instead of the website feedback board, as it seems to fit a lot better.
I’ve not seen that issue before. If I had to guess, I’d say Get-Help was trying to search for on-disk help files and failing, though I’m not sure how to get past that.
Having said that, notes in the Get-Help definition seem to suggest that Exchange treats things in a special way (though you may not be using this version of Get-Help, etc, so I’m unsure how relevant this is).
The best thing I can suggest in the meantime is to refer to docs.microsoft.com.
I get the following error:
<p class=“p1” style=“padding-left: 40px;”>Import-Module : Failure from remote command: Import-Module -Name ‘exchange’: The term ‘Import-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.</p>
Which is very strange since we know the command “Import-Module” is definitely a valid command. The fact that the start of the message expands the ‘-Name’ parameter when the command was entered without the ‘-Name’ suggests PowerShell recognized the Cmdlet.
I think where my issue differs from yours rejikodiyil, is the fact that the PSSession to Exchange is to the O365 Exchange in the Microsoft cloud so there is no local installation of the modules. I’ll post this on the Microsoft forums and see if one of the MVPs can actually explain why the Get-Help response doesn’t seem to be able to traverse the remote connection.