Adding timestamps to scripts, Vagrantfile_prebuilt, logo
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
# Purpose: Installs the GPOs needed to specify a Windows Event Collector and makes certain event channels readable by Event Logger
|
||||
Write-Host "Importing the GPO to specify the WEF collector"
|
||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Importing the GPO to specify the WEF collector"
|
||||
$GPOName = 'Windows Event Forwarding Server'
|
||||
Import-GPO -BackupGpoName $GPOName -Path "c:\vagrant\resources\GPO\wef_configuration" -TargetName $GPOName -CreateIfNeeded
|
||||
$gpLinks = $null
|
||||
$OU = "OU=Servers,dc=windomain,dc=local"
|
||||
|
||||
$gPLinks = Get-ADOrganizationalUnit -Server "dc.windomain.local" -Identity $OU -Properties name,distinguishedName, gPLink, gPOptions
|
||||
$GPO = Get-GPO -Name $GPOName
|
||||
If ($gPLinks.LinkedGroupPolicyObjects -notcontains $gpo.path)
|
||||
@@ -33,7 +34,7 @@ If ($gPLinks.LinkedGroupPolicyObjects -notcontains $gpo.path)
|
||||
Write-Host "GpLink $GPOName already linked on $OU. Moving On."
|
||||
}
|
||||
|
||||
Write-Host "Importing the GPO to modify ACLs on Custom Event Channels"
|
||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Importing the GPO to modify ACLs on Custom Event Channels"
|
||||
|
||||
$GPOName = 'Custom Event Channel Permissions'
|
||||
Import-GPO -BackupGpoName $GPOName -Path "c:\vagrant\resources\GPO\wef_configuration" -TargetName $GPOName -CreateIfNeeded
|
||||
|
||||
Reference in New Issue
Block a user