SOLVED

Running PSShutdown

%3CLINGO-SUB%20id%3D%22lingo-sub-1289845%22%20slang%3D%22en-US%22%3ERunning%20PSShutdown%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1289845%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20I%20try%20to%20run%20PSShutdown%20I%20get%20the%20following%3A%26nbsp%3B%20What%20am%20I%20doing%20wrong%3F%26nbsp%3B%20This%20is%20two%20line%20batch%20file.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture.JPG%22%20style%3D%22width%3A%20749px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F182916i4EFF25776DCFC734%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Capture.JPG%22%20alt%3D%22Capture.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1300073%22%20slang%3D%22en-US%22%3ERe%3A%20Running%20PSShutdown%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1300073%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F580104%22%20target%3D%22_blank%22%3E%40WWolfe-001%3C%2FA%3E%3C%2FP%3E%3CP%3EYou%20probably%20don't%20have%20the%20exe%20file%20in%20the%20same%20directory%20as%20the%20batch%20file.%3C%2FP%3E%3CP%3ETry%20using%20absolute%20path%20(e.%20g.%20C%3A%5CPSTools%5Cpsshutdown.exe%20or%20%5C%5Csomeserver%5CPSTools%5Cpsshutdown.exe)%20when%20you%20call%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22psshutdown%20scrshot.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F183736i8B0493C59AED02D7%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22psshutdown%20scrshot.png%22%20alt%3D%22psshutdown%20scrshot.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

When I try to run PSShutdown I get the following:  What am I doing wrong?  This is two line batch file.

Capture.JPG

1 Reply
best response confirmed by WWolfe-001 (Occasional Contributor)
Solution

@WWolfe-001

You probably don't have the exe file in the same directory as the batch file.

Try using absolute path (e. g. C:\PSTools\psshutdown.exe or \\someserver\PSTools\psshutdown.exe) when you call it.

 psshutdown scrshot.png