Announcement

Collapse
No announcement yet.

Add server to domain script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Add server to domain script

    Hi,
    I am trying to create a powershell script to add servers to the domain. It works fine, but i want to automate this to not been forced to supply the password. The script adds the server to the domain and put the server in a Server OU. The user that adds the server to domain is a Active directory user with the right permissions (addservers_useraccount). Here is how this looks now:

    Add-Computer -DomainName my.domain.com -Cred my.domain\addservers_useraccount -PassThru -OUPath "OU=Servers,DC=my,DC=domain,DC=com" -Restart


    How can i automate the logon and do this secure? No password in clear text.
    /R
Working...
X