API Reference
Class
GppPasswordScanner
Provides methods to locate cpassword attributes in Group Policy Preference XML files.
Inheritance
- Object
- GppPasswordScanner
Methods
public static IAsyncEnumerable<GppPasswordEntry> ScanAsync(String directoryPath, IEnumerable<String> searchPatterns = null, CancellationToken cancellationToken = null) #Returns:
IAsyncEnumerable<GppPasswordEntry>Asynchronously scans a directory recursively for XML files containing cpassword attributes.
Parameters
- directoryPath System.String
- Path to the directory.
- searchPatterns System.Collections.Generic.IEnumerable{System.String} = null
- Optional collection of search patterns. Defaults to "*.xml".
- cancellationToken System.Threading.CancellationToken = null
- Token to cancel the operation.
Returns
Asynchronous collection of discovered entries.
public static IEnumerable<GppPasswordEntry> ScanDirectory(String directoryPath, IEnumerable<String> searchPatterns = null) #Returns:
IEnumerable<GppPasswordEntry>Scans a directory recursively for XML files containing cpassword attributes.
Parameters
- directoryPath System.String
- Path to the directory.
- searchPatterns System.Collections.Generic.IEnumerable{System.String} = null
- Optional collection of search patterns. Defaults to "*.xml".
Returns
Collection of discovered entries.
public static IEnumerable<GppPasswordEntry> ScanFile(String filePath, Stream stream = null) #Returns:
IEnumerable<GppPasswordEntry>Scans a single XML file for cpassword attributes.
Parameters
- filePath System.String
- Path to the XML file.
- stream System.IO.Stream = null
- Optional XML stream for offline files.
Returns
Collection of discovered entries.
public static IEnumerable<GppPasswordEntry> ScanXml(String xml) #Returns:
IEnumerable<GppPasswordEntry>Scans an XML string for cpassword attributes.
Parameters
- xml System.String
- XML content.
Returns
Collection of discovered entries.