Link to home
Start Free TrialLog in
Avatar of davidm27
davidm27

asked on

Modify script to exclude OU from search

I have the following powershell script, i want to modify it so it exclude a certain OU when it runs

$Users = Get-QADUser -disabled
foreach ($User in $Users){
$User.description = (Get-Date).toshortdatestring()
move-QADObject $User -NewParentContainer 'MyDomain.company.com/NewYork/Users'
}

any help would be great

thanks
ASKER CERTIFIED SOLUTION
Avatar of Ironbone
Ironbone
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of davidm27
davidm27

ASKER

cheers, works perefectly. sorry for the delay in replying excellent solution