Changing permission of File in Windows 10

I want to know what command in windows 10 is equivalent of CHMOD 400
Kriti MazumderSenior Program ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

icacls *.* /grant user:(RX,WDAC)

for further reading see ICACLS documentation

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kriti MazumderSenior Program ManagerAuthor Commented:
icacls .\KP2.pem /grant:r Administrators:(RX,WDAC)
At line:1 char:45
+ icacls .\KP2.pem /grant:r Administrators:(RX,WDAC)
+                                             ~
Missing argument in parameter list.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingArgument
Kriti MazumderSenior Program ManagerAuthor Commented:
above error i get.
however if i change the command as following snippet, it worked

icacls .\KP2.pem /grant:r Administrator:RX
processed file: .\KP2.pem
Successfully processed 1 files; Failed processing 0 files
The reason your first try fails is because you do it on powershell and powershell does not like the comma. Do that on the ordinary shell (cmd.exe) and it will work. Icacls is a batch command and although most batch commands work on powershell, you can always run into this sort of problems, so either use batch or use the powershell equivalent of icacls: set-acl
Zvitam's solution is the right solution. Mcknife helped the Author in implementing it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 10

From novice to tech pro — start learning today.