Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $xScripts = Select-String -Path "\\dc\SYSVOL\domain.com\scripts\*.bat" -Pattern "x:"
- $uScripts = Select-String -Path "\\dc\SYSVOL\domain.com\scripts\*.bat" -Pattern "u:"
- ForEach($Script in $xScripts){
- $filter = "{(scriptpath -eq `"$($Script.filename)`") -and (DistinguishedName -notlike `"UX`")}"
- Get-ADUser -Filter $filter
- }
- $xUsers
Advertisement
Add Comment
Please, Sign In to add comment