WMI Script to use in WorkGroup

Hi,

I have issues running WMI scripts on Remote Computer.

this computer is not on domain - It just has seperate workgroup - but can be accessed via domain.

I always get rpc error - I have checked for rpc services they are running.

Now I am all gone for toss on how to use it on workgroup.

Thank you in advace.

Amit

strComputer = "some_computer" 
strDomain = "some_domain"  ' unused
 
Wscript.StdOut.Write "Please enter your user name:"
strUser = Wscript.StdIn.ReadLine 
Set objPassword = CreateObject("ScriptPW.Password")
Wscript.StdOut.Write "Please enter your password:"
strPassword = objPassword.GetPassword()
 
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = objSWbemLocator.ConnectServer(strComputer, _
    "root\cimv2", _
     strUser, _
     strPassword, _
     "MS_409", _
     "ntlmdomain:" + strDomain)
Set colSwbemObjectSet = _
    objSWbemServices.ExecQuery("Select * From Win32_Process")
For Each objProcess in colSWbemObjectSet
    Wscript.Echo "Process Name: " & objProcess.Name 
Next

Open in new window

LVL 4
amit_panjwaniAsked:
Who is Participating?
 
RobSampsonConnect With a Mentor Commented:
Yeah, I think you need to be able to connect "manually" somehow, whether you browse to
\\REMOTEPC\Share

or something, and then perhaps try those credentials when using
Net Use \\REMOTEPC\Share

and then move on to PSExec connection....maybe you can nut something out there....

Regards,

Rob.
0
 
RobSampsonCommented:
Hi there, see if the code here helps:
http://www.experts-exchange.com/Programming/Languages/Q_23983182.html

You can try using DOMAIN\Username or REMOTEPC\Username credentials to connect.

You may have WMI issues as well....you can try running the WMI Diagnostic tool on that remote machine (run it locally).

Regards,

Rob.
0
 
amit_panjwaniAuthor Commented:
Thank you for responding!

I was aware of WMI diagnostics. But Server doesnt has internet access. We have very limited options of checking a few other options.

Good day.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
amit_panjwaniAuthor Commented:
I did work on that - That did not help - Error remains same.

Any other ideas ?
0
 
RobSampsonCommented:
Hi there.  Sorry for my delay. I'm in the middle of a huge project and am very short of time.  Did you try all the code in the other post?  There's a couple of variations that worked for me.  Did you try to connect using
REMOTEPC\Administrator
and
DOMAIN\Administrator
accounts?

Is it possible to copy the WMI Diagnostic Tool to the affected server with a USB stick, or by browsing to a share on it (using credentials that allow you to connect)?  Try to run to make sure that WMI is not an issue.

If you want to continue to trouble-shoot this, I can object to the deletion of the question.

Regards,

Rob.
0
 
amit_panjwaniAuthor Commented:
Thank you for taking time to help me on this !
I appreciate effort.

As far as administrator account goes - I do have Administrator Equivalent Access (No Access to Admin account) - But being  Server Administrator - I can do whatever.

USB Stick - A Strict no.

Using A share - Yup - I am working on that (that idea was already suggested by one of the other team members - It came on EE after 4 days - So I have my valid reasons for deleting question - when nothing really comes up - no questions - no answers - no suggestions- no hints - All I get is a single response in 4 days)

Its pretty obvious I cannot just sit back and relax and wait for answers/suggestions/any hints coming in.

One of the other suggestions I  was able to use is wbemtest.exe   - I am still checking that.

I will also try to bring server to all default state - If that helps me. There are a couple of other things I might check but none of them came from Experts Exchange - for example - disabling all firewalls,anti viruses, recreating user account - verifying that it worked on local machine, We could ping the system from remote hosts - (Both by name and IP address), all required services were rechecked - Service accounts too were re verified - service dependencies too were checked - their accounts too were reverified - if there were any issues.

I might be able to resolve the problem by myself in about a day.


Regards,

Amit
0
 
RobSampsonCommented:
Hi Amit,

I understand your frustration with the lack of response to your question here.  It is unfortunate that you only have one expert involved.  Perhaps part of the problem is that you only have the question posted in one zone (VBScript), and that maybe (at least to start with) this is not really a VBScript issue at all....

To be honest, I had made the assumption that you were already able to connect to the administrative share of the C Drive on the non-domain computer, from a domain computer, which now appears to not be the case.  Therefore, it might be best to post this in the Windows Server zones to get some more technical minds onto it.  My feeling is that you need to resolve the "manual" connectivity issues first.  I'm not very good at this stuff beyond disabling the firewall and connecting to <REMOTEPC>\C$ with the REMOTEPC\Administrator and password credentials, so I may not be able to help you much further....

Also, please remember that the Experts are volunteers, and may not always have time to respond immediately to your replies.

So, in an effort to try to obtain more help with your issue, I suggest you post another question in the Windows Server zones.

Good luck with it, let me know what you find out.

Regards,

Rob.
0
 
amit_panjwaniAuthor Commented:
Hi Rob,


@To be honest, I had made the assumption that you were already able to connect to the administrative share of the C Drive on the non-domain computer, from a domain computer, which now appears to not be the case.  Therefore, it might be best to post this in the Windows Server zones to get some more technical minds onto it.  My feeling is that you need to resolve the "manual" connectivity issues first.  I'm not very good at this stuff beyond disabling the firewall and connecting to <REMOTEPC>\C$ with the REMOTEPC\Administrator and password credentials, so I may not be able to help you much further....


Actually you were right when you assumed this. However - We make sure we do not share C$ for security reasons. We always had our own generic administrative share/repository for Server maintenance tools.

We were planning something different - albeit a dedicated share for given issue in order to isolate given issue.  

I cannot Thank you much for time though!

Good day/Night.

Regards,

Amit
0
 
amit_panjwaniAuthor Commented:
Hi Rob,

Thank you very much !



Regards,

Amit
0
 
RobSampsonCommented:
Oh cool. Thanks for the grade.....what did you end up doing to sort it out?

Regards,

Rob.
0
All Courses

From novice to tech pro — start learning today.