Re: Need Script to ferret out machines not in domain

Tech-Archive recommends: Fix windows errors by optimizing your registry

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


Date: Tue, 08 Jun 2004 11:15:33 +0200

Prodigus wrote:

> I have a primary domain that I work with daily but some genius who did a desktop rollout a couple of years back decided that instead of joining the machines to the NT4 domain (which took 2 minutes too long for them) that they would just join them to a workgroup instead. Ok, no harm BUT they chose to name the workgroup the same name as the domain.
>
> So now I need to find a way to figure out what all machines are still in the workgroup and not in the domain yet so that I can get them into the domain. Actually a script that could do that as well would be sweet but if I could just start with a list it would be wonderful.
>
> I tried the scriptomatic and it had things in it that would tell me about the local machine but if I change the "." to say "FA25436" it doesn't return anything. If i'm needing to add credentials I don't see where I would do that..
Hi

For WMI, you can connect connect with explicit user credentials
using SWbemLocator.ConnectServer.

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/community/scriptcenter/default.mspx


Relevant Pages

  • 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 Access
    ... For WMI, you can connect 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: 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: Huge WMI / DCOM / Security problem..
    ... question in multiple newsgroups. ... Microsoft Online Partner Support ... | The WMI is not working becouse of i get "access Denied". ... | Event Source: WinMgmt ...
    (microsoft.public.windows.server.general)
  • RE: Huge WMI / DCOM / Security problem..
    ... question in multiple newsgroups. ... Microsoft Online Partner Support ... | The WMI is not working becouse of i get "access Denied". ... | Event Source: WinMgmt ...
    (microsoft.public.windows.group_policy)