Terminal services application server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Want to login to another Windows XP host and start some Windows services on it. e.g. a database server.

How do I acomplish this? Do not want to interrupt any Windows XP login sessions in progress.
 
You cant use Remote Desktop if you do not want to interrupt any login
sessions in progress but you can use the XP admin tools remotely or
start the service using a script

To start service remotely using CP admin tools:
Rightclick "My computer" , select Manage.
Rightclick "Computer Management (Local)" and select Connect to another
computer

To start a service (telnet) remotely using wmi script

strComputer = "AnotherComputerName"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set colServiceList = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name='tlntsvr'")
For Each objService in colServiceList
errReturn = objService.StartService()
Next


To start a service (iisadmin) and all its depency services remotely
using wmi script (from Microsoft Script center)

strComputer = "AnotherComputerName"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set colServiceList = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name='iisadmin'")
For Each objService in colServiceList
errReturn = objService.StartService()
Next
Wscript.Sleep 60000
Set colServiceList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Service.Name='iisadmin'} WHERE " _
& "AssocClass=Win32_DependentService Role=Antecedent" )
For Each objService in colServiceList
objService.StartService()
Next


regards
Johan Arwidmark

Windows User Group - Nordic
http://www.wug-nordic.net
 
Back
Top