mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-07-26 11:49:17 +00:00
12 lines
609 B
PowerShell
12 lines
609 B
PowerShell
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
|
|
|
# Step 1 - Create report
|
|
$Report = Get-GPOZaurrOwner -IncludeSysvol
|
|
$Report | ConvertTo-Excel -FilePath $Env:UserProfile\Desktop\GPOOwners.xlsx -ExcelWorkSheetName 'GPO Owners Before' -AutoFilter -AutoFit
|
|
|
|
# Step 2 - Fix owners / use WhatIf and LimitProcessing / verify changes before/after
|
|
Set-GPOZaurrOwner -Type All -Verbose:$true -WhatIf # -LimitProcessing 2
|
|
|
|
# Step 3
|
|
$Report = Get-GPOZaurrOwner -IncludeSysvol
|
|
$Report | ConvertTo-Excel -FilePath $Env:UserProfile\Desktop\GPOOwners.xlsx -ExcelWorkSheetName 'GPO Owners After' -AutoFilter -AutoFit |