新增, 查看 User
# Add new user
net user filezilla /add
# Change user password
"*" in place of a password => Command Prompt window after executing the net user command.
net user filezilla NEW-PASSWORD
# Disable a user
net user filezilla /active:no
# User info
net user filezilla
User name filezilla Full Name Comment User's comment Country/region code 000 (System Default) Account active Yes Account expires Never Password last set 17/6/2022 4:03:51 pm Password expires 29/7/2022 4:03:51 pm Password changeable 17/6/2022 4:03:51 pm Password required Yes User may change password Yes Workstations allowed All Logon script User profile Home directory Last logon 17/6/2022 4:27:36 pm Logon hours allowed All Local Group Memberships *Users Global Group memberships *None
# Add comment
net user filezilla /comment:"User for filezilla server"
# Deny change password
net user filezilla /passwordchg:no
# Specifies the times that users are allowed to use the computer
# The value all means a user can always log on.
# A null value (blank) means a user can never log on.
# Day values: M,T,W,Th,F,Sa,Su
# hour notation: 9-18 / 9AM-6PM <- one-hour increments
# M,4AM-5PM;T,1PM-3PM
net user filezilla /times:
Add SID to Group
應該: 在有 AD 情況下想某 Domain user 成為本機的 Administrators 成員
Add-LocalGroupMember -Group administrators -Member S-1-5-21-X-X-X-X
Note: 查看 Domain User 的 Sid
當 Domain User login 後才有 SID 出現
HKEY_USERS\SID\Volatile Environment\USERNAME
Local Groups
# Check group 's member
net localgroup administrators
Alias name administrators Comment Administrators have complete and unrestricted access to the computer/domain Members ------------------------------------------------------------------------------- Administrator tim
# To add a local user to Power users group:
net localgroup "Power users" /add UserLoginName
# To add a domain user to local administrator group
net localgroup administrators /add domainname\username
# To remove a domain user from local administrator group
net localgroup administrators /delete domainname\username