0
votes

Trying to run chef-client command remotely. Installed PSEXEC for that. When I try running ipconfig, it runs fine and give proper result. But "chef-client" is not running.

C:\Users\Administrator.PM-DDMA-C1-DEV>psexec \10.x.x.x chef-client

PsExec v2.11 - Execute processes remotely Copyright (C) 2001-2014 Mark Russinovich Sysinternals - www.sysinternals.com

PsExec could not start chef-client on 10.106.69.76: The system cannot find the file specified.

Any suggestions?

2
Try specifying the full path to chef-client. It's not on whatever path PsExec is getting when it starts the remote session. - arco444
I tried running chef-client locally from many locations. It was running fine from everywhere. I guess location is not required. There must be some other issue. - IT-Sheriff
But did you try it with the full path...? - arco444
@Beginner the path for a user and the path for psexec service has no link. You won't be running with the same user as you do interactively, and the PATH variables may have been updated only for your user instead of system wide. Use full path when running commands with psexec to avoid troubles. - Tensibai

2 Answers

0
votes

As Tensibai said in comments, using a full path is recommended since the chef binary folders might not be on the path in the context of psexec.

0
votes

Issue resolved. Thanks. Keeping full path with command worked.