PSEXEC + WMIC

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
alexandredneto
Posts: 39
Joined: 28 Feb 2013 13:40

PSEXEC + WMIC

#1 Post by alexandredneto » 05 Jun 2014 13:44

Dear sirs.

When I run the statement (below), it does not end. Manually digit CTRL + BREAK. It is finalized.

Code: Select all

psexec \ \ server_01 wmic useraccount WHERE "Name = 'user_new'" SET PasswordExpires = FALSE


I made tests closing in 5 seconds, sometimes 5 minutes. No matter what time the command is executed remotely, is only effectively completed the server remotely, when I finalize (CTRL + BREAK) command.

Has many servers do I have to upgrade, but it is not feasible to finalize manually (CTRL + BREAK). The best alternative is to make a script. How to finalize a script this command after 10 seconds within a FOR (BATCH)?

Why remotely WMI does not end the command, and the local execution is not the problem?

Thank you.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: PSEXEC + WMIC

#2 Post by foxidrive » 05 Jun 2014 19:19

My guess is that UAC is triggered on the remote machine when changing the item.

Post Reply