Powershell AD – Homedrive Homepath Basisordner

Active Directory Homedrive Homepath Basisordner

Alle Benutzer der OU bekommen ein Homedrive und Homepath gesetzt:

$userbase = Get-ADUser -Filter * -SearchBase “OU=Users,OU=Test,OU=Konfiguration,DC=NDSEDV,DC=DE”

foreach($user in $userbase){
$path = “\\Data$\Daten”
$homedriveLetter = “K:”
Set-ADUser -Identity $user -HomeDirectory $path -HomeDrive $homedriveLetter
}

powershell-skript-user-homepath

user-basisordner