Jump to content

Recommended Posts

Posted

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

Posted
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.

  • Thanks 1
Posted

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!

  • Thanks 1
Posted

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.

  • Thanks 1
Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...