lstech
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 7/9/2010
-
Status: offline
|
Changing Local Admin with PowerShell
Friday, July 09, 2010 4:54 AM
( permalink)
I've played around with a coulple of PowerShell scripts to change the local admin on a group pc's but I haven't had 100% sucess. Out of 500 pc's 350 are updated. Most of what I've seen use the following code method. $admin=[adsi]("WinNT://" + $strComputer + "/administrator, user") $admin.psbase.invoke("SetPassword", "Whatever1") What I get back from a csv report is Yes, No or not on because not able to ping. My question is on some pc's it works fine but on others it doesn't. Is there a better method of updating the local administrator account using Powershell? What are the requirements to run Powershell against a remote machine? Thanks
|
|
|
|
TomRiddle
-
Total Posts
:
620
- Scores: 12
-
Reward points
:
0
- Joined: 2/7/2008
- Location: Australia
-
Status: offline
|
Re:Changing Local Admin with PowerShell
Saturday, July 17, 2010 12:49 AM
( permalink)
Hi did you work this out? I think the only requirements to run powershell against a remote machine is that remote machine has no firewall, you can ping it and you are local admin on it.
-join([int[]][char[]]'Ut|jwXmjqq%Wzqjx'|%{[char]($_-5)})
|
|
|
|
ginolard
-
Total Posts
:
1347
- Scores: 23
-
Reward points
:
0
- Joined: 8/11/2005
-
Status: offline
|
Re:Changing Local Admin with PowerShell
Sunday, July 18, 2010 7:45 PM
( permalink)
Do all the machines have Powershell installed on them? If so, you could use Remoting to do it.
|
|
|
|
nirvana
-
Total Posts
:
16
- Scores: 4
-
Reward points
:
0
- Joined: 3/29/2009
-
Status: offline
|
Re:Changing Local Admin with PowerShell
Saturday, February 12, 2011 11:32 PM
( permalink)
Are all computers in the same OU?
|
|
|
|