Jump to content

Recommended Posts

Posted (edited)

Just out of interest really... and it's something basic that I guess I should already know.

 

Firstly, I have a scheduled task to shut down all ICT suite PCs at 15:30.

 

Secondly, this task is also enabled to be run 'on-demand'.

 

I have tried to run a remote 'shutdown.exe' but it fails with an error 'The entered computer name is not valid or remote shutdown is not supported on the target computer. Check the name and then try again or contact your system administrator.(53)'.

 

Not wanting to mess with 3rd party tools if I can help it, or registry settings, or services, as it isn't worth it. But I'm just sitting here wondering as I've turned them all on today to get updates sorted and things... is there a way I can use the 'on-demand' part of the scheduled task to demand they shut down now?

 

Googling is a bit of a rabbit hole for this kind of search unfortunately.

Edited by Koldov
Posted

If it's scheduled in windows task scheduler on the server (how I've had it set up before), then you should be able to just right click on the task and go "run now".

I guess Shutdown /m \\COMPUTERNAME /f /s is what's kicking out your error. Have you tried using the Shutdown /i interface?

Posted

USe a batch file running on your PC (or server) that calls the scheduled task ?

 

schtasks /Run [/s system [/u username [/P [password]]]] /TN taskname

 

Presuming the account running a cmd prompt is admin on the remote machines, the scheduled task is called "Daily Shutdown" then the following command should run the task on the remote computer "ExamplePC"

 

schtasks /Run /S ExamplePC /TN "Daily Shutdown"

 

It could be awkward to create the batch file, depending on how many PCs you need to run the task on ...

Posted
If it's scheduled in windows task scheduler on the server (how I've had it set up before), then you should be able to just right click on the task and go "run now".

I guess Shutdown /m \\COMPUTERNAME /f /s is what's kicking out your error. Have you tried using the Shutdown /i interface?

 

The scheduled tasks have been created on the remote computers with a GPP.

 

Yes it was the /i interface I was using and added all the relevant computers from the search function. It may be as I said that some registry settings for remote access, or services aren't running, or firewall port isn't open, as these are heavily locked down student computers.

 

It could be awkward to create the batch file, depending on how many PCs you need to run the task on ...

 

There are 30 computers in each suite and I usually only work on 1 suite at a time (so 30).

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