|
-
Apr 10th, 2001, 08:03 AM
#1
Thread Starter
Junior Member
In the following source I want the Host Server1 replace by an inputbox variable. How do I do that???
for each Service in
GetObject("winmgmts:{impersonationLevel=impersonate}!//Server1").Instan
cesOf ("Win32_service")
WScript.Echo Service.DisplayName
Next
Thnx.....
HansZ
-
Apr 10th, 2001, 08:36 AM
#2
Thread Starter
Junior Member
Here is the solution, I have found it meanwhile somewhere else:
MyServer = inputbox("Enter Servername")
set computerobj = getobject("WinNT://" + MyServer)
ComputerObj.Filter = Array("Service")
For Each Service in ComputerObj
WScript.Echo "Service display name = " & Service.DisplayName
WScript.Echo "Service account name = " & Service.ServiceAccountName
Next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|