mirror of
https://github.com/MichaelGrafnetter/DSInternals
synced 2025-01-31 03:01:38 +00:00
28 lines
851 B
C#
28 lines
851 B
C#
namespace DSInternals.PowerShell.Commands
|
|
{
|
|
using System;
|
|
using System.Management.Automation;
|
|
using DSInternals.Common;
|
|
using DSInternals.Common.Cryptography;
|
|
using DSInternals.DataStore;
|
|
|
|
[Cmdlet(VerbsCommon.Get, "ADDBKdsRootKey")]
|
|
[OutputType(typeof(DSInternals.Common.Data.KdsRootKey))]
|
|
public class GetADDBKdsRootKeyCommand : ADDBCommandBase
|
|
{
|
|
// TODO: Add optional Guid parameter
|
|
|
|
protected override void BeginProcessing()
|
|
{
|
|
base.BeginProcessing();
|
|
using(var directoryAgent = new DirectoryAgent(this.DirectoryContext))
|
|
{
|
|
foreach(var rootKey in directoryAgent.GetKdsRootKeys())
|
|
{
|
|
this.WriteObject(rootKey);
|
|
}
|
|
}
|
|
// TODO: Exception handling
|
|
}
|
|
}
|
|
} |