< Back

Add-WsusComputer

Thu Apr 04, 2019 5:42 am

NAME Add-WsusComputer



SYNOPSIS

Adds a client computer to a target group.





SYNTAX

Add-WsusComputer [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable <System.String>]

-Computer <WsusComputer> -TargetGroupName <String> [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Add-WsusComputer cmdlet adds the specified computer to the specified target group on the local server or a specified server. You can invoke

this command by using the pipeline operator for the results of the Get-WsusComputer cmdlet. Calling the Get-WsusComputer cmdlet and passing the

results into this cmdlet enables you to leverage the filtering capabilities of the Get-WsusComputer cmdlet in moving the desired computers to the

specified target group. The server used in the Get-WsusComputer cmdlet is also used in this cmdlet.





PARAMETERS

-Computer <WsusComputer>

Specifies the object that contains the client computer to be added. This value is obtained by running the Get-WsusComputer cmdlet and piping

the resulting WsusComputer object into this cmdlet.



Required? true

Position? named

Default value none

Accept pipeline input? true (ByValue)

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



-TargetGroupName <String>

Specifies the name of the computer target group for which to run this cmdlet.



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value false

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value false

Accept pipeline input? false

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.WsusComputer









OUTPUTS

None







Example 1: Add computers to a target group



PS C:\\> Get-WsusServer -Name "contoso" | Get-WsusComputer -NameIncludes "winvm" | Add-WsusComputer -TargetGroupName "Windows Virtual Machines"



This command adds all computers with winvm in the name to the target group named Windows Virtual Machines on the server named contoso.







RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=786992

Get-WsusComputer

Get-WsusServer