The GetSecurityMode method returns a BOOL specifying whether NT authentication is the configured mode for the service instance. TRUE means that NTLM is set to handle authentication and credentials issuance. FALSE means that a Site Server Authentication server instance is set to handle authentication and credentials issuance.
IDL Definition
HRESULT GetSecurityMode(
BSTR bszServiceName,
LONG lVirtServId,
[out, retval] BOOL *pbNTSecurity
);
Parameters
bszServiceName
the name of the service.
lVirtServId
the virtual server instance identifier
pbNTSecurity
on return, the address of a BOOL variable. The value is TRUE if NT authentication is set for this service's instance. FALSE means Membership Authentication is set for this service's instance.
Return Value
a standard HRESULT value
Example
Set ObjCreator = CreateObject("ObjCreator.ObjCreator.1")
Set MemServers = ObjCreator.CreateObjAuth("MemAdmin.BrokServers.1")
call MemServers.GetSecurityMode("W3SVC",1,fIsNTMode)
If fIsNTMode Then
wscript.echo "IIS Instance 1: NTLM for auth"
Else
wscript.echo "IIS instance 1: Site Server Auth"
End If