0
votes

I am trying to reset the password of my domain controller using custom script extension.

net user 'username@domain.com' 'xX@123456'

Script is deployed successfully but I am not able to login using the new password. enter image description here

In the details status, I see following things -

[
    {
        "code": "ComponentStatus/StdOut/succeeded",
        "level": "Info",
        "displayStatus": "Provisioning succeeded",
        "message": ""
    },
    {
        "code": "ComponentStatus/StdErr/succeeded",
        "level": "Info",
        "displayStatus": "Provisioning succeeded",
        "message": "The syntax of this command is:\\n\\nNET USER\\n[username [password | *] [options]] [/DOMAIN]\\n         username {password | *} /ADD [options] [/DOMAIN]\\n         username [/DELETE] [/DOMAIN]\\n         username [/TIMES:{times | ALL}]\\n         username [/ACTIVE: {YES | NO}]\\n\\nThere is no such global user or group: username@domain.com.\\n\\nMore help is available by typing NET HELPMSG 3783.\\n\\nThere is no such global user or group: username@domain.com.\\n\\nMore help is available by typing NET HELPMSG 3783.\\n"
    }
]

I am not sure what following message means -

The syntax of this command is:\n\nNET USER\n[username [password | *] [options]] [/DOMAIN]\n username {password | *} /ADD [options] [/DOMAIN]\n username [/DELETE] [/DOMAIN]\n
username [/TIMES:{times | ALL}]\n username [/ACTIVE: {YES | NO}]\n\nThere is no such global user or group: username@domain.com.\n\nMore help is available by typing NET HELPMSG 3783.\n\nThere is no such global user or group: username@domain.com.\n\nMore help is available by typing NET HELPMSG 3783.\n

1

1 Answers

0
votes

Not exact solution, however you can use below solution after removing the user and to add it again to admins group.

First, use the following command to view the current Local Admin users (users that are members of Local Administrators groups) :

=> Net localgroup administrators

Check if the users or groups you want to add to local adm group are not already present, if this not the case, use the following command to add domains admins to local admin group :

Net localgroup Administrators /add "DOMAIN\Domain Admins" | e.i : net localgoup Administrators /add "Microsoft\Domain Admins"

Between domain and admins there is an space so you have to add the symbol " "(Quotes)

in addition, you have to specify the group or user after /add not before :).

Source : Technet