Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [string]$folder = 'C:\@guyrleech\GPOs'; Import-Module GroupPolicy; if( ! ( Test-Path -Path $folder )) { $null = New-Item -Path $folder -ItemType Directory -Force}; Backup-GPO -All -Path $folder -Comment "Backed up by $env:username from $env:COMPUTERNAME at $(Get-Date -Format G)" | Export-csv -Path (Join-Path -Path $folder -ChildPath GPO.backup.details.csv) -NoTypeInformation
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement