Re: how do I connect to a computer use WMI

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 01/16/05


Date: Sun, 16 Jan 2005 20:31:24 +0100

qq6367707 wrote:

> I have the remote computer's administrator Password, but
> I do not know how to write the string
Hi

You can connect with explicit user credentials (e.g. the local
Administrator account on the remote computer), using
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.co.uk/groups?th=2b5bcad76f5debaa

Subject: ImpersoantionLevel other than impersonate
Newsgroups: microsoft.public.scripting.wsh
http://groups.google.co.uk/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: 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)
  • Re: Remote shutdown of a win2K pro machine
    ... If you need to connect with explicit user credentials, ... Newsgroups: microsoft.public.win32.programmer.wmi ... Subject: ImpersoantionLevel other than impersonate ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.win2000.general)
  • Re: WMI security, XP to XP
    ... and then you will need to connect with explicit user credentials ... > 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: Restriction on running regedit.exe
    ... I created a new administrator account and tried to run regedit.exe from there and it worked! ... > (it could be from some spyware or parasite as well). ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.win2000.general)
  • Re: GPEDIT
    ... >>First thanks for the response. ... > Original Administrator Account Does Not Appear During Friendly Logon Method ... Microsoft MVP Scripting and WMI, ... Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windowsxp.security_admin)