Re: Remote shutdown of a win2K pro machine

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 08/11/04


Date: Wed, 11 Aug 2004 12:08:16 +0200

Richard wrote:

> Is it possible to remotely shutdown a machine running win2K pro using any
> facilites in win2k pro rather than using PSShutdown from sysinternals.
Hi

With VBScript/WMI:

http://groups.google.com/groups?selm=OLQkdMaTEHA.1988%40TK2MSFTNGP12.phx.gbl

If you need to connect with explicit user credentials, use
SWbemLocator.ConnectServer instead of GetObject("winmgmts:...")

IWbemLocator::ConnectServer
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/iwbemlocator_connectserver.asp

Subject: Login with explicit username and password
Newsgroups: microsoft.public.win32.programmer.wmi
http://groups.google.com/groups?th=2b5bcad76f5debaa

Subject: ImpersoantionLevel other than impersonate
Newsgroups: microsoft.public.scripting.wsh
http://groups.google.com/groups?th=89ff50603f12dcfb

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx


Relevant Pages

  • Re: Need Script to ferret out machines not in domain
    ... For WMI, you can connect connect with explicit user credentials ... Newsgroups: microsoft.public.win32.programmer.wmi ... Subject: ImpersoantionLevel other than impersonate ...
    (microsoft.public.windows.server.scripting)
  • Re: WMI security, XP to XP
    ... I had put SP2 on the test Pc ... > Newsgroups: microsoft.public.win32.programmer.wmi ... > Subject: ImpersoantionLevel other than impersonate ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.win32.programmer.wmi)
  • Re: WMI security, XP to XP
    ... I suspect its one of the recompiled core> components in SP2. ... >> Newsgroups: microsoft.public.win32.programmer.wmi ... >> Subject: ImpersoantionLevel other than impersonate ... >> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.win32.programmer.wmi)
  • Re: Run remote process as currently logged in user
    ... >> whatever credentials I ran it from. ... > Newsgroups: microsoft.public.win32.programmer.wmi ... > Subject: ImpersoantionLevel other than impersonate ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.scripting.vbscript)
  • Re: Scripting remote WMI problem
    ... > You can connect with explicit user credentials (e.g. the local ... > Administrator account on the remote computer), ... > Subject: ImpersoantionLevel other than impersonate ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.windowsxp.general)