Last active
June 27, 2016 02:58
-
-
Save duffney/58ec33acf0e01dd67861c02d4b651821 to your computer and use it in GitHub Desktop.
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
configuration Collector | |
{ | |
Import-DscResource –ModuleName PSDesiredStateConfiguration | |
Import-DscResource -ModuleName xWindowsEventForwarding | |
Windowsfeature RSATADPowerShell{ | |
Ensure = 'Present' | |
Name = 'RSAT-AD-PowerShell' | |
} | |
xWEFCollector Enabled { | |
Ensure = "Present" | |
Name = "Enabled" | |
} | |
xWEFSubscription ADSecurity | |
{ | |
SubscriptionID = "ADSecurity" | |
Ensure = "Present" | |
LogFile = 'ForwardedEvents' | |
SubscriptionType = 'CollectorInitiated' | |
Address = (Get-ADGroupMember 'Domain Controllers' | % {Get-ADComputer -Identity $_.SID}).DNSHostName | |
DependsOn = "[xWEFCollector]Enabled","[WindowsFeature]RSATADPowerShell" | |
Query = @('Security:*') | |
} | |
} | |
Collector -OutputPath c:\DSC\ | |
Start-DscConfiguration -Wait -Force -Path c:\DSC\ -Verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment