Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Do {
- $Input = Read-Host -Prompt 'Enter username (4 symbols without spaces):'
- } While ($Input.length -ne 4 -And -Not ($Input -Match ' '))
- New-LocalGroup -Name "GPart3$Input"
- New-LocalUser -Name "UPart3$Input" -NoPassword
- Add-LocalGroupMember -Group "GPart3$Input" -Member "UPart3$Input"
- Add-LocalGroupMember -Group "Пользователи" -Member "UPart3$Input"
- Enable-LocalUser -Name "UPart3$Input"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement