Skip to content

Commit

Permalink
Merge branch 'master' into lint-01
Browse files Browse the repository at this point in the history
  • Loading branch information
simeononsecurity authored Sep 26, 2024
2 parents d5a2b98 + ee60295 commit 180095c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sos-stig-compliant-domain-prep.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ $policyDefinitionsDestination = 'C:\Windows\PolicyDefinitions'
try {
Write-Output "Copying Policy Definitions to Central Store"
# Take ownership of the PolicyDefinitions folder and grant full control to Administrators
takeown /f "$policyDefinitionsDestination" /r /a /d y | Out-File -FilePath "$logFilePath" -Append
icacls "$policyDefinitionsDestination" /grant "Administrators:(OI)(CI)F" /t | Out-File -FilePath "$logFilePath" -Append
takeown /f "$policyDefinitionsDestination" /r /a /d y | Out-Null
icacls "$policyDefinitionsDestination" /grant "Administrators:(OI)(CI)F" /t | Out-Null
icacls "$policyDefinitionsDestination" /grant "Administrators:F" /t | Out-Null
# Copy the files to the PolicyDefinitions folder
Copy-Item -Path "$policyDefinitionsSource\*" -Destination $policyDefinitionsDestination -Force -Recurse -ErrorAction Stop
# Get all SYSVOL paths
Expand Down

0 comments on commit 180095c

Please sign in to comment.