API Reference
Class
PolFile
Minimal port of ADPlayground.GpoLocal.PolFile for registry.pol parse/serialize (no external deps).
Inheritance
- Object
- PolFile
Constructors
public PolFile() #Methods
public Void ClearKey(String key) #Returns:
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) #Returns:
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() #Returns:
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 Void ForgetValue(String key, String value) #Returns:
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) #Returns:
PolFileLoads a PolFile from the specified path.
Parameters
- path System.String
- Path to Registry.pol.
Returns
Parsed PolFile instance.
public Void Save(String path) #Returns:
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) #Returns:
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) #Returns:
BooleanInherited from Object
Parameters
- obj Object