Created
          June 29, 2018 01:03 
        
      - 
            
      
        
      
    Star
      
          
          (244)
      
  
You must be signed in to star a gist 
- 
              
      
        
      
    Fork
      
          
          (57)
      
  
You must be signed in to fork a gist 
- 
      
- 
        Save jaskiratr/cfacb332bfdff2f63f535db7efb6df93 to your computer and use it in GitHub Desktop. 
Revisions
- 
        jaskiratr created this gist Jun 29, 2018 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ # Source: https://stackoverflow.com/a/43317244 $path = ".\aws-ec2-key.pem" # Reset to remove explict permissions icacls.exe $path /reset # Give current user explicit read-permission icacls.exe $path /GRANT:R "$($env:USERNAME):(R)" # Disable inheritance and remove inherited permissions icacls.exe $path /inheritance:r