Hi all!
Got a dumb question on WMI. Tried to find the answer on the net but got confused even deeper.
I got 2 comps that are NOT part of a domain. They are connected between each other with net cable and are in the same workgroup.
I have created the same user account that is part of Admin group on both computers.
Can i run this script without having a domain set up?
I am confused because Microsoft says "The account on Computer B must be in the Administrator group, but a domain account is not required."
(http://msdn.microsoft.com/en-us/library/aa389290(VS.85).aspx)
Giving a similar script as an example
Thank you
Got a dumb question on WMI. Tried to find the answer on the net but got confused even deeper.
I got 2 comps that are NOT part of a domain. They are connected between each other with net cable and are in the same workgroup.
I have created the same user account that is part of Admin group on both computers.
Can i run this script without having a domain set up?
Code:
strComputer = "comp-a"
On Error Resume Next
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\CIMV2")
If Err.Number <> 0 Then
WScript.Echo Err.Number & ": " & Err.Description
WScript.Quit
End If
Set objSoftware = objWMIService.Get("Win32_Process")
If Err.Number <> 0 Then
WScript.Echo Err.Number & ": " & Err.Description
WScript.Quit
End If
Res = objSoftware.Create("notepad.exe", Null, Null, PID)
If Err.Number <> 0 Then
WScript.Echo Err.Number & ": " & Err.Description
WScript.Quit
End If
MsgBox "OK"
I am confused because Microsoft says "The account on Computer B must be in the Administrator group, but a domain account is not required."
(http://msdn.microsoft.com/en-us/library/aa389290(VS.85).aspx)
Giving a similar script as an example
Thank you