Add server to domain script

Home Forums Scripting PowerShell Add server to domain script

This topic contains 0 replies, has 1 voice, and was last updated by Avatar Ruslan 2 years, 7 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    Ruslan
    Member
    #166894

    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.domainaddservers_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

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.