mirror of
https://github.com/MichaelGrafnetter/DSInternals
synced 2025-04-25 04:18:19 +00:00
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
namespace DSInternals.PowerShell.Commands
|
|
{
|
|
using System.Management.Automation;
|
|
using System.Security.Principal;
|
|
|
|
public abstract class ADDBPrincipalCommandBase : ADDBObjectCommandBase
|
|
{
|
|
protected const string parameterSetByName = "ByName";
|
|
protected const string parameterSetBySid = "BySID";
|
|
|
|
[Parameter(
|
|
Mandatory = true,
|
|
Position = 0,
|
|
HelpMessage = "TODO",
|
|
ValueFromPipelineByPropertyName = true,
|
|
ParameterSetName = parameterSetByName
|
|
)]
|
|
[ValidateNotNullOrEmpty]
|
|
[Alias("Login", "sam")]
|
|
public string SamAccountName
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[Parameter(
|
|
Mandatory = true,
|
|
HelpMessage = "TODO",
|
|
ValueFromPipelineByPropertyName = true,
|
|
ParameterSetName = parameterSetBySid
|
|
)]
|
|
[ValidateNotNullOrEmpty]
|
|
[Alias("Sid")]
|
|
public SecurityIdentifier ObjectSid
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
}
|
|
} |