Umstellung Roaming Profiles per PowerShell

Dieser Befehl listet alle Benutzer auf, welche einen entsprechenden Server im ProfilePath drin haben:

Get-ADUser -Filter * -Properties * | where {$_.ProfilePath -like "\\SERVERNAME*"} | select Name,ProfilePath

Danach kann der Pfad wie folgt geändert werden:

$ADUsers = Get-ADUser -Filter * -Properties * | where {$_.ProfilePath -like "\\SERVERNAME*"}
foreach ($User in $ADUsers) {
     $UserProfile = "\\SERVERNAME_NEU.DOMAIN.LOCAL\Profiles$\" + $User.Samaccountname
     Set-ADUser -Identity $User -ProfilePath $UserProfile
     }

2 comments

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

This site uses Akismet to reduce spam. Learn how your comment data is processed.