< Back
Get-WsusComputer
Post
NAME Get-WsusComputer
SYNOPSIS
Gets the WSUS computer object that represents the client computer.
SYNTAX
Get-WsusComputer [-All] [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable
<System.String>] [-UpdateServer <IUpdateServer>] [<CommonParameters>]
Get-WsusComputer [-ComputerTargetGroups <StringCollection>] [-ComputerUpdateStatus {Any | Failed | FailedOrNeeded | InstalledOrNotApplicable |
InstalledOrNotApplicableOrNoStatus | Needed | NoStatus}] [-ExcludedInstallationStates <UpdateInstallationStates[]>] [-FromLastReportedStatusTime
<DateTime>] [-FromLastSyncTime <DateTime>] [-IncludedInstallationStates <UpdateInstallationStates[]>] [-IncludeDownstreamComputerTargets]
[-IncludeSubgroups] [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable <System.String>]
[-NameIncludes <String>] [-RequestedTargetGroupNames <StringCollection>] [-ToLastReportedStatusTime <DateTime>] [-ToLastSyncTime <DateTime>]
[-UpdateServer <IUpdateServer>] [<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.
PARAMETERS
-All [<SwitchParameter>]
Specifies that all computers are to be returned. The information displayed includes the computer name, IP address, operating system, and last
status report time.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ComputerTargetGroups [<StringCollection>]
Specifies the list of target group to search.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ComputerUpdateStatus [<WsusUpdateInstallationState>]
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
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ExcludedInstallationStates [<UpdateInstallationStates[]>]
Specifies the installation states to exclude. The acceptable values for this parameter are:
-- All
-- Downloaded
-- Failed
-- Installed
-- InstalledPendingReboot
-- NotApplicable
-- NotInstalled
-- Unknown
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-FromLastReportedStatusTime [<DateTime>]
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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-FromLastSyncTime [<DateTime>]
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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-IncludeDownstreamComputerTargets [<SwitchParameter>]
Specifies that clients of a downstream server should be included, not clients of this server.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-IncludeSubgroups [<SwitchParameter>]
Specifies that the ComputerTargetGroups parameter should include descendant groups. This value has no impact if the ComputerTargetGroups
parameter is not used.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-IncludedInstallationStates [<UpdateInstallationStates[]>]
Specifies the installation states to include. The acceptable values for this parameter are:
-- All
-- Downloaded
-- Failed
-- Installed
-- InstalledPendingReboot
-- NotApplicable
-- NotInstalled
-- Unknown
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-InformationAction [<System.Management.Automation.ActionPreference>]
Specifies how this cmdlet responds to an information event. The acceptable values for this parameter are:
-- Continue
-- Ignore
-- Inquire
-- SilentlyContinue
-- Stop
-- Suspend
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-InformationVariable [<System.String>]
Specifies an information variable.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-NameIncludes [<String>]
Specifies the partial name of the computer for which to search.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-RequestedTargetGroupNames [<StringCollection>]
Specifies the list of requested target group names for which to search.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ToLastReportedStatusTime [<DateTime>]
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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ToLastSyncTime [<DateTime>]
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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-UpdateServer [<IUpdateServer>]
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.
Required? false
Position? named
Default value none
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
Microsoft.UpdateServices.Commands.IUpdateServer
OUTPUTS
None
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.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/p/?linkid=287828
Add-WsusComputer
Get-WsusServer
SYNOPSIS
Gets the WSUS computer object that represents the client computer.
SYNTAX
Get-WsusComputer [-All] [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable
<System.String>] [-UpdateServer <IUpdateServer>] [<CommonParameters>]
Get-WsusComputer [-ComputerTargetGroups <StringCollection>] [-ComputerUpdateStatus {Any | Failed | FailedOrNeeded | InstalledOrNotApplicable |
InstalledOrNotApplicableOrNoStatus | Needed | NoStatus}] [-ExcludedInstallationStates <UpdateInstallationStates[]>] [-FromLastReportedStatusTime
<DateTime>] [-FromLastSyncTime <DateTime>] [-IncludedInstallationStates <UpdateInstallationStates[]>] [-IncludeDownstreamComputerTargets]
[-IncludeSubgroups] [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable <System.String>]
[-NameIncludes <String>] [-RequestedTargetGroupNames <StringCollection>] [-ToLastReportedStatusTime <DateTime>] [-ToLastSyncTime <DateTime>]
[-UpdateServer <IUpdateServer>] [<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.
PARAMETERS
-All [<SwitchParameter>]
Specifies that all computers are to be returned. The information displayed includes the computer name, IP address, operating system, and last
status report time.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ComputerTargetGroups [<StringCollection>]
Specifies the list of target group to search.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ComputerUpdateStatus [<WsusUpdateInstallationState>]
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
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ExcludedInstallationStates [<UpdateInstallationStates[]>]
Specifies the installation states to exclude. The acceptable values for this parameter are:
-- All
-- Downloaded
-- Failed
-- Installed
-- InstalledPendingReboot
-- NotApplicable
-- NotInstalled
-- Unknown
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-FromLastReportedStatusTime [<DateTime>]
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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-FromLastSyncTime [<DateTime>]
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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-IncludeDownstreamComputerTargets [<SwitchParameter>]
Specifies that clients of a downstream server should be included, not clients of this server.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-IncludeSubgroups [<SwitchParameter>]
Specifies that the ComputerTargetGroups parameter should include descendant groups. This value has no impact if the ComputerTargetGroups
parameter is not used.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-IncludedInstallationStates [<UpdateInstallationStates[]>]
Specifies the installation states to include. The acceptable values for this parameter are:
-- All
-- Downloaded
-- Failed
-- Installed
-- InstalledPendingReboot
-- NotApplicable
-- NotInstalled
-- Unknown
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-InformationAction [<System.Management.Automation.ActionPreference>]
Specifies how this cmdlet responds to an information event. The acceptable values for this parameter are:
-- Continue
-- Ignore
-- Inquire
-- SilentlyContinue
-- Stop
-- Suspend
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-InformationVariable [<System.String>]
Specifies an information variable.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-NameIncludes [<String>]
Specifies the partial name of the computer for which to search.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-RequestedTargetGroupNames [<StringCollection>]
Specifies the list of requested target group names for which to search.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ToLastReportedStatusTime [<DateTime>]
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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ToLastSyncTime [<DateTime>]
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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-UpdateServer [<IUpdateServer>]
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.
Required? false
Position? named
Default value none
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
Microsoft.UpdateServices.Commands.IUpdateServer
OUTPUTS
None
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.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/p/?linkid=287828
Add-WsusComputer
Get-WsusServer