Home
»
Discussion Forums
»
Scripts & Agent Procedures
»
Run Script when user logs on
Subscribe via RSS
Share this
Similar Posts
Run script when user logs in
by
LegacyPoster
on
Jun 11, 2008
Running scripts when noone is logged in
by
LegacyPoster
on
Aug 5, 2008
Run script without user logged on
by
LegacyPoster
on
Dec 18, 2009
Option to wait until user logs in to run script?
by
cameramonkey
on
May 28, 2011
Verified Answer
Any issues with running scripts as Logged on User?
by
mmartin
on
Apr 27, 2011
Not Answered
View More
Details
3
Replies
0
Subscribers
Posted
over 11 years ago
Scripts & Agent Procedures
Run Script when user logs on
Posted by
LegacyPoster
on
Aug 22, 2008 10:18 PM
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
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
Posted by
LegacyPoster
on
Aug 23, 2008 12:52 AM
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
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
Posted by
LegacyPoster
on
Aug 25, 2008 6:29 PM
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 have posted to a forum that requires a moderator to approve posts before they are publicly available.
Posted by
LegacyPoster
on
Aug 25, 2008 8:34 PM
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
You have posted to a forum that requires a moderator to approve posts before they are publicly available.