locked
get-help failure RRS feed

  • Question

  • Hi,

    Sorry I am still fairly new to powershell so I am sure it is something i am doing wrong.  I wanted to have a look at the methods available to me within the exchange online set.

    So i logged into exchange online via:

    $UserCredential = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
    Import-PSSession $Session
    

    That works fine.  Then I tried to look at the get- methods:

    get-help get-*

    and I get this result

    Name                              Category  Module                    Synopsis                                                                  
    ----                              --------  ------                    --------                                                                  
    Get-Verb                          Function                            Gets approved Windows PowerShell verbs.                                   
    Get-IseSnippet                    Function  ISE                                                                                                 
    Get-FileHash                      Function  Microsoft.PowerShell.U... Computes the hash value for a file by using a specified hash algorithm.   
    get-help : Exception calling "Invoke" with "0" argument(s): "Cannot find path '' because it does not exist."
    At line:1 char:1
    + get-help get-*
    + ~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-Help], MethodInvocationException
        + FullyQualifiedErrorId : CmdletInvocationException

    any help would be appreciated.

    Wednesday, June 20, 2018 11:55 PM

Answers

All replies

  • Be prepared for a long list:

    PS D:\scripts> Import-PSSession $Session
    WARNING: The names of some imported commands from the module 'tmp_1t2xsyol.cfj' include unapproved verbs that might make them less discoverable. To find
    the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.
    
    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Script     1.0        tmp_1t2xsyol.cfj                    {Add-AvailabilityAddressSpace, Add-DistributionGroupMember, Add-MailboxFolderPermission, Add...
    
    
    PS D:\scripts> Get-Command -Module tmp_1t2xsyol.cfj
    
    CommandType     Name                                               Version    Source
    -----------     ----                                               -------    ------
    Function        Add-AvailabilityAddressSpace                       1.0        tmp_1t2xsyol.cfj
    Function        Add-DistributionGroupMember                        1.0        tmp_1t2xsyol.cfj
    Function        Add-MailboxFolderPermission                        1.0        tmp_1t2xsyol.cfj
    Function        Add-MailboxLocation                                1.0        tmp_1t2xsyol.cfj
    Function        Add-MailboxPermission                              1.0        tmp_1t2xsyol.cfj
    Function        Add-ManagementRoleEntry                            1.0        tmp_1t2xsyol.cfj
    Function        Add-PublicFolderClientPermission                   1.0        tmp_1t2xsyol.cfj
    Function        Add-RecipientPermission                            1.0        tmp_1t2xsyol.cfj
    Function        Add-RoleGroupMember                                1.0        tmp_1t2xsyol.cfj


    \_(ツ)_/

    • Proposed as answer by I.T Delinquent Thursday, June 21, 2018 8:04 AM
    Thursday, June 21, 2018 1:37 AM
  • Firstly that is fantastic :)

    Secondly how do you then get help on one of those modules?  I just picked one at random.

    PS C:\WINDOWS\system32> get-help Test-OAuthConnectivity
    get-help : Exception calling "Invoke" with "0" argument(s): "Cannot find path '' because it does not exist."
    At line:1 char:1
    + get-help Test-OAuthConnectivity
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-Help], MethodInvocationException
        + FullyQualifiedErrorId : CmdletInvocationException
     
    
    PS C:\WINDOWS\system32> 

    Thursday, June 21, 2018 9:44 PM
  • There is no help for modules; only commands. 

    Get-Command -Module modulename | %{help $_}

    Many commands have no help.  New and experimental commands may be missing files.


    \_(ツ)_/


    • Edited by jrv Thursday, June 21, 2018 9:57 PM
    Thursday, June 21, 2018 9:56 PM
  • Test-OAuthConnectivity is only available in an Exchange session or in an O365/Exchange online session.

     

    \_(ツ)_/

    Thursday, June 21, 2018 9:59 PM
  • Test-OAuthConnectivity  does not have any help references.  When that happens just search for the command for any online documentation.

    https://docs.microsoft.com/en-us/powershell/module/exchange/organization/test-oauthconnectivity


    \_(ツ)_/

    • Marked as answer by Wayne_Singh Friday, June 22, 2018 12:02 AM
    Thursday, June 21, 2018 10:04 PM
  • Thank you jrv.  Marked as answered.
    Friday, June 22, 2018 12:02 AM