Avatar of WellingtonIS
WellingtonIS
 asked on

Remotely Add a PC to the domain

I've trying to use powershell to add a machine to the domain.  The local accounts are locked, the local administrator account is disabled and it's doesn't see the domain.  I'm was trying to use powershell Remotely because It's impossible to do it any other way..
add-computer -computername (nameofmachine) -domainname (name of the domain) - credential (my credentials)
It now working.  Is there anyway to do this remotely???
PowershellActive DirectoryWindows 7PC

Avatar of undefined
Last Comment
WellingtonIS

8/22/2022 - Mon
Hello There

Add-Computer only works on the local computer, you can’t use it to add a remote machine. So you need to get some script.

E.g. this one.

Or maybe this topic can help you.
WellingtonIS

ASKER
That's not really the issue.  The local accounts are all locked and I can't get on the machine.  I was trying to add the machine to the domain or jjoin the machine to the domain with a remote command to get it back on the domain so I can get in it
Tom Cieslik

What about team viewer QS ?
You can ask user to download TV QS run it and give you access to through TeamViewer free edition.
You going to be able connect remotely and add computer to domain
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
WellingtonIS

ASKER
OK but if I can't get on the machine, a) how can I install that, b)I still will not be able to get in.
ASKER CERTIFIED SOLUTION
Giridhara Raam M

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
WellingtonIS

ASKER
OK will do thanks.
WellingtonIS

ASKER
That worked but it's not my first choice.  I'd rather see if I can create a script for this.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Danny Verrazano

You could try booting to a CD/DVD or USB drive with a tool that will allow you to change the local admin password for the system partition.  There are several tools available to do that. Google and take your pick.
Danny Verrazano

yeah if a tool can do it then a script of your own could do it... its all ones and zeros.
WellingtonIS

ASKER
OK I'll look into that thanks.
Your help has saved me hundreds of hours of internet surfing.
fblack61