Re: Finetuning: Remote Shutdown with WMI, some errors occur.



Joris van der Struijk wrote:
Addon:
Also we would like that a workstation that's locked is also shutdown by this
script. But i have no idea how to accomplice this.

[...]
objOperatingSystem.Win32Shutdown(SHUTDOWN)

Looking at
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_operatingsystem.asp>

I don't see how you could be any more forceful about shutting a machine
down. Maybe test out the shutdown.exe command and see if it can
shutdown a machine even if it's locked (check out the -f flag) You
could then call that from your script instead of the Win32Shutdown
method. I suspect that it probably calls similar methods under the
covers anyway so YMMV.

~Jason

--
.



Relevant Pages

  • Re: Me Too
    ... I did my testing of the script on my own XP ... Which could be tight on a server like SBS (though mine has never shown ... any service to take for a normal shutdown. ... this reg edit change made to a workstation would ...
    (microsoft.public.windows.server.sbs)
  • Re: Me Too
    ... >> script execution. ... >> Those are values I take to be milliseconds to shutdown delay. ... >> workstation than normal before the system interupts the process to ... >> if you ran the script on a local machine. ...
    (microsoft.public.windows.server.sbs)
  • RE: Finetuning: Remote Shutdown with WMI, some errors occur.
    ... Also we would like that a workstation that's locked is also shutdown by this ... script to shutdown all approx. ... Dim strBase, strFilter, strAttributes, strQuery, objRecordSet ... Const OpenAsDefault = -2 ...
    (microsoft.public.windows.server.scripting)
  • Re: VBscript that restart the domain comptuer
    ... If you have a shutdown script that cleans up the profiles, ... permissions can restart all computers in a list remotely. ... I have already VB script I ...
    (microsoft.public.windows.server.active_directory)
  • RE: Script or Other Method to Reboot
    ... > We need different privileges when using Shutdown command and shutdown the ... > that only administrator will use command to shutdown the computers. ... > we may need to compile the script. ...
    (microsoft.public.windowsxp.configuration_manage)