Create and manage MSA or grMSA
This commit is contained in:
@@ -29,7 +29,7 @@ $form.Controls.Add($labelDNS)
|
||||
$textDNS = New-Object System.Windows.Forms.TextBox
|
||||
$textDNS.Location = New-Object System.Drawing.Point(180,60)
|
||||
$textDNS.Size = New-Object System.Drawing.Size(180,20)
|
||||
$textDNS.Text = ".wd.govt.nz"
|
||||
$textDNS.Text = ".domain.placeholder.nz" # Enter your domain "domain.govt.nz" ##################### UPDATE THIS LINE #####################
|
||||
$textDNS.Enabled = $false
|
||||
$form.Controls.Add($textDNS)
|
||||
|
||||
@@ -42,7 +42,7 @@ $form.Controls.Add($labelPath)
|
||||
$textPath = New-Object System.Windows.Forms.TextBox
|
||||
$textPath.Location = New-Object System.Drawing.Point(180,100)
|
||||
$textPath.Size = New-Object System.Drawing.Size(180,20)
|
||||
$textPath.Text = "OU=grMSA,OU=Service Accounts,OU=_Administration,DC=wd,DC=govt,DC=nz"
|
||||
$textPath.Text = "OU=grMSA,OU=Service Accounts,OU=_Administration,DC=domain,DC=placeholder,DC=nz" ##################### UPDATE THIS LINE #####################
|
||||
$textPath.Enabled = $false
|
||||
$form.Controls.Add($textPath)
|
||||
|
||||
@@ -59,7 +59,7 @@ $form.Controls.Add($textMachines)
|
||||
|
||||
# Event to update DNS field based on Service Account Name input
|
||||
$textSVCAccount.Add_TextChanged({
|
||||
$textDNS.Text = "$($textSVCAccount.Text).wd.govt.nz"
|
||||
$textDNS.Text = "$($textSVCAccount.Text).domain.placeholder.nz" ##################### UPDATE THIS LINE #####################
|
||||
})
|
||||
|
||||
# Create the Submit Button
|
||||
@@ -73,7 +73,7 @@ $form.Controls.Add($buttonSubmit)
|
||||
$buttonSubmit.Add_Click({
|
||||
$SVCAccount = $textSVCAccount.Text
|
||||
$dns = $textDNS.Text
|
||||
$path = "OU=grMSA,OU=Service Accounts,OU=_Administration,DC=wd,DC=govt,DC=nz"
|
||||
$path = "OU=grMSA,OU=Service Accounts,OU=_Administration,DC=domain,DC=placeholder,DC=nz" ##################### UPDATE THIS LINE #####################
|
||||
$machines = $textMachines.Text.Split(',')
|
||||
|
||||
if (-not [string]::IsNullOrWhiteSpace($SVCAccount) -and -not [string]::IsNullOrWhiteSpace($dns) -and -not [string]::IsNullOrWhiteSpace($path) -and $machines.Count -gt 0) {
|
||||
|
||||
Reference in New Issue
Block a user