Script for create bulk user in local machine
Login to the machine where you want to create bulk user.
Open Windows PowerShell ISE
Copy below script and past it in PowerShell ISE like below
Using this blog i have tried to provide simple steps for installation and configuration .Your comment will provide me motivation for writing more.
function create-account ([string]$accountName) { $hostname = hostname $comp = [adsi]"WinNT://$hostname" $user = $comp.Create("User", $accountName) $user.SetPassword("P@ssw0rd") #$user.SetInfo() $User.UserFlags[0] = $User.UserFlags[0] -bor 0x10000 #ADS_UF_DONT_EXPIRE_PASSWD flag is 0x10000 $user.SetInfo()} # Create 30 administrator users named user1 ... user 30 for($i=23; $i -le 25; $i++){ create-account("TRAIN-$i") } Get-LocalUser -Name TRAIN* | select FullName, Enabled, UserMayChangePassword, PasswordChangeableDate, PasswordExpires | Export-Csv c:\temp\user.csv -NoTypeInformation |
HPE MSA 2040 configuration Default IP range for HP SAN storage MSA 2040 is 10.0.0.1/2 You need to connect your laptop and storage with...
No comments:
Post a Comment