$users = @( 'user1', 'user2', 'user3' ) foreach($user in $users) { New-LocalUser -AccountNeverExpires:$true -Password ( ConvertTo-SecureString -AsPlainText -Force 'gleichaendern!') -Name $user Set-LocalUser -Name $user -PasswordNeverExpires 1 Add-LocalGroupMember -Group "Remotedesktopbenutzer" -Member $user }