Link to home
Create AccountLog in
Avatar of chgl
chglFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Powershell - New computers to AD Domain

Hi guys,

I have quite a few computers that I need to add to the domain, is there a way of automating this via powershell?

thank you in advance,
k
ASKER CERTIFIED SOLUTION
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of chgl

ASKER

thank you very much sedwick, what does gc mean and the % before the {
gc is alias of get-content, and % before { equals to foreach when u loop the pipe results.
for example when u want to loop through lines in file:

gc c:\myfile.txt | %{
}

Open in new window


equlas to:

get-content c:\myfile.txt | foreach-object{
}

Open in new window

Avatar of chgl

ASKER

ohh right thank you :)

will this script bind the computer to the active directory domain so that users can log in with their credentials?
Avatar of chgl

ASKER

the txt file does it have to include commans, e.g computer01, computer02, etc??
Avatar of chgl

ASKER

are you sure this would work with xp and windows 7 machines? becuase i dont see how the logon to domain on the drop down menu will appear on the log on screen??? should there be some sort of remoting in order to bind to active directory??