PowerShell Command to create computer account in Active Directory

This just simple command to create new AD computer in active directory

 

New`` -ADComputer -Name voltacomputer `` -SAMAccountName voltasama `` -Description testcomputer `` -DNSHostName voltacomputer.coex.com

Comments

  • Anonymous
    January 01, 2003
    In case anyone else comes across this in a random search, make sure you've imported the module first. import-module activedirectory

  • Anonymous
    December 30, 2011
    Nice, but not working on my Win7 or Server 2008R2 systems. In my domain we have to pre-create computer accounts in specific OUs before joining computers to the domain, so being able to script this is pretty essential, and I can't come up with any good/reliable way to do it. Is this something you installed from elsewhere?