rdefino
asked on
Need power shell script to move a system to 1 of 3 OU's based on a registry entry
I need to come up with a script that will look at a registry entry on a system and based on that setting the script will move the system to 1 of 3 ou's.
Any thoughts on how to do this. It's above my abilities to script.
thanks
Any thoughts on how to do this. It's above my abilities to script.
thanks
Which registry entry are you going to key off of and do you already have a script that will move a system into a specified OU (without making any comparisons that is)?
ASKER
I don't have the keys yet, but I have a script I've used to moves systems. How would I reference a reg key from the script?
import-module ac*
gc e:\scripts\move_systems_to _ou\pclist .txt | % {
Get-ADComputer $_| Move-ADObject -TargetPath "New_OU"
}
Thanks
import-module ac*
gc e:\scripts\move_systems_to
Get-ADComputer $_| Move-ADObject -TargetPath "New_OU"
}
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.