Επεξεργασία

Κοινή χρήση μέσω


Group Policy API

Overview of the Group Policy API technology.

To develop Group Policy API, you need these headers:

For programming guidance for this technology, see:

Enumerations

 
INSTALLSPECTYPE

The INSTALLSPECTYPE enumeration values define the ways a group policy application can be specified to the InstallApplication function. The values are used in the Type member of INSTALLDATA.

Functions

 
BrowseForGPO

The BrowseForGPO function creates a GPO browser dialog box that allows the user to open or create a GPO.
CreateGPOLink

The CreateGPOLink function creates a link between the specified GPO and the specified site, domain, or organizational unit.
Delete

The Delete method deletes the GPO.
DeleteAllGPOLinks

The DeleteAllGPOLinks function deletes all GPO links for the specified site, domain, or organizational unit.
DeleteGPOLink

The DeleteGPOLink function deletes the link between the specified GPO and the specified site, domain, or organizational unit.
EnterCriticalPolicySection

The EnterCriticalPolicySection function pauses the application of policy to allow applications to safely read policy settings.
ExportRSoPData

The ExportRSoPData function exports a WMI namespace that contains RSoP information to a data file. The function writes the information to a data file that can be imported to a WMI namespace with a call to the ImportRSoPData function.
FreeGPOListA

The FreeGPOList function frees the specified list of GPOs. (ANSI)
FreeGPOListW

The FreeGPOList function frees the specified list of GPOs. (Unicode)
GetAppliedGPOListA

The GetAppliedGPOList function retrieves the list of GPOs applied for the specified user or computer. (ANSI)
GetAppliedGPOListW

The GetAppliedGPOList function retrieves the list of GPOs applied for the specified user or computer. (Unicode)
GetDisplayName

The GetDisplayName method retrieves the display name for the GPO. (IGPEInformation.GetDisplayName)
GetDisplayName

The GetDisplayName method retrieves the display name for the GPO. (IGroupPolicyObject.GetDisplayName)
GetDSPath

The GetDSPath method retrieves the Active Directory path for the specified section of the GPO.
GetDSPath

The GetDSPath method retrieves the Active Directory path to the root of the specified GPO section.
GetEventLogEntryText

The GetEventLogEntryText method returns the text for a specific entry in the event log.
GetFileSysPath

The GetFileSysPath method returns the file system path for the specified section of the GPO. The path is in UNC format.
GetFileSysPath

The GetFileSysPath method retrieves the file system path to the root of the specified GPO section. The path is in UNC format.
GetFlags

The GetFlags method retrieves information about the RSoP user interface session.
GetGPOListA

The GetGPOList function retrieves the list of GPOs for the specified user or computer. (ANSI)
GetGPOListW

The GetGPOList function retrieves the list of GPOs for the specified user or computer. (Unicode)
GetHint

The GetHint method retrieves the type of Active Directory object to which this GPO can be linked.
GetLocalManagedApplications

The GetLocalManagedApplications function can be run on the target computer to get a list of managed applications on that computer.
GetMachineName

The GetMachineName method retrieves the computer name of the remote GPO. This is the name specified by the OpenRemoteMachineGPO method.
GetManagedApplicationCategories

The GetManagedApplicationCategories function gets a list of application categories for a domain. The list is the same for all users in the domain.
GetManagedApplications

The GetManagedApplications function gets a list of applications that are displayed in the Add pane of Add/Remove Programs (ARP) for a specified user context.
GetName

The GetName method retrieves the unique name for the GPO. This value is usually a GUID.
GetName

The GetName method retrieves the unique GPO name.
GetNamespace

The GetNameSpace method retrieves the namespace from which the RSoP data is being displayed.
GetOptions

The GetOptions method retrieves the options the user has selected for the Group Policy Object Editor.
GetOptions

The GetOptions method retrieves the options for the GPO.
GetPath

The GetPath method retrieves the path to the GPO.
GetPropertySheetPages

The GetPropertySheetPages method retrieves the property sheet pages associated with the GPO.
GetRegistryKey

The GetRegistryKey method retrieves a handle to the root of the registry key for the specified section of the GPO.
GetRegistryKey

The GetRegistryKey method retrieves a handle to the root of the registry key for the specified GPO section.
GetType

The GetType method retrieves type information for the GPO being edited. (IGPEInformation.GetType)
GetType

The GetType method retrieves type information for the GPO being edited. (IGroupPolicyObject.GetType)
ImportRSoPData

The ImportRSoPData function imports a data file containing RSoP data to a WMI namespace. The file must be one generated by a call to the ExportRSoPData function.
InstallApplication

The InstallApplication function can install applications that have been deployed to target users that belong to a domain.
LeaveCriticalPolicySection

The LeaveCriticalPolicySection function resumes the background application of policy. This function closes the handle to the policy section.
New

The New method creates a new GPO in the Active Directory with the specified display name. The method opens the GPO using the OpenDSGPO method.
OpenDSGPO

The OpenDSGPO method opens the specified GPO and optionally loads the registry information.
OpenLocalMachineGPO

The OpenLocalMachineGPO method opens the default GPO for the computer and optionally loads the registry information.
OpenRemoteMachineGPO

The OpenRemoteMachineGPO method opens the default GPO for the specified remote computer and optionally loads the registry information.
PFNGENERATEGROUPPOLICY

The GenerateGroupPolicy callback function is an application-defined callback function that each policy extension must export when generating RSoP data in the planning mode.
PFNPROCESSGROUPPOLICY

The ProcessGroupPolicy function is an application-defined callback function used when applying policy.
PFNPROCESSGROUPPOLICYEX

The ProcessGroupPolicyEx function is an application-defined callback function used when applying policy.
PFNSTATUSMESSAGECALLBACK

The StatusMessageCallback function is an application-defined callback function used to display status messages when applying policy.
PolicyChanged

The PolicyChanged method informs the Group Policy Object Editor that policy settings have changed.
ProcessGroupPolicyCompleted

The ProcessGroupPolicyCompleted function notifies the system that the specified extension has finished applying policy.
ProcessGroupPolicyCompletedEx

The ProcessGroupPolicyCompletedEx function notifies the system that the specified policy extension has finished applying policy. The function also reports the status of Resultant Set of Policy (RSoP) logging.
RefreshPolicy

The RefreshPolicy function causes policy to be applied immediately on the client computer.
RefreshPolicyEx

The RefreshPolicyEx function causes policy to be applied immediately on the computer. The extended function allows you to specify the type of policy refresh to apply.
RegisterGPNotification

The RegisterGPNotification function enables an application to receive notification when there is a change in policy. When a policy change occurs, the specified event object is set to the signaled state.
RsopAccessCheckByType

The RSoPAccessCheckByType function determines whether a security descriptor grants a specified set of access rights to the client identified by an RSOPTOKEN.
RsopFileAccessCheck

The RSoPFileAccessCheck function determines whether a file's security descriptor grants a specified set of file access rights to the client identified by an RSOPTOKEN.
RsopResetPolicySettingStatus

The RSoPResetPolicySettingStatus function unlinks the RSOP_PolicySettingStatus instance from its RSOP_PolicySetting instance.
RsopSetPolicySettingStatus

The RSoPSetPolicySettingStatus function creates an instance of RSOP_PolicySettingStatus and an instance of RSOP_PolicySettingLink. The function links (associates) RSOP_PolicySettingStatus to its RSOP_PolicySetting instance.
Save

The Save method saves the specified registry policy settings to disk and updates the revision number of the GPO.
SetDisplayName

The SetDisplayName method sets the display name for the GPO.
SetOptions

The SetOptions method sets the options for the GPO.
UninstallApplication

The UninstallApplication function uninstalls a group policy application that handles setup and installation using Windows Installer .msi files.
UnregisterGPNotification

The UnregisterGPNotification function unregisters the specified policy-notification handle from receiving policy change notifications.

Interfaces

 
IGPEInformation

The IGPEInformation interface provides methods for Microsoft Management Console (MMC) extension snap-ins to communicate with the Group Policy Object Editor. For more information about MMC, see the Microsoft Management Console.
IGroupPolicyObject

The IGroupPolicyObject interface provides methods to create and modify a GPO directly, without using the Group Policy Object Editor.
IRSOPInformation

The IRSOPInformation interface provides methods for Microsoft Management Console (MMC) extension snap-ins to communicate with the main Resultant Set of Policy (RSoP) snap-in. For more information about MMC, see the Microsoft Management Console.

Structures

 
GPOBROWSEINFO

The GPOBROWSEINFO structure contains information that the BrowseForGPO function uses to initialize a GPO browser dialog box. After the user closes the dialog box, the system returns information about the user's actions in this structure.
GROUP_POLICY_OBJECTA

The GROUP_POLICY_OBJECT structure provides information about a GPO in a GPO list. (ANSI)
GROUP_POLICY_OBJECTW

The GROUP_POLICY_OBJECT structure provides information about a GPO in a GPO list. (Unicode)
INSTALLDATA

The INSTALLDATA structure specifies a group-policy application to be installed by InstallApplication.
INSTALLSPEC

The INSTALLSPEC structure specifies a group policy application by its user-friendly name and group policy GUID or by its file name extension. The Spec member of the INSTALLDATA structure provides this information to the InstallApplication function.
LOCALMANAGEDAPPLICATION

The LOCALMANAGEDAPPLICATION structure describes a managed application installed for a user or a computer. Returned by the GetLocalManagedApplications function.
MANAGEDAPPLICATION

The MANAGEDAPPLICATION structure contains information about an application. The function GetManagedApplications returns an array of MANAGEDAPPLICATION structures.
POLICYSETTINGSTATUSINFO

The POLICYSETTINGSTATUSINFO structure provides information about a policy-setting event.
RSOP_TARGET

The RSOP_TARGET structure contains computer and user information required by the GenerateGroupPolicy function.