Share via


IFPCSystemPolicyConfigGroup::Enabled property

Applies to: desktop apps only

The Enabled property gets or sets a Boolean value that indicates whether the rules of the configuration group are enabled.

This property is read/write.

Syntax

HRESULT put_Enabled(
  VARIANT_BOOL fEnabled
);

HRESULT get_Enabled(
  VARIANT_BOOL *pfEnabled
);
' Data type: Boolean

Property Enabled( _
  ByVal fEnabled As VARIANT_BOOL, _
  ByVal pfEnabled As VARIANT_BOOL _
) As Boolean

Property value

Boolean value that indicates whether the rules of the configuration group are enabled.

Error codes

This property method returns S_OK if the call is successful; otherwise, it returns an error code.

Remarks

This property is typically read/write. However, it is read-only for instances of the FPCSystemPolicyConfigGroup object (IFPCSystemPolicyConfigGroup interface in C++) created with the Service parameter of the CreateConfigurationGroupInstance method of the FPCSystemPolicy object set to any of the following values:

  • fpcSystemPolicyConfigGroup_Passport
  • fpcSystemPolicyConfigGroup_VPN
  • fpcSystemPolicyConfigGroup_ConfigServer

The system policy rules that are members of a configuration group whose properties are represented by an instance of the FPCSystemPolicyConfigGroup object (IFPCSystemPolicyConfigGroup interface in C++) created with the Service parameter set to any of these values cannot be enabled or disabled through this property.

The default value of this property for each configuration group is set during Setup.

Examples

This VBScript code example enables the system policy rules in the Scheduled Download Jobs system policy configuration group if they are not enabled.

' Define the enumeration value needed.
Const fpcSystemPolicyConfigGroup_Prefetcher = 12
' Create the root object.
Dim root  ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
' Declare the other objects needed.
Dim tmgArray      ' An FPCArray object
Dim configGroup   ' An FPCSystemPolicyConfigGroup object
' Get a reference to the array object.
Set tmgArray = root.GetContainingArray()
' Create an instance of the sytem policy configuration
' group object for the Job Scheduler service.
Set configGroup = tmgArray.SystemPolicy.CreateConfigurationGroupInstance(fpcSystemPolicyConfigGroup_Prefetcher)
' If the Scheduled Download Jobs system policy configuration group
' is disabled, enable it.
If configGroup.Enabled = False Then
    WScript.Echo "Enabling system policy rules..."
    configGroup.Enabled = True
    configGroup.Save
End If
WScript.Echo "Done!"

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

IDL

Msfpccom.idl

DLL

Msfpccom.dll

See also

FPCSystemPolicyConfigGroup

 

 

Build date: 7/12/2010