Shutdown computer using GPO

T

tp

HI

I am looking for soultion to Shutdown Domain computer after Hour by using GPO

Plese help

TP
 
M

Meinolf Weber

Hello TP,

You can create a scheduled task on the local workstation with shutdown.exe
Dependend on your hardware the machine will shutdown but not always power
off.

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm
 
M

Meinolf Weber

Hello TP,

We have done it with a startup script to create the scheduled task and copy
the shutdown.exe to the machines. When i am back in the office i can check
the script.

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm
 
M

Meinolf Weber

Hello Meinolf Weber,

;This adds the scheduled task
if not exist c:\winnt\tasks\at1.job at 05:00 /every:m,t,w,th,f,s,su shutdown.exe
/s /t 120 /c "Your text for the users" /f

;This will copy the shutdown.exe to the machines
if not exist c:\WINNT\system32\shutdown.exe copy "\\yourdomain\netlogon\shutdown.exe"
"c:\WINNT\system32\shutdown.exe"

Add this all to "shutdown.cmd" for example and run it as a startup script
under computer configuration

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm
 
T

tp

HI

Thanks for reply.

yes that will work and i have tested the script. Do you have any idea to How
to put programe shortcut in each machine start up using GPO.
 
M

Meinolf Weber

Hello TP,

With a user logon script:

;copy shortcut from netlogon to userprofile
if not exist "%UserProfile%\Start Menu\programs\yourprogram.lnk" copy "\\yourdomain\netlogon\yourshortcuts\yourprogram.lnk"
"%UserProfile%\Start Menu\programs\yourprogram.lnk"

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm
 
T

tp

HI

Thanks for your help
I have made test script. do you have an idea which command it goes to put
folling link "%UserProfile%\Start Menu\programs\yourprogram.lnk" . my script
looks like

<job id="test Id">

<script language="VBScript">

Dim ish,oshell, sDrive


set iSh = CreateObject("WScript.Shell")

iSh.Run "shutdown.exe -s"

ish.run "%UserProfile%\Start Menu\programs\startup\tmr.jpg"

</script>
</job>
please help

TP
 
T

tp

HI

Thannks for your help. i tried with shell script it does't work but it
works with normal .BAT file.

now i am tring to apply with gpo but it is not loading on client machine do
you know any reason. Also i have old style logon script applied to user
config in active directory.

please help

TP
 
T

tp

HI

script works thanks but it does not work with GPO. i have create BAT filr
for folliwng. when i apply through then copy file command does not work.

Tp
 
M

Meinolf Weber

Hello TP,

From the GPO this script will run, if the scheduled task dos not exist and
the shutdown.exe is missing. That's all. The shutdown itself has to run on
nthe client without GPO. So check with gpresult on the client if the script
is applied, also you can search for the .exe and under c:\winnt\tasks you
can find the entry. If the shutdown does not run check the task itself for
error number or also in the scheduled task logfile.

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top