Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Backup_GPO {
- $stamp = Get-Date -UFormat "%m%d"
- New-Item -ItemType "directory" -Name $stamp -Path \dc-16shareGPO_Backups -Force | out-null # create new folder to specify day backup is made
- Backup-GPO -All -Path ("\dc-16shareGPO_Backups" + "$stamp" )
- $folders = Get-ChildItem -Path \dc-16shareGPO_Backups$stamp
- ForEach-Object {
- # I want to reference the current folder here
- [xml]$file = Get-Content -Path (folder that is being referenced in for loop)gpresult.xml
- $name = $file.GPO.Name
- }
- for object in list:
- print(object)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement