Skip to content
Snippets Groups Projects
Commit fdf29020 authored by Saad Chaaban's avatar Saad Chaaban
Browse files

Update createComputer_GUI.ps1

parent 81fa8508
No related branches found
No related tags found
No related merge requests found
......@@ -22,11 +22,11 @@ $AddADComputerForm.text = "Create SOWI PC"
$AddADComputerForm.BackColor = "#FFFFFF"
# Überschrift
$Titel = New-Object system.Windows.Forms.Label
$Titel.text = "AD Computer anlegen"
$Titel.AutoSize = $true
$Titel.location = New-Object System.Drawing.Point(20,20)
$Titel.Font = 'Microsoft Sans Serif,13'
$Titel = New-Object system.Windows.Forms.Label
$Titel.text = "AD Computer anlegen"
$Titel.AutoSize = $true
$Titel.location = New-Object System.Drawing.Point(20,20)
$Titel.Font = 'Microsoft Sans Serif,13'
# Info
$Description = New-Object system.Windows.Forms.Label
......@@ -139,7 +139,7 @@ function Create-Computer {
-SamAccountName $($ComputerName.Text) `
-Path $($Department_Computer.DistinguishedName[$Department.SelectedIndex-1]) `
-Description $($ComputerType.Items[$ComputerType.SelectedIndex])
If(($($ComputerName.Text) -like "SOWI-R*") -and ($ComputerType.SelectedIndex -ne 2)) {
If(($($ComputerName.Text) -like "SOWI-R*") -and ($ComputerType.SelectedIndex -ne 2) -and ($ComputerType.SelectedIndex -ne 3)) {
Add-StandardGroups
}
[System.Windows.MessageBox]::Show(@"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment