Last active
April 3, 2017 10:55
-
-
Save Dan1el42/14aef31cf43d713a4720 to your computer and use it in GitHub Desktop.
Trigger node to get latest configuration from pull server and apply immediately. #PowerShell #DSC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param | |
( | |
[Parameter(Mandatory)] | |
[ValidateNotNullOrEmpty()] | |
[String[]]$ComputerName | |
) | |
# Gets latest configuration from pull server and apply immediately | |
$InvokeMethodSplat = @{ | |
ComputerName = $ComputerName | |
Namespace = 'root/microsoft/windows/desiredstateconfiguration' | |
ClassName = 'MSFT_DscLocalConfigurationManager' | |
MethodName = 'PerformRequiredConfigurationChecks' | |
Arguments = @{Flags = [UInt32]1} | |
Verbose = $true | |
} | |
Invoke-CimMethod @InvokeMethodSplat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment