Edit

Share via


Get-WsusComputer

Gets the WSUS computer object that represents the client computer.

Syntax

AllComputers (Default)

Get-WsusComputer
    [-UpdateServer <IUpdateServer>]
    [-All]
    [<CommonParameters>]

Scoped

Get-WsusComputer
    [-UpdateServer <IUpdateServer>]
    [-NameIncludes <String>]
    [-ComputerTargetGroups <StringCollection>]
    [-IncludeSubgroups]
    [-ComputerUpdateStatus <WsusUpdateInstallationState>]
    [-ExcludedInstallationStates <UpdateInstallationStates[]>]
    [-IncludedInstallationStates <UpdateInstallationStates[]>]
    [-FromLastSyncTime <DateTime>]
    [-ToLastSyncTime <DateTime>]
    [-FromLastReportedStatusTime <DateTime>]
    [-ToLastReportedStatusTime <DateTime>]
    [-IncludeDownstreamComputerTargets]
    [-RequestedTargetGroupNames <StringCollection>]
    [<CommonParameters>]

Description

The Get-WsusComputer cmdlet gets one or more Windows Server Update Services (WSUS) computers based on the specified filtering criteria such as operating system, computer name, update installation status, last reported status time, and etcetera.

If the Get-WsusServer cmdlet is run and the resulting IUpdateServer object is passed into this cmdlet, then the specified server will be used rather than the local server.

This cmdlet can be passed into the Add-WsusComputer cmdlet.

Examples

Example 1: Get all client computers

PS C:\> Get-WsusComputer -All
Computer                      IP Address                    Operating System              Last Status Report
--------                      ----------                    ----------------              ------------------
contoso                       XXXX:XXXX:XX:X:XXXX:XXX:XXXX: Windows Server 2008           6/2/2010 12:00:00 AM
                              XXXX                          Enterprise Edition (full                                                             installation)

This command gets all client computers.

Example 2: Get client computers that have names that contain a string

PS C:\> Get-WsusComputer -NameIncludes "contoso"
Computer                      IP Address                    Operating System              Last Status Report
--------                      ----------                    ----------------              ------------------
contoso                       XXXX:XXXX:XX:X:XXXX:XXX:XXXX: Windows Server 2008           6/2/2010 12:00:00 AM
                              XXXX                          Enterprise Edition (full
                                                            installation)

This command gets the client computer whose name includes contoso.

Example 3: Get client computers by specifying dates

PS C:\> Get-WsusComputer -FromLastReportedStatusTime 6/1/10 -ToLastReportedStatusTime 6/30/10
Computer                      IP Address                    Operating System              Last Status Report
--------                      ----------                    ----------------              ------------------
contoso                       XXXX:XXXX:XX:X:XXXX:XXX:XXXX: Windows Server 2008           6/2/2010 12:00:00 AM
                              XXXX                          Enterprise Edition (full
                                                            installation)

This command gets all client computers with a last reported status date and time between June 1, 2010 and June 30, 2010.

Parameters

-All

Specifies that all computers are to be returned. The information displayed includes the computer name, IP address, operating system, and last status report time.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AllComputers
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ComputerTargetGroups

Specifies the list of target group to search.

Parameter properties

Type:StringCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ComputerUpdateStatus

Specifies the computer update state as represented in the WSUS Console user interface. The acceptable values for this parameter are:

  • FailedOrNeeded
  • InstalledNotApplicableOrNoStatus
  • Failed
  • InstalledNotApplicable
  • NoStatus
  • Any

Parameter properties

Type:WsusUpdateInstallationState
Default value:None
Accepted values:NoStatus, InstalledOrNotApplicable, InstalledOrNotApplicableOrNoStatus, Failed, Needed, FailedOrNeeded, Any
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExcludedInstallationStates

Specifies the installation states to exclude. The acceptable values for this parameter are:

  • All
  • Downloaded
  • Failed
  • Installed
  • InstalledPendingReboot
  • NotApplicable
  • NotInstalled
  • Unknown

Parameter properties

Type:

UpdateInstallationStates[]

Default value:None
Accepted values:Unknown, NotApplicable, NotInstalled, Downloaded, Installed, Failed, InstalledPendingReboot, All
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FromLastReportedStatusTime

Specifies the earliest reported status time. This parameter can be used in combination with the ToLastReportedStatusTime parameter in order to create a date range to use in the search.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FromLastSyncTime

Specifies the earliest last synchronization time for which to search. This parameter can be used in combination with the ToLastSynchTime parameter in order to create a date range to use in the search.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IncludedInstallationStates

Specifies the installation states to include. The acceptable values for this parameter are:

  • All
  • Downloaded
  • Failed
  • Installed
  • InstalledPendingReboot
  • NotApplicable
  • NotInstalled
  • Unknown

Parameter properties

Type:

UpdateInstallationStates[]

Default value:None
Accepted values:Unknown, NotApplicable, NotInstalled, Downloaded, Installed, Failed, InstalledPendingReboot, All
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IncludeDownstreamComputerTargets

Specifies that clients of a downstream server should be included, not clients of this server.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IncludeSubgroups

Specifies that the ComputerTargetGroups parameter should include descendant groups. This value has no impact if the ComputerTargetGroups parameter is not used.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NameIncludes

Specifies the partial name of the computer for which to search.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RequestedTargetGroupNames

Specifies the list of requested target group names for which to search.

Parameter properties

Type:StringCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ToLastReportedStatusTime

Specifies the latest reported status time. This parameter can be used in combination with the FromLastReportedStatusTime parameter in order to create a date range to use in the search.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ToLastSyncTime

Specifies the latest last synchronization time for which to search. This parameter can be used in combination with the FromLastSynchTime parameter in order to create a date range to use in the search.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UpdateServer

Specifies the object that contains the WSUS server. This value is obtained by calling the Get-WsusServer cmdlet and passing the resulting IUpdateServer object into this cmdlet.

Parameter properties

Type:IUpdateServer
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.UpdateServices.Administration.IUpdateServer

Outputs

Microsoft.UpdateServices.Commands.WsusComputer