PowerShell for Windows Admins

Jan 11 2015   5:21AM GMT

Add-Computer is your friend

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Active Directory

When spinning up new machines and joining them to the domain at least 2 reboots are required. One when you rename the machine (Windows used to let you specify the name at install time – the removal of that feature was a step backwards) and the other when you join it to the domain.

I was looking at the help file for Add-Computer and discovered you can rename the machine as you join it to the domain. Miss one reboot and get the build finished quicker.

$cred = Get-Credential manticore\richard
Add-Computer -Credential $cred -DomainName manticore -NewName W12R2Web02 -Restart –Force

Nice and simple – I like this.

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: