batch file - wmic output is empty when running from remote computer -


when running line locally i'm getting output file expected:

wmic product name | more >"c:\temp\installlist.txt" 

but when trying run command remotely (using psexec running batch file on remote computer) file empty, although i'm using admin credentials.

why?

why using psexec. why don't specify computer, username , password wmic command. if credentials same local user on remote computer not need specify username , password.

wmic /node:"computer" /user:myusername /password:"password" product name | more >"c:\temp\installlist.txt" 

Comments

Popular posts from this blog

java - Checkbox item adds to spinner -

php - mySQL problems with this code? -

C# MVC AngularJS -