Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making Connection To Server using WMI

Status
Not open for further replies.

JohnBoy2005

Programmer
Jul 12, 2005
117
GB
I'm trying to connect to my webserver using an asp\vbscript script

strComputer = "webserver"
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = objSWbemLocator.ConnectServer _
(strComputer, "root\cimv2", "test", "test")
objSWbemServices.Security_.ImpersonationLevel = 3

The following error is returned

"SWbemLocator error '80041064'

User credentials cannot be used for local connections"

The server doesnt have active directory installed, I'm trying to use WMI to create a new user.

Any ideas

John







 
Are you executing the script on the server or remotely?

I hope that helps.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
I'd try to use an HTA instead.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
An hta works fine on a windows server.

I hope that helps.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Sorry, I thought HTA's were for Apache Servers.

Can u point me in the right direction for some examples.

Cheers
 
I would recommend you download HTAOmatic from Microsoft.com.

I hope that helps.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Sorry I had the name wrong it is HTA HelpOmatic. This will help you build an HTA.


I hope that helps.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top