Thêm Local Users trong windows server 2019
Bạn mở PowerShell với quyền quản trị và cấu hình như sau
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
# for example, add [Serverworld] user
# [P@ssw0rd01] ⇒ the password you set (replace it you like)
# [PasswordNeverExpires] ⇒ set password never expire(if set default expiration, do not specify this option)
PS C:\Users\Administrator> New-LocalUser -Name "Serverworld" `
-FullName "Server World" `
-Description "Administrator of this Computer" `
-Password (ConvertTo-SecureString -AsPlainText "P@ssw0rd01" -Force) `
-PasswordNeverExpires `
-AccountNeverExpires
Name Enabled Description
---- ------- -----------
Serverworld True Administrator of this Computer
# add [Serverworld] user to [Administrators] group
PS C:\Users\Administrator> Add-LocalGroupMember -Group "Administrators" -Member "Serverworld"
# verify
PS C:\Users\Administrator> Get-LocalUser -Name Serverworld
Name Enabled Description
---- ------- -----------
Serverworld True Administrator of this Computer
PS C:\Users\Administrator> Get-LocalGroupMember -Group "Administrators"
ObjectClass Name PrincipalSource
----------- ---- ---------------
User RX-7\Administrator Local
User RX-7\Serverworld Local
# if remove an user, do like follows
PS C:\Users\Administrator> Remove-LocalUser -Name "Serverworld"
Trên cấu hình GUI thiết lập như sau: mở Server Manager, chọn Tool > Computor Management

Nhấp chuột phải vào Users bên dưới Local Users and Groups ở bên trái và chọn New User.

Nhập Username và Password cho người dùng mới, rồi nhấp vào nút Create. Các mục khác là tùy chọn để thiết lập.

Sau khi tạo, người dùng mới được hiển thị trên danh sách như sau.

Nếu bạn muốn đặt quyền admin cho người dùng mới, hãy nhấp chuột phải vào người dùng và mở Properties.

Di chuyển đến tab Member of và nhấp vào nút Add.

Chỉ định nhóm Administrators như sau.

Đảm bảo rằng nhóm Administrators được thêm vào danh sách và nhấp vào nút OK để hoàn tất cài đặt.
