Skip to content

Instantly share code, notes, and snippets.

@kramarama
Created November 17, 2014 20:57
Show Gist options
  • Save kramarama/8ef130d3c34fbb9dfd34 to your computer and use it in GitHub Desktop.
Save kramarama/8ef130d3c34fbb9dfd34 to your computer and use it in GitHub Desktop.
windows scripting
For Files:
takeown /f file_name /d y
icacls file_name /grant administrators:F
For Folders or Directories (will perform action recursively):
takeown /f directory_name /r /d y
icacls directory_name /grant administrators:F /t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment