using HyperBooru.ApiClient; using System.Management.Automation; namespace HyperBooru.PowerShell; [Alias("rhbu")] [Cmdlet(VerbsCommon.Remove, "HyperBooruUser")] public class RemoveUserCmdlet : PSCmdlet { [Parameter(Position = 0, Mandatory = true)] public HBSession Session { get; set; } [Parameter(Position = 1, Mandatory = true)] public Guid UserId { get; set; } protected override void ProcessRecord() { Session.User.DeleteUserAsync(UserId) .GetAwaiter() .GetResult(); } }