T
terry@foldingspace.net
Guest
Hi,
I'm having an issue using WMI to stop/start a service.
I have two domains, domain1 and domain2, domain1 is where the user
account and the Desktop I'm currently using is located. Domain2 is
where the target Server is located.
The Desktop PC in domain1 is using Windows XP Pro SP2, the Server PC
in domain2 is using Windows Server 2003 SP2.
There is a two way trust setup between domain1 and domain2.
The user account in domain1 is a member of the Administrators group in
Domain2 and is also a local administrator on the Server PC.
On the Desktop in domain1 I'm running a powershell script that
retrieves the WMI object for a service and then attempts to stop it:
# Get IIS Service
$W3service = get-wmiobject win32_service -computername
$RemoteWebServer -filter "name='W3SVC'";
# stop the service.
$W3service.StopService();
but it gives us an error:
Exception retrieving member "StopService": "The RPC server is
unavailable. (Exception from HRESULT: 0x800706BA)"
At line:1 char:16
+ $W3.StopService( <<<< )
If this script is run from a PC in domain2 whilst logged on as the
user from domain1 it works fine.
We've checked that all firewalls are off and restarted both the
Desktop and Server after applying all permissions.
As a workaround we have switched to using:
sc \\servername stop servicename
Could anyone give us an insight into why this is happening?
Any clues or comments would be greatly appreciated
AndyJ
I'm having an issue using WMI to stop/start a service.
I have two domains, domain1 and domain2, domain1 is where the user
account and the Desktop I'm currently using is located. Domain2 is
where the target Server is located.
The Desktop PC in domain1 is using Windows XP Pro SP2, the Server PC
in domain2 is using Windows Server 2003 SP2.
There is a two way trust setup between domain1 and domain2.
The user account in domain1 is a member of the Administrators group in
Domain2 and is also a local administrator on the Server PC.
On the Desktop in domain1 I'm running a powershell script that
retrieves the WMI object for a service and then attempts to stop it:
# Get IIS Service
$W3service = get-wmiobject win32_service -computername
$RemoteWebServer -filter "name='W3SVC'";
# stop the service.
$W3service.StopService();
but it gives us an error:
Exception retrieving member "StopService": "The RPC server is
unavailable. (Exception from HRESULT: 0x800706BA)"
At line:1 char:16
+ $W3.StopService( <<<< )
If this script is run from a PC in domain2 whilst logged on as the
user from domain1 it works fine.
We've checked that all firewalls are off and restarted both the
Desktop and Server after applying all permissions.
As a workaround we have switched to using:
sc \\servername stop servicename
Could anyone give us an insight into why this is happening?
Any clues or comments would be greatly appreciated
AndyJ