mirror of
https://github.com/MAKS-IT-COM/maksit-certs-ui.git
synced 2026-06-10 08:36:40 +02:00
20 lines
527 B
C#
20 lines
527 B
C#
using System.Management.Automation;
|
|
|
|
namespace MaksIT.CertsUI.Client.PowerShell;
|
|
|
|
[Cmdlet(VerbsLifecycle.Invoke, "CertsUIDeleteAccount")]
|
|
[OutputType(typeof(void))]
|
|
public sealed class InvokeCertsUIDeleteAccountCmdlet : CertsUICmdletBase {
|
|
[Parameter(Mandatory = true, Position = 0)]
|
|
public Guid AccountId { get; set; }
|
|
|
|
protected override void ProcessRecord() {
|
|
try {
|
|
RequireClient().DeleteAccountAsync(AccountId).GetAwaiter().GetResult();
|
|
}
|
|
catch (Exception ex) {
|
|
WriteApiError(ex);
|
|
}
|
|
}
|
|
}
|