Adding timestamps to scripts, Vagrantfile_prebuilt, logo
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Purpose: Installs the GPOs for the custom WinEventLog auditing policy.
|
||||
Write-Host "Configuring auditing policy GPOS..."
|
||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Configuring auditing policy GPOs..."
|
||||
$GPOName = 'Domain Controllers Enhanced Auditing Policy'
|
||||
$OU = "ou=Domain Controllers,dc=windomain,dc=local"
|
||||
Write-Host "Importing $GPOName..."
|
||||
@@ -17,7 +17,7 @@ else
|
||||
}
|
||||
$GPOName = 'Servers Enhanced Auditing Policy'
|
||||
$OU = "ou=Servers,dc=windomain,dc=local"
|
||||
Write-Host "Importing $GPOName..."
|
||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Importing $GPOName..."
|
||||
Import-GPO -BackupGpoName $GPOName -Path "c:\vagrant\resources\GPO\Servers_Enhanced_Auditing_Policy" -TargetName $GPOName -CreateIfNeeded
|
||||
$gpLinks = $null
|
||||
$gPLinks = Get-ADOrganizationalUnit -Identity $OU -Properties name,distinguishedName, gPLink, gPOptions
|
||||
@@ -32,8 +32,8 @@ else
|
||||
}
|
||||
|
||||
$GPOName = 'Workstations Enhanced Auditing Policy'
|
||||
$OU = "ou=Workstations,dc=windomain,dc=local"
|
||||
Write-Host "Importing $GPOName..."
|
||||
$OU = "ou=Workstations,dc=windomain,dc=local"
|
||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Importing $GPOName..."
|
||||
Import-GPO -BackupGpoName $GPOName -Path "c:\vagrant\resources\GPO\Workstations_Enhanced_Auditing_Policy" -TargetName $GPOName -CreateIfNeeded
|
||||
$gpLinks = $null
|
||||
$gPLinks = Get-ADOrganizationalUnit -Identity $OU -Properties name,distinguishedName, gPLink, gPOptions
|
||||
@@ -46,4 +46,3 @@ else
|
||||
{
|
||||
Write-Host "GpLink $GPOName already linked on $OU. Moving On."
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user