Announcement

Collapse
No announcement yet.

How to Add Computer to the domain By CMD?

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

  • How to Add Computer to the domain By CMD?

    Hi,

    I want to join my windows 7 computers to the domain, By commandline.

    But i dont want to work with NETdom commands because if i suppose to work with NETdom command i will need to install RSAT and i dont want.

    i only need a simple commandline.


    Join Domain: <domainname> - Username: <username> - Password:<password>

    please help?
    Last edited by swimex; 13th May 2013, 17:15.

  • #2
    Re: How to Add Computer to the domain By CMD?

    appears to offer a number of script options which could probably be adapted
    http://www.google.co.uk/search?q=joi...G5KInCPKP2gfAG
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: How to Add Computer to the domain By CMD?

      How to join a domain from the command line

      NETDOM /Domain:MYDOMAIN /user:adminuser /password:apassword MEMBER MYCOMPUTER /JOINDOMAIN

      whats the problem with creating an RSAT install? seems to make things much easier and its not a difficult implementation...
      its easier to beg forgiveness than ask permission.
      Give karma where karma is due...

      Comment


      • #4
        Re: How to Add Computer to the domain By CMD?

        Originally posted by James Haynes View Post
        How to join a domain from the command line

        NETDOM /Domain:MYDOMAIN /user:adminuser /password:apassword MEMBER MYCOMPUTER /JOINDOMAIN

        whats the problem with creating an RSAT install? seems to make things much easier and its not a difficult implementation...


        Because i have to deploy for 310 computer.
        and also to remove the rsat.
        its a big deal to work so hard for a simple cmd.

        please help me and dont send me to google, i was there and all talk about the netdom, or kind of stuff scripting inside the computer allready done.

        please help just commandline.

        Comment


        • #5
          Re: How to Add Computer to the domain By CMD?

          Did you bother to click on the link I posted for you?
          The first few hits were links to scripts to add computers to the domain in e.g. VBS or PowerShell. As far as I know scripts are the way to join a domain as there is no CMD prompt option (apart from NetDOM which you have rejected)

          You can get to them in TWO mouseclicks -- one from the forum to and the next to the script. You could always ask your butler to do it for you

          Please note member give up their free time to help YOU out, so a bit of gratitude - not just attitude -- would not be out of place.
          Tom Jones
          MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
          PhD, MSc, FIAP, MIITT
          IT Trainer / Consultant
          Ossian Ltd
          Scotland

          ** Remember to give credit where credit is due and leave reputation points where appropriate **

          Comment


          • #6
            Re: How to Add Computer to the domain By CMD?

            If you prefer a 'one liner' command line or a good old batch file, then use WMIC.exe. WMIC (Windows Management Instrumentation Command-line) is available on Windows 8 & 7, Vista and Windows XP_Professional

            The command line:
            Code:
            wmic.exe /interactive:off ComputerSystem Where name="%computername%" call JoinDomainOrWorkgroup FJoinOptions=3 Name="myDom.local" UserName="myDom\UsrName" Password="@[email protected]" AccountOU="OU=MyClients;OU=MyOrg;DC=myDom;DC=local"
            For the 'FJoinOptions' the see : http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
            In the example above the FJoinOptions is 3 (1+2) ==> Join computer to a Domain (1) + create a new account (2). If the computer account would have been in Active Directory already then you should use FJoinOptions = 1


            Note: To be able to use WMIC.exe on Windows XP, the user that runs the command needs to have full write access to both the WMIC namespaces and a registry key (HKLM\Software\Microsoft\WBEM). Any member of the local administrators group has sufficient rights to run the command. [http://technet.microsoft.com/en-us/l...v=ws.10).aspx]

            /Rems
            Last edited by Rems; 15th June 2013, 20:54.

            This posting is provided "AS IS" with no warranties, and confers no rights.

            __________________

            ** Remember to give credit where credit's due **
            and leave Reputation Points for meaningful posts

            Comment


            • #7
              Re: How to Add Computer to the domain By CMD?

              Rems,

              Thanks Alot! King you are!

              Comment

              Working...
              X