Get-Help while in a pssession

This topic contains 9 replies, has 2 voices, and was last updated by  Don Jones 3 years, 2 months ago.

  • Author
  • #24541

    Jeff Hayes

    Hello all,

    I use the ISE and whenever I'm connected via the pssession and It appears that when I run get-help new-mailboxsearch -full I don't get any results.

    I'm assuming this is a New-PSSessionOption I need to configure or change as my guess is it's trying to pull the help from the CAS server and not my local machine.

    Is there anything I can change to allow for local searching while in ISE and connected to the Session.


  • #24542

    Don Jones

    Probably not accurate assumptions.

    Can you run [b]Get-Help Get-Help[/b]? In other words, does help work at all in the remote session?

    [i]In[/i] a remote session, it's definitely attempting to access help on the remote machine, not your local machine. The remote endpoint may have disabled the Get-Help command, though.

  • #24604

    Jeff Hayes

    So correction it's when I add -Full it show's only this.




    This cmdlet supports the common parameters: Verbose, Debug,
    ErrorAction, ErrorVariable, WarningAction, WarningVariable,
    OutBuffer and OutVariable. For more information, see
    about_CommonParameters (




    The same thing occurs when I use the -examples tag.

  • #24605

    Don Jones

    That's just auto-generated boilerplate. It means there's no local help file on the remote machine.

  • #24653

    Jeff Hayes

    So could I setup a New-PSSessionConfigurationFile on my local machine to tell it to look for the Help files on my local machine?

    Also wanting to say Thanks for both this website, as well as all the training you have provided.

  • #24655

    Don Jones

    Uh... wait, what's the actual goal here?

    I'm not at all sure how setting up a session configuration file (which is just a file) helps anything. What is it you want to happen?

  • #24670

    Jeff Hayes

    Well the goals itself was to run Help search-mailbox -full or New-mailboxsearch -full and get a better understanding of the -SearchQuery values and what values I can give them.

    I found this article which is a bit confusing.

    As I wanted to see an example of the search with multiple OR values or AND or NOT.

  • #24673

    Don Jones


    So, a couple of things.

    (1) You can only get help for a cmdlet if the cmdlet is installed on whatever computer you're asking for help on. If you're remote into a computer, that computer needs the command installed. PowerShell won't look on your local machine for help files if you're remoting into a machine.

    (2) Not every product installs help along with commands. You may need to run Update-Help on whatever computer contains the commands.

    (3) If a command is installed, but not the help, you'll still get an automatically-constructed help file, but it won't include examples, or detailed descriptions.

    Your original thread was "why doesn't the help work," which is what I was trying to answer. However, reading (which is the same as the help for the command would be), the -SearchQuery parameter indeed seems to accept multiple OR values; see Example 4. indicates that -SearchQuery accepts a KQL query; provides a KQL reference.

    I tend to find the web-based help more accessible and more up-to-date, and often use that in preference to the local help. It's also a bit easier for me to float it around in a separate window, resize the text, quickly jump to cross-references, that kind of thing.

  • #24841

    Jeff Hayes

    Thank you Don!

    I do use the web-based help but was hoping the -Full help for Search-Mailbox or New-Mailboxsearch would have more information on the -SearchQuery value including some examples with AND OR NOT statements, or SearchQuery 'Subject:Value' 'Body:Value' but I'll test around with it and see if it works. If not I'll open a new question.

  • #24842

    Don Jones

    The online help should be the same, or more extensive, than the in-product help; they're both produced by the same publishing process. Good luck!

You must be logged in to reply to this topic.