#85660 - 2002-06-20 03:43 PM
Re: HELP with Microsoft IIS/Proxy
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I use IIS Proxy because....... It was someone else's project which I inherited and am not allowed to change.
Brian
|
Top
|
|
|
|
#85662 - 2002-06-24 09:02 AM
Re: HELP with Microsoft IIS/Proxy
|
robbocop
Fresh Scripter
Registered: 2002-02-18
Posts: 5
Loc: Rome Italy
|
I would like to know how to check both if IIS is installed and if a web server is running.
|
Top
|
|
|
|
#85663 - 2002-06-24 06:58 PM
Re: HELP with Microsoft IIS/Proxy
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Here is a little script whipped up just for you.. (although I'm positive there is a UDF somewhere that basically does this):
code:
break on $cpname = "server" $domain = "domain" $service = "IISADMIN" $objcomp = GetObject("WinNT://$domain/$cpname,Computer") IF @error = 0 ;computer exists $obj=GetObject("WinNT://$domain/$cpname/$service,Service") If @error = 0 $service + " exists on the target PC." ? $scode = "unknown","stopped","start pending","stop pending","running","continue pending","pause pending","paused","error","unknown" $Status = $obj.status $Service+ " " + $scode[$status] + "." Else $Service + " does not exist on the target PC." ? Endif Else "Computer does not exist or is not available." Endif
You can get by with crossing into another domain to see if IISADMIN is installed as long as your administrator passwords match. However, you may have trouble finding out the status of the service unless you can authenticate properly on the domain in question. Essentially, this works best if you only run from the domain you're checking.
Brian
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 2366 anonymous users online.
|
|
|