I find it that I am using psexec all the time at my job to remotely make changes in mass. When I run PSEXEC in powershell, I get the following message on every computer that I connect to:
Code:
foreach($computer in $computers) {
psexec -i \\$computer net localgroup "Administrators" "ITLOCALADMIN" /add
}
And here is the results:
PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
System error 1378 has occurred.
The specified account name is already a member of the group.
Connecting to {COMPNAME}...Starting PSEXESVC service on {COMPNAME}...Connecting with PsExec service on {COMPNAME}...Starting net on {COMPNAME}...
net exited on {COMPNAME}with error code 2.
psexec :
At G:\Users\ariggs\Documents\WindowsPowerShell\Scripts\AddItlocaladmin.ps1:3 char:9
+ psexec \\$computer net localgroup "Administrators" "ITLOCALAD ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Is it possible to turn those messages off where all I see is the output of the command or an error? It makes it very hard to see if there was a problem or if it worked with all of this text in the way.