Kaseya Community

Run Script when user logs on

  • Hi,

    I have created a script to restart the print spooler on a remote server, which works fine. I need assistants in getting the script to run when I logon onto a different server.

    Legacy Forum Name: Run Script when user logs on,
    Legacy Posted By Username: GClear
  • when you logon to server A, you want a script to run on server B?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Resistance2Fly
  • When I log onto Server A, I want a script I created to restart the print spooler on server B to run from server A

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: GClear
  • You can use psexec to accomplish this. Watch for sign-on events on Server A, and have the alarm action be to fire your script.

    Your script would then push psexec to Server A and execute two command lines like this:

    psexec \\ServerB -accepteula "net stop spooler"
    psexec \\ServerB -accepteula "net start spooler"


    PsExec can be found here: http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: arobar