proxb / PoshWSUS

PowerShell module to manage Windows Server Update Services (WSUS)
MIT License
231 stars 64 forks source link

Get-Help functions error out #13

Open rhavenn opened 8 years ago

rhavenn commented 8 years ago

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.

INGY23 commented 8 years ago

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

mezinster commented 7 years ago

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"