Loading ...
Home » Spaces » Smart-UPS & Symmetra LX / RM » discussion » General » Cant get command file to run psshutdown to shutdown remote computer

Cant get command file to run psshutdown to shutdown remote computer

Discussion in Smart-UPS & Symmetra LX / RM started by Steve , 2/9/2018 8:26 PM
Login to follow, share, and participate in this space.
Not a member?Join now
  • derotam
    Steve
    Novice Novice
    Steve 2/9/2018 8:26 PM

    I know this question has been asked a bunch but I have a different scenario and it's not working...

    Ok so I have a Smart-UPS SRT 2200.  I have a computer(windows 7 enterprise) that has the APC Powerchute Business Agent, Server, and console on it.  The computer is connected to the UPS via USB and is not on a domain.

    I have the agent and server services set to interact with the desktop.

    Now, I am trying to have the UPS execute a command file to shut down the target machine("system1") that is running Windows 7 and is not on a domain.  In the command file I have the following command:

    @START "" "c:\blah blah\cmdfile\psshutdown.exe" -t 1 -k -f -u username -p password \\192.168.1.5

    If I run the command file myself, it works, but if I hit test through the web interface of the UPS it doesn't work and since there is no user feedback I don't know why.

    Other things to note... I can't install anything on the target machine because it boots from an image everytime that I cannot change.  The username and password I am using is a local account on the target machine.

    Any thoughts would be greatly appreciated

  • Brummi
    K
    New Member New Member
    K 2/9/2018 8:55 PM (in response to Steve)

    I have a similar problem: 2 PCs supplied by Smart-UPS X 3000, on one Power Chute software is installed. Testing a batch file like e.g.

    "shutdown /m \\PC2_Name /r" on the web interface of the UPS has no affect. Running the same batch file by starting it from the Admin-Account directly works fine. I also tried to configure the pbeagent.exe service in order to give it full permissions and checked "run as Administrator". What I found on one of the threads was a setting to allow desktop interference, but I didn't find that setting. I am using a Windows 10 Pro OS.

    I hope someone can help.

    Regards,

    Brummi 

  • wpasquil
    Bill
    =S= Representative
    Bill 2/12/2018 2:13 PM (in response to K)

    Hi,

    In earlier versions of Windows all services run in Session 0 along with applications. This situation poses a security risk. In Windows Vista, and later versions of Windows, the operating system isolates services in Session 0 and runs applications in other sessions. PowerChute Business Edition Agent is run in Session 0 so if a command file launches a .exe that .exe will be launched in Session 0 and not visible to the logged in users. To verify that the .exe has launched open Task Manager and review the list of Processes running. More information on Windows Session can be found at http://blogs.technet.com/b/askperf/archive/2007/04/27/application-compatibility-session-0-isolation.aspx

    Other users have found that creating a task that Windows will run when powering down allows for remote system shutdown. 

    See forum post http://forums.apc.com/spaces/7/ups-management-devices-powerchute-software/forums/general/3033/pcb-shutdown-command-file-doesn-t-execute

  • derotam
    Steve
    Novice Novice
    Steve 2/12/2018 3:31 PM (in response to Steve)

    Further information...

    My command file now runs the following:

    @start "" /B "C:\blah blah\cmdfiles\psshutdown.exe" -t 1 -k -f -u username -p password \\192.168.1.5 1>c:\mylogs\stderr.txt 2>c:\mylogs\stdout.txt

    In the stdout.txt log it says:

    -----------------

    Access is denied.

    Connecting to 192.168.1.5...       Couldn't access 192.168.1.5:

    If 192.168.1.5 is already performing a shutdown operation you must abort it before issuing a different command.

    -----------------

    That doesn't really answer anything to me but at least I know that the APC service seems to be running the command correctly.

  • derotam
    Steve
    Novice Novice
    Steve 2/12/2018 4:26 PM (in response to Bill)

    Your first link which I had already read doesn't really help me figure out what to do to fix the issue.

    I had to get my mind outside the box on the task scheduler idea which at this time looks like it might be a work around.  It still doesn't address how to get the APC agent to be able to do it itself which makes it a bit less involved to get set up.

    So I set up a task that runs a batch file that does:

    "C:\blah blah\cmdfiles\psshutdown.exe" -t 1 -k -f -u username -p password \\192.168.1.5

    Then I have APC running a .cmd file that does:

    @start "" c:\windows\system32\schtasks.exe /RUN /I /TN "ShutdownTest"

    Note: It didn't work for an unknown reason unless I had the /I flag.

    So this all seems to work but I shouldn't have to do it this way in the first place and would still like to know how to get it to work with the APC agent alone.

  • voidstar
    voidstar
    Expert Expert
    voidstar 2/12/2018 10:27 PM (in response to Steve)

    My guess is your copy of PowerChute is running as a user that does not have permission to shut down the remote system. This is described in FA159586 (link) -- see the red note -- and shows how to change the user PowerChute runs as.

  • Brummi
    K
    New Member New Member
    K 2/12/2018 11:06 PM (in response to voidstar)

    Voidstar you made my day! That was the solution! Thanks a lot.

  • derotam
    Steve
    Novice Novice
    Steve 2/13/2018 12:38 PM (in response to voidstar)
    On 2/12/2018 5:27 PM, voidstar said:

    My guess is your copy of PowerChute is running as a user that does not have permission to shut down the remote system. This is described in FA159586 (link) -- see the red note -- and shows how to change the user PowerChute runs as.

    Yep, I am aware of that, however, still a no go.  Since the target machine is not on the domain, and the controlling computer is, I created on the controlling computer a local account with the same user name and password as the account on the target machine.  It still did not work.

  • Page 1 of 1 (8 items)
Choose your language:  
powered by Communifire
Version 5.2.6420.11692