Link to home
Start Free TrialLog in
Avatar of zohre aghaei
zohre aghaei

asked on

move computers to specific ou

hi every body
i can move joined computers to an ou with redircmp
if i want to move some computers to a ou and other computers to another ou how can i do that?
for example move clients to "client ou" and move all servers in "server ou" Automaticly.
Avatar of Mr Mystikal
Mr Mystikal
Flag of South Africa image

Hi There,

Are you looking to have newly created objects moved based on criteria at the time of creation  or are you hoping to do it after the fact ?

As far as I can tell , Redircmp can only place new objects in a single OU , however if I were you , I'd look to create a powershell script inside a scheduled task from a server , use things like Get-ADComputer with properties like operating system etc to identify the object and then move it based on the logic.

I know this isn't exactly what you were hoping but maybe it helps ?

Reference 1 : Inventorying Computers with AD PowerShell

Reference 2 : The Easy Way to Use PowerShell to Move Computer Accounts

P.s naturally there is also an option to pre-create the AD objects for servers before joining them , the above is for inherited AD cleanups :P.
Avatar of zohre aghaei
zohre aghaei

ASKER

I want to change the path to my predetermined destination as soon as I send them to my domain.
so i think refrence2 is my answer, right?
Hi Zohre,

Traditionally one should be pre-creating AD objects for servers before joining them to the domain , however I assume this is out of your control , so yes essentially you can use the examples in ref 2 to learn how to move objects in AD , you will still need to set it up as a scheduled task to run at a frequency of your choosing.

I recommend searching for Get-ADComputer and having a look around , it's harmless to simply query a computer object to see what properties you can use in your future scripts , since Unix OS's do not populate the OperatingSystem attribute on our end.

I've not yet found any better way online to automate what you're looking for.

Using WMI in your scripts would be another way , alas that might not work on Unix based OS's.
thank you very much for your guidance , i will do research, hope to find
ASKER CERTIFIED SOLUTION
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia 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
Shaun Vermark's post provided the most direct guidance to this question , no further comments have been made in approx 14 days.