Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - access denied on a remote computer with winmgmts

Reply
 
Old 05-05-2009   #1 (permalink)
bmaurin


 
 

access denied on a remote computer with winmgmts

The following script is run on a Vista machine to manage a remote computer on
an active directory domain. An "Access denied " error occur. I precise that I
am connected as a domain administrator on the vista machine.
....
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & "a_computer_name" &
"\root\cimv2")
if err then
wscript.echo ligne(cpt) & " : " & err.description & VBCRLF
end if
....
Is there anybody to help me ?
Thanks

My System SpecsSystem Spec
Old 05-07-2009   #2 (permalink)
Alex K. Angelopoulos


 
 

Re: access denied on a remote computer with winmgmts

This should normally "just work", but it depends on a few things, such as
the remote machine also being a member of the same domain. Could you provide
the following added information?

(1) What is the error numeric? Try changing your error output to this:

WScript.Echo ligne(cpt),":", Hex(err.number), ":", err.description

This should give us the error number in hexadecimal form, which will be
easier to cross-check.

(2) The remote machine: what operating system and service pack level is it
running?

There are issues that may show up with various versions and configurations
of Windows on a domain. The above should help us focus on the right place to
look for the problem.

"bmaurin" <bmaurin@xxxxxx> wrote in message
news:8C48D985-1A8D-495D-9B97-BF10ACCFE55E@xxxxxx
Quote:

> The following script is run on a Vista machine to manage a remote computer
> on
> an active directory domain. An "Access denied " error occur. I precise
> that I
> am connected as a domain administrator on the vista machine.
> ...
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" & "a_computer_name" &
> "\root\cimv2")
> if err then
> wscript.echo ligne(cpt) & " : " & err.description & VBCRLF
> end if
> ...
> Is there anybody to help me ?
> Thanks
My System SpecsSystem Spec
Old 05-11-2009   #3 (permalink)
Malcolm McCaffery


 
 

Re: access denied on a remote computer with winmgmts

What OS is the remote machine?

1. If you are logged onto the Vista machine as a domain administrator, is
the remote machine also part of the same domain and is Domain Administrators
a member of the local administrators group on the remote machine. You can
use compmgmt.msc to connect to the remote computer to check this.

2. Any firewall enabled on remote computer?
3. Try connecting using wmic from command line:

C:\scripts>wmic
wmic:root\cli>/node:"a_computer_name"
wmic:root\cli>computersystem
AdminPasswordStatus AutomaticResetBo etc...
0 FALSE

wmic:root\cli>

Also refer to

4. From vista machine does command line :

net use \\a_computer_name\ipc$

work successfully?

You can also refer to

Troubleshoot WMI Related Issues in Windows XP SP2
http://support.microsoft.com/kb/875605/en-us

regards,

Malcolm.

"bmaurin" <bmaurin@xxxxxx> wrote in message
news:8C48D985-1A8D-495D-9B97-BF10ACCFE55E@xxxxxx
Quote:

> The following script is run on a Vista machine to manage a remote computer
> on
> an active directory domain. An "Access denied " error occur. I precise
> that I
> am connected as a domain administrator on the vista machine.
> ...
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" & "a_computer_name" &
> "\root\cimv2")
> if err then
> wscript.echo ligne(cpt) & " : " & err.description & VBCRLF
> end if
> ...
> Is there anybody to help me ?
> Thanks
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Access is denied ( to remote shared PC folder) Vista networking & sharing
Remote registry request access denied Vista security
Access is denied message when trying to access a remote printer Vista print fax & scan
Access is denied on one computer, no problem on a second one Vista General
Access Is Denied To One Computer, But Not The Other Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46