RegistryPolicy.DeleteAllValuesUnderneathKey Method (RegistryHive, String)

 

Deletes any registry-based policy settings that are configured for first-level values under the specified registry key from the Group Policy object (GPO).

Namespace:   Microsoft.GroupPolicy
Assembly:  Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)

Syntax

public void DeleteAllValuesUnderneathKey(
    RegistryHive hive,
    string keyPath
)
public:
void DeleteAllValuesUnderneathKey(
    RegistryHive hive,
    String^ keyPath
)
member DeleteAllValuesUnderneathKey : 
        hive:RegistryHive *
        keyPath:string -> unit
Public Sub DeleteAllValuesUnderneathKey (
    hive As RegistryHive,
    keyPath As String
)

Parameters

Exceptions

Exception Condition
ObjectDisposedException

The RegistryPolicy is disposed.

InvalidOperationException

The RegistryPolicy instance is read-only.

ArgumentNullException

keyPath is null

ArgumentException

keyPath is an empty string (“”)

-or-

hive is not CurrentUser or LocalMachine

See Also

RegistryPolicy Class
Microsoft.GroupPolicy Namespace

Return to top