Sign in to follow this  
Followers 0
nitron

Shutdown remote Computer

5 posts in this topic

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!

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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 :-/

Share this post


Link to post
Share on other sites

Maybe this thread sheds some light on it.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Maybe this thread sheds some light on it.

Sorry not really...

Ther Server only has one IP and i use the DNS Name...

I gues, i have to come up with something else! ;)

Thanks for your try to help!

Share this post


Link to post
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
Sign in to follow this  
Followers 0