Skip to content

UpdateServicesComputerTargetGroup

dscbot edited this page Nov 19, 2025 · 1 revision

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key String Name of the Computer Target Group.
Path Key String Path to the Computer Target Group.
Ensure Write String An enumerated value that describes if the WSUS Computer Target Group is configured. Default value is 'Present'. Present, Absent
Id Read String ID / GUID of the Computer Target Group.

Description

This resource is used to configure the Update Services Computer Target Group.

Examples

Example 1

Create WSUS Computer Target Groups.

This configuration will create a WSUS Computer Target Group named 'Web' in the 'All Computers/Servers' path using the UpdateServicesDsc module.

Configuration UpdateServicesComputerTargetGroup_AddComputerTargetGroup_Config
{
    param ()

    Import-DscResource -ModuleName UpdateServicesDsc

    node localhost
    {
        UpdateServicesComputerTargetGroup 'ComputerTargetGroup_Servers'
        {
            Name        = 'Servers'
            Path        = 'All Computers'
            Ensure      = 'Present'
        }

        UpdateServicesComputerTargetGroup 'ComputerTargetGroup_Web'
        {
            Name        = 'Web'
            Path        = 'All Computers/Servers'
            Ensure      = 'Present'
            DependsOn   = '[UpdateServicesComputerTargetGroup]ComputerTargetGroup_Servers'
        }
    }
}

Example 2

Delete a WSUS Computer Target Group.

This configuration will delete a WSUS Computer Target Group named 'Web' from the 'All Computers/Servers' path using the UpdateServicesDsc module.

Configuration UpdateServicesComputerTargetGroup_DeleteComputerTargetGroup_Config
{
    param ()

    Import-DscResource -ModuleName UpdateServicesDsc

    node localhost
    {
        UpdateServicesComputerTargetGroup 'ComputerTargetGroup_Web'
        {
            Name        = 'Web'
            Path        = 'All Computers/Servers'
            Ensure      = 'Absent'
        }
    }
}

Clone this wiki locally