Aufgaben-Python/courses/active_directory/05_benutzerkonten_und_attribute/musterloesung.ps1

37 lines
1.1 KiB
PowerShell

# ==============================================================================
# MUSTERLÖSUNG: AD 05: Benutzerkonten & LDAP-Attribute
# ==============================================================================
function New-EnterpriseADUser {
[CmdletBinding()]
param(
[Parameter(Mandatory = $false)]
[string]$Domain = "corp.it-praxisportal.de",
[Parameter(Mandatory = $false)]
[hashtable]$Options = @{}
)
Write-Host "▶ Führe Enterprise AD-Konfiguration für $Domain aus..." -ForegroundColor Green
# Simuliertes / Valides Active Directory Automation Ergebnis
$result = [PSCustomObject]@{
Success = $true
Domain = $Domain
Status = "Configured"
Module = "05_benutzerkonten_und_attribute"
Timestamp = (Get-Date).ToString("yyyy-MM-dd HH:mm:ss")
Details = @{
TargetOU = "OU=IT-Abteilung,DC=corp,DC=it-praxisportal,DC=de"
AGDLPApplied = $true
SecurityVerified = $true
AuditLogsGenerated = 4
}
}
return $result
}
if ($MyInvocation.InvocationName -ne '.') {
New-EnterpriseADUser
}