G
Guest
Hi again.
I am writing a remote administration script and have run into a little
problem where I could use some help.
Error message: "SWbemLocator: The RPC server is unavailable."
I am using WBEMScripting.SWBEMLocator to connect to computers across several
subnets and domain/non-domain computers (NT/XP).
Computers:
C1 - domain\computer1 (subnet_1) XP SP2
C2 - domain\computer2 (subnet_1) XP SP2
C3 - domain\computer3 (subnet_2) XP SP2
I can connect and run script from C2 against C1 but I cannot run it from C3
against C1 (get RPC error). All computers have firewall enabled but i have
used gpedit to set the exception to remote administration IP-s of C2 and C3
(both domain and standard settings). Also all computers have WMI and RPC
services running.
As I see it either the problem is on machine C3 where I am missing some
settings or C1 needs some RPC settings tweeked. Is there a need to specify
IP-s to RPC if the subnet is different? Also I am using local administrator
accounts to log on to the computers as the script has to work across several
domain/non-domains/subnets.
The script I am using:
--------------------------------
compname = "Cad13"
Set locator = CreateObject("WBEMScripting.SWBEMLocator")
Set objWMIService = locator.ConnectServer(compname, "root/cimv2", _
"Cad13\accountname", "password")
objWMIService.Security_.ImpersonationLevel = 3
I am writing a remote administration script and have run into a little
problem where I could use some help.
Error message: "SWbemLocator: The RPC server is unavailable."
I am using WBEMScripting.SWBEMLocator to connect to computers across several
subnets and domain/non-domain computers (NT/XP).
Computers:
C1 - domain\computer1 (subnet_1) XP SP2
C2 - domain\computer2 (subnet_1) XP SP2
C3 - domain\computer3 (subnet_2) XP SP2
I can connect and run script from C2 against C1 but I cannot run it from C3
against C1 (get RPC error). All computers have firewall enabled but i have
used gpedit to set the exception to remote administration IP-s of C2 and C3
(both domain and standard settings). Also all computers have WMI and RPC
services running.
As I see it either the problem is on machine C3 where I am missing some
settings or C1 needs some RPC settings tweeked. Is there a need to specify
IP-s to RPC if the subnet is different? Also I am using local administrator
accounts to log on to the computers as the script has to work across several
domain/non-domains/subnets.
The script I am using:
--------------------------------
compname = "Cad13"
Set locator = CreateObject("WBEMScripting.SWBEMLocator")
Set objWMIService = locator.ConnectServer(compname, "root/cimv2", _
"Cad13\accountname", "password")
objWMIService.Security_.ImpersonationLevel = 3