Jump to content

Shutdown remote Computer


nitron
 Share

Recommended Posts

Hy All,

I have a question.

I may have searched for the wrong phrases...

I need to to use a Shutdown comand on a remote Computer...

I normally do that via

shutdown /r /f /m \\HOSTPC /c "restart"

wich works quite fine!

But, and here is the Problem, this won't work for a Host, when done via sheduled Task!

It works if i start the bat file, from hand!

I know the Bat file is run for i simply added a test Batch wich is run.

The Problem is, i am not able to catch the error message, if there is one!

So i thought of using the Shutdown Command within Autoit!

But it seems it will only shut down the Computer it is startet on.

Is there a way to do this with any network PC?!

Thanks in advance!

Link to comment
Share on other sites

In the bat file you start via scheduled task pipe the output to a text file and see whats going wrong.

Missing permissions I suspect.

shutdown /r /f /m \\HOSTPC /c "restart" >>C:\temp\shutdown.txt

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

In the bat file you start via scheduled task pipe the output to a text file and see whats going wrong.

Missing permissions I suspect.

shutdown /r /f /m \\HOSTPC /c "restart" >>C:\temp\shutdown.txt

I tried to pipe it, but that does not work... for what reason, what so ever...

Its defninitivly not the Rights... I use the domain Admin... So that can't be the reason.

I hoped to get more infos using the error handle using AutoIT :-/

Link to comment
Share on other sites

Maybe this thread sheds some light on it.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...