In: Computer Science
1. How to create a group of users using a PowerShell script.
2. how to create a file consisting a group of 3 new user name’s and passwords, 1 to a line in power shell.
3. How to write a script in power shell to delete specific group of users. Prove that it works.
1. to create a group of users using a PowerShell script we have the following steps
2.
New-LocalUser
[-AccountExpires <DateTime>]
[-AccountNeverExpires]
[-Description <String>]
[-Disabled]
[-FullName <String>]
[-Name] <String>
-Password <SecureString>
[-PasswordNeverExpires]
[-UserMayNotChangePassword]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-LocalUser -Name "User02" -Description "Description of this
account." -NoPassword
Name Enabled Description
---- ------- -----------
User02 True Description of this account.
3.
Remove-LocalUser -Name Netwrix -Verbose