< Back

Register-DSCTrigger

Mon Jan 13, 2020 12:37 am

NAME Register-DSCTrigger



SYNOPSIS

Registers a trigger to run a Powershell configuration





SYNTAX

Register-DSCTrigger [-Name] <String> [-EventFilter] <String> [-EventNamespace <String>] [[-Configuration]

<ScriptBlock>] [-Force] [<CommonParameters>]





DESCRIPTION

Registers a WMI event trigger that, when the event occurs, will run a PowerShell configuration





PARAMETERS

-Name <String>

The name of the DSC trigger



Required? true

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-EventFilter <String>

The event filter



Required? true

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-EventNamespace <String>

The event namespace



Required? false

Position? named

Default value root\\cimv2

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Configuration <ScriptBlock>

The configuration that will be applied



Required? false

Position? 3

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Force [<SwitchParameter>]

If set, will delete existing registrations.



Required? false

Position? named

Default value False

Accept pipeline input? true (ByPropertyName)

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.Nullable







RELATED LINKS

Get-DSCTrigger

UnRegister-DSCTrigger