Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


WMI ConnectServer Problems

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1078
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> WMI ConnectServer Problems
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 WMI ConnectServer Problems - 6/22/2004 7:49:56 AM   
  Mallen

 

Posts: 2
Score: 0
Joined: 6/22/2004
From:
Status: offline
I'm new to scripting, and could use some help. I'm trying to retrieve
a list of services on a remote computer using WMI. Although I have gotten it to work on the server it's running on, I'm running into trouble now.

As far as I understand things, in order to do this on a remote computer, I need to supply an explicit username and password as ConnectServer arguments. However, After doing this, the code gives me an "access denied" error, even though I'm supplying the username and password of an account from the administrator group.

Not sure if this is relevant, but here's something of note about the
security logs on the target remote computer. The administrator set up
an account within the administrator group for me to use. However,
whenever I try to log on using that account via ConnectServer, the
security log shows a failed attempt by "SYSTEM". In addition, in the
details about the failed attempt, the correct username is listed. I
can't figure it out.

Here's a snippet of the code (with the username and password literals
replaced, of course).

Set wbemServices = CreateObject("WbemScripting.SWbemLocator")
Set wbemConnection = wbemServices.ConnectServer _ ("fnetserv","\root\cimv2","MyUsername","MyUserNameIsBusted")
wbemConnection.Security_.ImpersonationLevel = 3
Set wbemObjectSet = wbemConnection.ExecQuery("SELECT * FROM
Win32_Service")

Another topic of note was that in the security log, the authority
process was called "Microsoft something" (i forget now), whereas every
other process was NTLM. I figured this was the COM verifying and
determining proper authority from the network, so I wasn't worried
about it, but if I should specify exactly to use NTLM in
ConnectServer, can someone give me the exact literal to use?

Sorry for being longwinded, and thanks in advance for any help on
these issues!
 
 
Post #: 1
 
 Re: WMI ConnectServer Problems - 6/25/2004 3:42:14 AM   
  Mallen

 

Posts: 2
Score: 0
Joined: 6/22/2004
From:
Status: offline
Nevermind, I think I figured it out. Our business uses Novell, and regardless of having an admin account on the target machine, I believe Novell was disallowing access.

(in reply to Mallen)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> WMI ConnectServer Problems Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts