API Reference
PolFile
Minimal port of ADPlayground.GpoLocal.PolFile for registry.pol parse/serialize (no external deps).
Inheritance
- Object
- PolFile
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method PolFile.Load
Constructors
public PolFile() #Methods
public Void ClearKey(String key) #VoidMarks all values under the given key for deletion via LGPO semantics.
Parameters
- key System.String
- Registry key path (no hive).
public Void DeleteValue(String key, String value) #VoidMarks a specific value for deletion via LGPO semantics.
Parameters
- key System.String
- Registry key path (no hive).
- value System.String
- Registry value name.
public IEnumerable<ValueTuple<String, String, RegistryValueKind, Object>> Enumerate() #IEnumerable<ValueTuple<String, String, RegistryValueKind, Object>>Enumerates policy entries as tuples of key, value, kind and data.
Returns
Sequence of entries contained in the file.
public IEnumerable<ValueTuple<String, String, RegistryValueKind, Object>> EnumerateRaw() #IEnumerable<ValueTuple<String, String, RegistryValueKind, Object>>Enumerates all policy entries, including LGPO delete markers such as **del.*.
Returns
Sequence of raw entries contained in the file.
public Void ForgetValue(String key, String value) #VoidRemoves a value and any pending deletion markers from the in‑memory map without writing to disk.
Parameters
- key System.String
- Registry key path (no hive).
- value System.String
- Registry value name.
public static PolFile Load(String path) #PolFileLoads a PolFile from the specified path.
Parameters
- path System.String
- Path to Registry.pol.
Returns
Parsed PolFile instance.
public Void Save(String path) #VoidSaves the current contents to the specified path.
Parameters
- path System.String
- Destination path for Registry.pol.
public Void SetValue(String key, String value, Object data, RegistryValueKind kind) #VoidAdds or replaces a policy value.
Parameters
- key System.String
- Registry key path (no hive).
- value System.String
- Registry value name.
- data System.Object
- Data to store.
- kind Microsoft.Win32.RegistryValueKind
- Registry value kind.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object