36 lines
1.2 KiB
PowerShell
36 lines
1.2 KiB
PowerShell
# ==============================================================================
|
|
# 🛡️ Identitätsmanagement - AD 05: Benutzerkonten & LDAP-Attribute
|
|
# ==============================================================================
|
|
|
|
# 🎯 TEILZIEL 1: Neues Benutzerkonto mit New-ADUser und SecureString-Kennwort erstellen
|
|
# 🎯 TEILZIEL 2: UPN, Mailadresse, Telefonnummer und Abteilung pflegen
|
|
# 🎯 TEILZIEL 3: Passwortrichtlinien (PasswordNeverExpires, MustChangePassword) steuern
|
|
# 🎯 TEILZIEL 4: Inaktive Benutzerkonten mit Search-ADAccount aufspüren
|
|
|
|
function New-EnterpriseADUser {
|
|
[CmdletBinding()]
|
|
param(
|
|
[Parameter(Mandatory = $false)]
|
|
[string]$Domain = "corp.it-praxisportal.de",
|
|
|
|
[Parameter(Mandatory = $false)]
|
|
[hashtable]$Options = @{}
|
|
)
|
|
|
|
Write-Host "▶ Starte AD-Operation: New-EnterpriseADUser für $Domain..." -ForegroundColor Cyan
|
|
|
|
# TODO: Implementiere die geforderten Active Directory Schritte
|
|
$result = [PSCustomObject]@{
|
|
Success = $true
|
|
Domain = $Domain
|
|
Status = "Ready"
|
|
Module = "05_benutzerkonten_und_attribute"
|
|
}
|
|
|
|
return $result
|
|
}
|
|
|
|
# Direkter Aufruf bei Skriptausführung
|
|
if ($MyInvocation.InvocationName -ne '.') {
|
|
New-EnterpriseADUser
|
|
}
|