Skip to content

Instantly share code, notes, and snippets.

@signalwarrant
Created August 9, 2019 20:08
Show Gist options
  • Select an option

  • Save signalwarrant/4e0e04e481b56f6696163c170fbabd72 to your computer and use it in GitHub Desktop.

Select an option

Save signalwarrant/4e0e04e481b56f6696163c170fbabd72 to your computer and use it in GitHub Desktop.
Advanced Auditing LCM Config
# Run on the target node
[DSCLocalConfigurationManager()]
Configuration LCMConfig {
Node SVR {
Settings {
ConfigurationMode = 'ApplyAndAutoCorrect'
RefreshMode = 'Pull'
}
ConfigurationRepositoryWeb PullServer {
ServerURL = 'https://10.0.10.1:8080/PsDscPullserver.svc'
AllowUnsecureConnection = $false
RegistrationKey = 'ab5f4916-a937-4f99-ae72-8b9db3dd8a60'
ConfigurationNames = @('SVR')
}
ResourceRepositoryWeb PullServerModules {
ServerURL = 'https://10.0.10.1:8080/PsDscPullserver.svc'
AllowUnsecureConnection = $false
RegistrationKey = 'ab5f4916-a937-4f99-ae72-8b9db3dd8a60'
}
}
}
LCMConfig
Set-DscLocalConfigurationManager -ComputerName $env:COMPUTERNAME -Path '.\LCMConfig' -Verbose
Get-DSCLocalConfigurationManager
# This will show you the location of the CSV file that configuration is using
Get-DscConfiguration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment