DeleteAllGPOLinks function (gpedit.h)

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

Syntax

GPEDITAPI HRESULT DeleteAllGPOLinks(
  [in] LPOLESTR lpContainer
);

Parameters

[in] lpContainer

A value that specifies the path to the site, domain, or organizational unit, in ADSI format (LDAP://cn=user, ou=users, dc=coname, dc=com). You cannot specify a server name in this parameter.

Return value

If the function succeeds, the return value is S_OK. Otherwise, the function returns one of the COM error codes defined in the header file WinError.h.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header gpedit.h
Library Gpedit.lib
DLL Gpedit.dll

See also

CreateGPOLink

DeleteGPOLink

Group Policy Functions

Group Policy Overview