RegistryPreference.Read Method (RegistryHive, String, String, PreferenceAction)


Reads all the Registry preference items that have the specified action that configure the specified registry value.

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


public ReadOnlyCollection<RegistryItem> Read(
    RegistryHive hive,
    string keyPath,
    string valueName,
    PreferenceAction action
ReadOnlyCollection<RegistryItem^>^ Read(
    RegistryHive hive,
    String^ keyPath,
    String^ valueName,
    PreferenceAction action
member Read : 
        hive:RegistryHive *
        keyPath:string *
        valueName:string *
        action:PreferenceAction -> ReadOnlyCollection<RegistryItem>
Public Function Read (
    hive As RegistryHive,
    keyPath As String,
    valueName As String,
    action As PreferenceAction
) As ReadOnlyCollection(Of RegistryItem)


  • valueName
    Type: System.String

    The name of the registry value. You can specify an empty string (“”) for the default value.

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<RegistryItem>

Returns ReadOnlyCollection<T>. A read-only collection of RegistryItem objects that contains the Registry preference items.

See Also

Read Overload
RegistryPreference Class
Microsoft.GroupPolicy Namespace

Return to top