Joining an Active Directory domain using netdom

316

I suspect your double percent signs are the culprit.

You can see how it's executing in your batch file by adding an echo on immediately before the first netdom and running the batch file from an elevated command prompt. I expect that you're going to see something like:

netdom join %THE_COMPUTER_NAME% /domain:OPSCODEDEMO.COM /userd:Administrator /passwordd:xxx

How you're getting it to work at all w/ the double percent signs, even just running those commands on the CLI "by hand", is baffling me.

Share:
316

Related videos on Youtube

KelvTheKid
Author by

KelvTheKid

Updated on November 23, 2022

Comments

  • KelvTheKid
    KelvTheKid over 1 year

    I have a text file with the following data

    //info.txt
    $ip = "192.168.12.201"
    $sno = "some text"
    $mac = "some text"
    

    I want to be able to convert these variables from the text file into PHP variables to be checked with presaved data. I'm able to do this in python but it causes and extra redundant step. Could what I'm trying to achieve be done in PHP?