PSEXEC Log?

Is there any command I can use in my PSexec scripts to get it to record what it installed?  I used PSExec to install some software with a list of PC's.  I'm wanting to know basically if I can record what scrolls on the command screen to a txt file so I know what has installed and what has failed?
WellingtonISAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rhandelsCommented:
Hey,

Yes you can. At the end of the command just type in > d:\Myfolder\log.txt (where you can add any path you would like to offcourse) this PIPE's all to a text file.
0
WellingtonISAuthor Commented:
ok I have 3 commands in this particular bat file.  Does it matter which one or is it only going to record what command I add it to?  

Here's the command for example...
Psexec \\@%var% -u xx\xxx -p xxx cmd /c copy "\\sss\sss\WRM_ssoCA.cer" c:\
psexec \\@%var% -u xxx\xxx -p xxx cmd /c copy "\\sss\sss\certmgr.exe" c:\

psexec \\@%var% cmd /c c:\certmgr.exe -add -all c:\WRM_ssoCA.cer -s -r localmachine root

psexec \\@%var% -s cmd /c del "c:\WRM_ssoCA.cer"
psexec \\@%var% -s cmd /c del "c:\certmgr.exe"
0
rhandelsCommented:
Add it after every command line you execute. Do keep in mind that using 1 > is overwriting the file (so don't add the same log file after every line with a single >, the last one will overwrite the one before which will overwrite the one before..

If you want to add them all to one file use 2 >>'s. So your command file would be below. All appended into one text file.

Psexec \\@%var% -u xx\xxx -p xxx cmd /c copy "\\sss\sss\WRM_ssoCA.cer" c:\ >> D:\Logfile.txt
psexec \\@%var% -u xxx\xxx -p xxx cmd /c copy "\\sss\sss\certmgr.exe" c:\ >> D:\Logfile.txt

psexec \\@%var% cmd /c c:\certmgr.exe -add -all c:\WRM_ssoCA.cer -s -r localmachine root >> D:\Logfile.txt

psexec \\@%var% -s cmd /c del "c:\WRM_ssoCA.cer" >> D:\Logfile.txt
psexec \\@%var% -s cmd /c del "c:\certmgr.exe" >> D:\Logfile.txt
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WellingtonISAuthor Commented:
thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.