#Local Account Creation Script - Users.txt should contain the names of the names of the accounts to be created.Get-Content C:\scripts\users.txt |`% { [ADSI]$server="WinNT://CompName" $Account=$server.Create("User","$_") $Account.SetPassword("welcome@123") $Account.Put("Description","PowerShell User") $flag=$Account.UserFlags.value -BOR 0x10000 $Account.put("userflags",$flag) $Account.SetInfo()}
↧