Fixing issues 228, 252, 255
This commit is contained in:
		| @@ -1,7 +1,7 @@ | ||||
| # Purpose: Install the GPO that specifies the WEF collector | ||||
| Write-Host "Importing the GPO to enable Powershell Module, ScriptBlock and Transcript logging..." | ||||
| Import-GPO -BackupGpoName 'Powershell Logging' -Path "c:\vagrant\resources\GPO\powershell_logging" -TargetName 'Powershell Logging' -CreateIfNeeded | ||||
| $OU = "ou=Workstations,dc=windomain,dc=local"  | ||||
| $OU = "ou=Workstations,dc=windomain,dc=local" | ||||
| $gPLinks = $null | ||||
| $gPLinks = Get-ADOrganizationalUnit -Identity $OU -Properties name,distinguishedName, gPLink, gPOptions | ||||
| $GPO = Get-GPO -Name 'Powershell Logging' | ||||
| @@ -11,9 +11,9 @@ If ($gPLinks.LinkedGroupPolicyObjects -notcontains $gpo.path) | ||||
| } | ||||
| else | ||||
| { | ||||
|     Write-Host "Powershell Loggin was already linked at $OU. Moving On." | ||||
|     Write-Host "Powershell Logging was already linked at $OU. Moving On." | ||||
| } | ||||
| $OU = "ou=Servers,dc=windomain,dc=local"  | ||||
| $OU = "ou=Servers,dc=windomain,dc=local" | ||||
| $gPLinks = $null | ||||
| $gPLinks = Get-ADOrganizationalUnit -Identity $OU -Properties name,distinguishedName, gPLink, gPOptions | ||||
| $GPO = Get-GPO -Name 'Powershell Logging' | ||||
| @@ -23,7 +23,7 @@ If ($gPLinks.LinkedGroupPolicyObjects -notcontains $gpo.path) | ||||
| } | ||||
| else | ||||
| { | ||||
|     Write-Host "Powershell Loggin was already linked at $OU. Moving On." | ||||
|     Write-Host "Powershell Logging was already linked at $OU. Moving On." | ||||
| } | ||||
| $OU = "ou=Domain Controllers,dc=windomain,dc=local" | ||||
| $gPLinks = $null | ||||
| @@ -34,6 +34,6 @@ If ($gPLinks.LinkedGroupPolicyObjects -notcontains $gpo.path) | ||||
| } | ||||
| else | ||||
| { | ||||
|     Write-Host "Powershell Loggin was already linked at $OU. Moving On." | ||||
|     Write-Host "Powershell Logging was already linked at $OU. Moving On." | ||||
| } | ||||
| gpupdate /force | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Chris Long
					Chris Long