Re: WMI Script, access denied?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx> wrote in
message news:%23xYPXrafJHA.1168@xxxxxxxxxxxxxxxxxxxxxxx

"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx> wrote in
message news:eTl29mafJHA.1248@xxxxxxxxxxxxxxxxxxxxxxx

"Linn Kubler" <lkubler@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23P94DDafJHA.3716@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I've got a little script here that I can use to get some information out
of a computer. This works fine with computers that are attached to my
domain but I can't get it to work with a computer that is not in my
domain but rather a workgroup. I get an Access Denied message. What is
different about accessing a workgroup computer and a domain computer?

Here's my code:
Const WbemAuthenticationLevelPktPrivacy = 6
strComputer = "chart553"
strUser = "workgroup\Julie"
strPassword = ""
Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objwbemLocator.ConnectServer _
(strComputer, strNamespace, strUser, strPassword)
objWMIService.Security_.authenticationLevel =
WbemAuthenticationLevelPktPrivacy

I've also tried strUser = "chart553\Julie"

Julie is the Administrator account name of this laptop and the account
does not have a password, the laptop boots straight to the desktop. It
is Windows XP Home, whereas the domain computers are XP Pro, could that
be the difference?

Thanks in advance,
Linn



I believe XP home does not have DCOM enabled, which is required for WMI
to connect remotely.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


Some time ago I did research and found the following rules:

1. You cannot connect to computer running XP Home.
2. An NT computer cannot connect to OS later than W2k.
3. A W2k3 computer cannot connect to Win9x.
4. To connect to W2k Server SP4 you must set impersonation level to
Impersonate.
5. W2k computers must have SP2 to connect to XP or above.
6. W2k3 can only connect to Win9x and NT if credentials supplied.
7. To connect to XP or W2k3 you must set authentication level to Pkt.

Number 7 may not be required, but it can't hurt either.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Yeah, seems like number 1 is what's getting me here. I'm working on running
scripts from the XP Home systems and pushing the collected data to my
system. I think this will have limited use for me but necessary, XP home is
definately the exception in my network.

Thanks,
Linn


.



Relevant Pages

  • Re: WMI Script, access denied?
    ... different about accessing a workgroup computer and a domain computer? ... (strComputer, strNamespace, strUser, strPassword) ... Hilltop Lab - http://www.rlmueller.net ... W2k3 can only connect to Win9x and NT if credentials supplied. ...
    (microsoft.public.windows.server.scripting)
  • Re: Common tasks of script developer
    ... domain computer, you want your drives mapped, your printers mapped, ... this became the logon script for desktop support. ... accounts created by script are always correct ...
    (microsoft.public.scripting.vbscript)
  • Re: Problem with Domain Computer account
    ... when started by login script. ... does the account have permissions to write a new ... file that Domain computer has full control included file that it copy ...
    (microsoft.public.windows.server.security)
  • Re: Change local Administrator account name?
    ... The script below should do the job against a remote domain computer ... as long as user running the script have administrator rights on it. ...
    (microsoft.public.scripting.vbscript)
  • Re: WMI Script, access denied?
    ... different about accessing a workgroup computer and a domain computer? ... (strComputer, strNamespace, strUser, strPassword) ... Julie is the Administrator account name of this laptop and the account ... the laptop boots straight to the desktop. ...
    (microsoft.public.windows.server.scripting)