I want to do this using command prompt, sometimes we need to check users permission, so can you please suggest how to view permission using command line in windows, Thanks.
You can use the icacls
command in cmd. Like this:
icacls folder/file name
eg:
>>> C:\Users\Username> icacls Desktop
Desktop NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
BUILTIN\Administrators:(I)(OI)(CI)(F)
ComputerName\Username:(I)(OI)(CI)(F)
Get-Acl
eg:
PS C:\Users\Username> Get-Acl
Directory: C:\Users
Path Owner Access
---- ----- ------
Username NT AUTHORITY\SYSTEM NT AUTHORITY\SYSTEM Allow FullControl...
Or to get the info of all files and folder inside that directory:
PS C:\Users\Username> Dir | Get-Acl
Directory: C:\Users\Username
Path Owner Access
---- ----- ------
.anaconda Owner Name NT AUTHORITY\SYSTEM Allow FullControl...
.android Owner Name NT AUTHORITY\SYSTEM Allow FullControl...
.atom Owner Name NT AUTHORITY\SYSTEM Allow FullControl...
.aws Owner Name NT AUTHORITY\SYSTEM Allow FullControl...
.conda Owner Name NT AUTHORITY\SYSTEM Allow FullControl...
.config Owner Name NT AUTHORITY\SYSTEM Allow FullControl...
.DataGrip2018.2 Owner Name NT AUTHORITY\SYSTEM Allow FullControl...
.dotnet NT AUTHORITY\SYSTEM NT AUTHORITY\SYSTEM Allow FullControl...
.elasticbeanstalk Owner Name NT AUTHORITY\SYSTEM Allow FullControl...
.idlerc Owner Name NT AUTHORITY\SYSTEM Allow FullControl...
.ipython Owner Name NT AUTHORITY\SYSTEM Allow FullControl...
.keras Owner Name NT AUTHORITY\SYSTEM Allow FullControl...
... List goes on ....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With