Scenario: You need to add a user (test1) to local
Administrators group on all computer. How do you achieve this??? no no…you’re
wrong here – don’t need to use VBScript or something like that simply use
PSEXEC to accomplish this! – intersting!
Here it is:
psexec.exe net localgroup administrators
test.local\test /add -@server.txt
Isn’t simple as pie?
-@server.txt – This
file includes the list of servers to be processed by psexec to run the Net
Localgroup Administrators test.local\test /add command.
net localgroup – This command directs NBT API to execute a
command using Windows Low-level sub-system. You should use Net Group for Global
security group if you’re gonna add to Global Security Group.
[H]
Hi
I tried your posting but had to use the syntax
psexec.exe @server.txt net localgroup administrators /add
as having tried the original syntax, I got a warning “There is no such global user or group: @server.txt”.
However my version of the syntax also fails with “Access Denied” for every server listed in server.txt. Do you have any idea, why this would be so?
Many thanks – Colin
Access Denied can be due to a handful of things. I usually see this when I run this kind of command against a remote machine while using an account that’s not already an administrator on that machine.
Or:
You need to be an administrator on the remote machine to add other folks to the local administrator group.
Use IP addresses instead of names in Servers.txt
MSN I NIIPET
MSN
http://www.message_caololilada.com/
e0SAZ4 jnpyfpdchrfp, [url=http://rwwpimcplmyp.com/]rwwpimcplmyp[/url], [link=http://gdcngzcttmev.com/]gdcngzcttmev[/link], http://vidswuefrmcg.com/
how to use this command pls explain me……..