Compartir a través de


IIsWebService.QueryGroupIDStatus (WMI)

The QueryGroupIDStatus method returns an array of strings containing the ApplicationNames in the ApplicationDependencies metabase property that depend on a given GroupID.

Note

This method is only available on IIS 6.0 or later.

QueryGroupIDStatus(
      string GroupID,
      string Applications[]
)

Parameters

  • GroupID
    [in] String containing the group name. In other words, the second token in the ApplicationDependencies metabase property, which is also the fourth token in the WebSvcExtRestrictionList metabase property.

  • Applications
    [out] String containing the buffer for an array of names of applications that are dependent upon the group name.

Return Values

This method has no return values.

Example Code

The following example shows you how to use the VBScript programming language to display the Web service extension restriction list, display the application dependencies, list the available group identifiers, list the applications that are dependent upon ASP, and state if ASP is enabled or disabled.

Dim aWebSvcExtRestrictionList 
Dim aApplicationDependencies 
Dim aExt 
Dim sExt 
Dim sTest 
aExt = Array() 
aWebSvcExtRestrictionList = Array() 
aApplicationDependencies = Array() 
Set providerObj = GetObject("winmgmts://localhost/root/MicrosoftIISv2") 
Set IIsWebServiceObj = providerObj.Get("IIsWebService='W3SVC'") 
Set IIsWebServiceSettingObj = providerObj.Get("IIsWebServiceSetting='W3SVC'") 

' Obtain the value of the Web service extension restriction list property. 
aWebSvcExtRestrictionList = IIsWebServiceSettingObj.WebSvcExtRestrictionList 

WScript.Echo 
WScript.Echo "WebSvcExtRestrictionList property:" 
' For each extension record, 
For Each i in aWebSvcExtRestrictionList 
  WScript.Echo(i.Access & "," & i.FilePath & "," & i.ServerExtension & "," & i.Deletable & "," & i.Description) 
Next 

' Store original value: 
aApplicationDependencies = IIsWebServiceSettingObj.ApplicationDependencies 

WScript.Echo 
WScript.Echo "ApplicationDependencies property:" 
' For each extension record, 
For Each i in aApplicationDependencies 
  WScript.Echo(i.AppName & "," & i.Extensions) 
Next 

WScript.Echo 
WScript.Echo "ListWebServiceExtensions method:" 
IIsWebServiceObj.ListWebServiceExtensions aExt 
For ValueIndex = 0 To UBound(aExt) 
  WScript.Echo aExt(ValueIndex) 
Next 

WScript.Echo 
WScript.Echo "QueryGroupIDStatus of ASP" 
IIsWebServiceObj.QueryGroupIDStatus "ASP", aExt 
For ValueIndex = 0 To UBound(aExt) 
  WScript.Echo aExt(ValueIndex) 
Next 

WScript.Echo 
' For each extension record, 
For Each i in aWebSvcExtRestrictionList 
  If ( 0 < (InStr(i.FilePath, "asp.dll")) ) Then 
If ("0" = i.Access) Then  
WScript.Echo "ASP is disabled" 
Elseif ("1" = i.Access) Then  
WScript.Echo "ASP is enabled" 
Else  
WScript.Echo "ASP is set to an unexpected value" 
End If 
  End If 
Next 

Requirements

Server: Requires or Windows Server 2003.

Product: IIS

See Also

Concepts

IIsWebService (WMI)

Using WMI to Configure IIS

WebSvcExtRestrictionList

ApplicationDependencies

Adding Web Service Extensions to the Restriction List

Installing and Uninstalling CGI and ISAPI Extensions