has Posted October 1, 2011 Posted October 1, 2011 Hi All. I would appreciate if someone could help me out. I have been searching this forum, looking for a shutdown script that would import computer names from a text file and if the computer is logged off, will shutdown and if someone is logged in will leave it alone. I am new to creating scripts. Thanks in advance. Has
sjatkn Posted October 1, 2011 Posted October 1, 2011 Hi All. I would appreciate if someone could help me out. I have been searching this forum, looking for a shutdown script that would import computer names from a text file and if the computer is logged off, will shutdown and if someone is logged in will leave it alone. Psshutdown from SysInternals suite will take a text file and shut machines down. It won't ignore machines where a user is logged on. You could just use a long timeout and give users the ability to cancel the shutdown. This is what I do at the end of the day, this also performs a shutdown if the user left without logging off. You could also use FOG, it has a log off if idle and a shutdown after a predetermined time after logoff. Not scripted but configurable. Needs some configuring and requires a Linux server running FOG. FOG is normally used as an imaging system. 1
Michael Posted October 2, 2011 Posted October 2, 2011 Not exactly what you want, but you can (as I do) create a Scheduled Task in 2008 R2 under Computer Config: Name: Shutdown Workstations Run: %SystemRoot%\System32\Shutdown.exe Arguments: -f -s -t 120 Specify an admin username/password, then change the schedule as required to 6pm for example. Users will receive a 2 minute warning and will then shutdown automatically. Enough time to save documents and close any applications (optional). In theory you could have many shutdown schedules for different departments or OUs from your perspective. This works with Windows 7, but it should work with Windows XP and Vista too. I don't think 2000 had a shutdown.exe! 1
meastaugh1 Posted October 2, 2011 Posted October 2, 2011 BeyondExec will do what you asked for. For instance this command will shutdown all computers listed in the file room1.txt that are not logged on. beyondexec.exe -g room1.txt -d Shutdown -l 1 -f -n Computer names in the text file should each be on a separate line. 1
speckytecky Posted October 3, 2011 Posted October 3, 2011 All new to me - hence the thanks given. Which is the easiest - if that's not a neg rep question!!
cpjitservices Posted October 3, 2011 Posted October 3, 2011 Download Desktop Central Free Windows Tools from Manage engine it has shutdown/restart and GP Update and Wake up tools in there and a few others that re life savers - use it daily here. take a look here: Free Windows Tools from Desktop Central - Wake on LAN Tool | GPO Update Tool | Shutdown / Restart Tool | Software Inventory Tool | Join/Unjoin Computer Tool Like I say - a life saving piece of software!
cpjitservices Posted October 3, 2011 Posted October 3, 2011 Features: Free Tools Remote Task Manager -- Wake On LAN -- Software Inventory Remote Command Prompt -- GPO Update -- Shutdown/Restart Join/Unjoin Computer -- Currently Logged On User -- Hard Disk Space Monitor Local User/Group List -- Network Share Browser -- Laptop Battery Power Monitor
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now