Last active
December 5, 2016 18:55
-
-
Save bobalob/21624d6adbfe487d4bf451e639f1a6fa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[DSCLocalConfigurationManager()] | |
Configuration LCM_HTTPSPULL | |
{ | |
param | |
( | |
[Parameter(Mandatory=$true)] | |
[string[]]$ComputerName, | |
[Parameter(Mandatory=$true)] | |
[string]$guid | |
) | |
Node $ComputerName { | |
Settings { | |
AllowModuleOverwrite = $True | |
ConfigurationMode = 'ApplyAndAutoCorrect' | |
RefreshMode = 'Pull' | |
ConfigurationID = $guid | |
ActionAfterReboot = 'ContinueConfiguration' | |
RebootNodeIfNeeded = $true | |
} | |
ConfigurationRepositoryWeb DSCHTTPS { | |
ServerURL = 'https://pullserver.example.com:8080/PSDSCPullServer.svc' | |
CertificateID = 'PULL_SERVER_CERT_THUMBPRINT_HERE' | |
AllowUnsecureConnection = $False | |
} | |
} | |
} | |
$guid=[guid]::NewGuid() | |
LCM_HTTPSPULL -ComputerName dscclient.example.com -Guid $guid -OutputPath C:\DSC\PullClient | |
Write-Host "New GUID for this computer is $($Guid.guid)" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment