LANCommander/LANCommander.SDK/PowerShell/Cmdlets/Get-UserCustomField.cs
2024-08-21 20:19:04 -05:00

22 lines
577 B
C#

using PeanutButter.INI;
using System;
using System.IO;
using System.Management.Automation;
namespace LANCommander.SDK.PowerShell.Cmdlets
{
[Cmdlet(VerbsCommon.Get, "UserCustomField")]
[OutputType(typeof(string))]
public class GetUserCustomFieldCmdlet : BaseCmdlet
{
[Parameter(Mandatory = true, Position = 0)]
public string Name { get; set; }
protected override void ProcessRecord()
{
var result = Client.Profile.GetCustomField(Name).GetAwaiter().GetResult();
WriteObject(result);
}
}
}