« Command line windows » : différence entre les versions

De Banane Atomic
Aller à la navigationAller à la recherche
Aucun résumé des modifications
Ligne 20 : Ligne 20 :
# add a user to a group
# add a user to a group
net localgroup administrators [username] /add
net localgroup administrators [username] /add
</kode>
= [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/icacls Access Control Lists] =
<kode lang='ps'>
# grant to User1 the Delete and Write DAC permissions to c:\folder\file.ext
icacls c:\folder\file.ext /grant User1:(d,wdac)
</kode>
</kode>

Version du 7 février 2022 à 18:03

Users and groups

Ps.svg
# list local users
net user

# display account information (groups of which he is a member)
net user [username]

# create an account
net user /add [username]
# it prompts the password

# list local groups
net localgroup

# list the users of a group
net localgroup [groupname]

# add a user to a group
net localgroup administrators [username] /add

Access Control Lists

Ps.svg
# grant to User1 the Delete and Write DAC permissions to c:\folder\file.ext
icacls c:\folder\file.ext /grant User1:(d,wdac)