TestimoX

API Reference

Class

PolicySourceFactory

Namespace ADPlayground.Gpo.GpoLocal
Assembly ADPlayground
Modifiers static

Central factory for creating policy sources used by cmdlets and other hosts.

Inheritance

  • Object
  • PolicySourceFactory

Methods

public static ValueTuple<IPolicySource, IDisposable> Create(PolicyDataSource dataSource, PolicyScope scope, String userSid = null, String userHivePath = null, String computerName = null) #
Returns: ValueTuple<IPolicySource, IDisposable>

Creates a policy source for the given location. Disposes the returned handle when done.

Parameters

dataSource ADPlayground.Gpo.GpoLocal.PolicyDataSource requiredposition: 0
Source type (LGPO, Registry, or OfflineUserHive).
scope ADPlayground.Gpo.GpoLocal.PolicyScope requiredposition: 1
Policy scope (Machine/User).
userSid System.String = null optionalposition: 2
Optional user SID for per-user LGPO path.
userHivePath System.String = null optionalposition: 3
Path to an offline user hive file (when using OfflineUserHive).
computerName System.String = null optionalposition: 4
Remote computer name for Registry source; null for local.

Returns

Tuple of the created policy source and an optional disposable handle to close when finished.