diff --git a/Examples/Example-01-BackupGPOs.ps1 b/Examples/Example-01-BackupGPOs.ps1 index 3d058ab..b5875fb 100644 --- a/Examples/Example-01-BackupGPOs.ps1 +++ b/Examples/Example-01-BackupGPOs.ps1 @@ -2,8 +2,8 @@ # Backup GPOs $BackupPath = "$Env:UserProfile\Desktop\GPO" -$GPOSummary = Backup-GPOZaurr -BackupPath $BackupPath -Verbose -Type Unlinked -BackupDated #-LimitProcessing 1 +$GPOSummary = Backup-GPOZaurr -BackupPath $BackupPath -Verbose -Type All #-BackupDated #-LimitProcessing 1 $GPOSummary | Format-Table -AutoSize -# Confirm GPOs are backed up properly +## Confirm GPOs are backed up properly Get-GPOZaurrBackupInformation -BackupFolder $GPOSummary[0].BackupDirectory | Format-Table -a \ No newline at end of file diff --git a/Examples/Example-02-RemoveEmptyAndUnlinkedGPOs.ps1 b/Examples/Example-02-RemoveEmptyAndUnlinkedGPOs.ps1 index 717c960..372207b 100644 --- a/Examples/Example-02-RemoveEmptyAndUnlinkedGPOs.ps1 +++ b/Examples/Example-02-RemoveEmptyAndUnlinkedGPOs.ps1 @@ -1,5 +1,4 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force # Remove GPOS -$BackupPath = "$Env:UserProfile\Desktop\GPO" -Remove-GPOZaurr -Type Empty, Unlinked -BackupPath $BackupPath -BackupDated -LimitProcessing 2 -Verbose -WhatIf \ No newline at end of file +Remove-GPOZaurr -Type Empty, Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -BackupDated -LimitProcessing 2 -Verbose -WhatIf \ No newline at end of file diff --git a/Examples/Example-11-ReplaceGPOwner.ps1 b/Examples/Example-11-ReplaceGPOwner.ps1 index b092f41..2ba18f4 100644 --- a/Examples/Example-11-ReplaceGPOwner.ps1 +++ b/Examples/Example-11-ReplaceGPOwner.ps1 @@ -5,7 +5,7 @@ $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 NotAdministrative -Verbose -LimitProcessing 2 -WhatIf +Set-GPOZaurrOwner -Type All -Verbose:$true -WhatIf # -LimitProcessing 2 # Step 3 $Report = Get-GPOZaurrOwner -IncludeSysvol diff --git a/Examples/Example-40-ShowGPO.ps1 b/Examples/Example-40-ShowGPO.ps1 index e65d476..8b91050 100644 --- a/Examples/Example-40-ShowGPO.ps1 +++ b/Examples/Example-40-ShowGPO.ps1 @@ -1,4 +1,4 @@ -Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force +#Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Verbose -Type NetLogon, GPOOrphans, GPOList, GPOConsistency @@ -8,7 +8,7 @@ Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Verbose -Type Net #Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurrEmptyUnlinked.html -Verbose -Type GPOConsistency #Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Verbose -Type NetLogon - +#Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Verbose -Type GPOOwners #Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Verbose -Type GPOPermissionsRoot @@ -16,4 +16,4 @@ Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Verbose -Type Net #Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Verbose -Type GPOConsistency #Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Verbose -Type GPOOrphans, GPOConsistency #Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Verbose -Type GPOList -#Optimize-HTML -File 'C:\Support\GitHub\GpoZaurr\Examples\Reports\GPOZaurr.html' -OutputFile 'C:\Support\GitHub\GpoZaurr\Examples\Reports\GPOZaurr-Minified.html' +#Optimize-HTML -File 'C:\Support\GitHub\GpoZaurr\Examples\Reports\GPOZaurr.html' -OutputFile 'C:\Support\GitHub\GpoZaurr\Examples\Reports\GPOZaurr-Minified.html' \ No newline at end of file diff --git a/Examples/Example-40-ShowGPO1.ps1 b/Examples/Example-40-ShowGPO1.ps1 new file mode 100644 index 0000000..7a9d887 --- /dev/null +++ b/Examples/Example-40-ShowGPO1.ps1 @@ -0,0 +1 @@ +Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Verbose -Type NetLogon, GPOOrphans, GPOList, GPOConsistency,GPOOwners \ No newline at end of file diff --git a/Examples/Example-41-RepairNetLogonOwners.ps1 b/Examples/Example-41-RepairNetLogonOwners.ps1 new file mode 100644 index 0000000..683ed00 --- /dev/null +++ b/Examples/Example-41-RepairNetLogonOwners.ps1 @@ -0,0 +1,3 @@ +Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force + +Repair-GPOZaurrNetLogonOwner -WhatIf:$true -Verbose -IncludeDomains ad.evotec.pl \ No newline at end of file