PoshWSUS icon indicating copy to clipboard operation
PoshWSUS copied to clipboard

Get-Help functions error out

Open rhavenn opened this issue 8 years ago • 2 comments

Installed the latest version of the module, 2.3.1.2, from PowerShell Gallery.

Imported the module and trying to use the Get-Help commands throws and error.

Get-Help PoshWSUS shows:

Name                              Category  Module                    Synopsis
----                              --------  ------                    --------
Get-PoshWSUSSyncUpdateCategories  Function  PoshWSUS                  Displays update product categories that you will sync from Windows Server Update Services (WSUS).
Get-PoshWSUSSyncUpdateClassifi... Function  PoshWSUS                  The Get-PoshWSUSSyncUpdateClassifications cmdlet gets the list of Windows Server Update Services (WSUS) classificati...
Set-PoshWsusClassification        Function  PoshWSUS                  Sets whether the classifications of updates that Windows Server Update Services (WSUS)...
Get-Help : Unable to find type [Microsoft.UpdateServices.Internal.BaseApi.UpdateCategory].
At line:1 char:1
+ Get-Help PoshWSUS
+ ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Updat....UpdateCategory:TypeName) [Get-Help], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.GetHelpCommand

while

Get-Help Get-PSWSUSClient shows:

get-help : Unable to find type [Microsoft.UpdateServices.Internal.BaseApi.ComputerTargetGroup].
At line:1 char:1
+ get-help Get-PSWSUSClient
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Updat...uterTargetGroup:TypeName) [Get-Help], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.GetHelpCommand

Get-Help works for other 3rd party modules I have installed.

rhavenn avatar May 03 '16 23:05 rhavenn

Hi Rhavenn,

If you make a connection to your wsus first it will load the required assembly then you will be able to use get-help and also tab complete the commands.

The command to connect is Connect-PSWSUSServer

Thanks Ryan

INGY23 avatar May 19 '16 00:05 INGY23

The command to connect is Connect-PSWSUSServer

@INGY23 Is it a right behavior of a Powershell Module to break get-command and get-help upon loading (but not yet connecting to WSUS SRV)? Seems to me - it's kind of a "politically incorrect"

mezinster avatar Jul 10 '17 11:07 mezinster