API Reference
Class
PolicySourceFactory
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
- Source type (LGPO, Registry, or OfflineUserHive).
- scope ADPlayground.Gpo.GpoLocal.PolicyScope
- Policy scope (Machine/User).
- userSid System.String = null
- Optional user SID for per-user LGPO path.
- userHivePath System.String = null
- Path to an offline user hive file (when using OfflineUserHive).
- computerName System.String = null
- 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.