40 lines
1.0 KiB
PowerShell
40 lines
1.0 KiB
PowerShell
[CmdletBinding()]
|
|
param (
|
|
[Parameter(Mandatory = $true)]
|
|
[string]
|
|
$RequestedForEmail,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]
|
|
$SamAccountName,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[ValidateSet('nd.gov')]
|
|
[string]
|
|
$ADDomain,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]
|
|
$Description,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[ValidateSet('Office365', 'VMware_Systems', 'CSRC', 'Shared Linux Password List', 'Peoplesoft Share PW', 'Cohesity', 'VDI')]
|
|
[string]
|
|
$PasswordstateList,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]
|
|
$PasswordstateTitle
|
|
)
|
|
|
|
$NewITDADServiceAccountParams = @{
|
|
RequestedForEmail = $RequestedForEmail;
|
|
SamAccountName = $SamAccountName;
|
|
ADDomain = $ADDomain;
|
|
Description = $Description;
|
|
PasswordstateList = $PasswordstateList;
|
|
PasswordstateTitle = $PasswordstateTitle;
|
|
}
|
|
|
|
New-ITDServiceNowSession -Environment Production -Credential $Secret:SNowVMCred -Verbose
|
|
New-ITDADServiceAccountRitm @NewITDADServiceAccountParams -Verbose |