Skip to content

Instantly share code, notes, and snippets.

@RedTahr
Created July 14, 2022 00:13
Show Gist options
  • Save RedTahr/3b96560826bd14d9624b885fc6dca2e9 to your computer and use it in GitHub Desktop.
Save RedTahr/3b96560826bd14d9624b885fc6dca2e9 to your computer and use it in GitHub Desktop.
clearing file permissions for when I stupidly thought dual booting two versions of Windows would be painless.

PS D:> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

PS D:> Import-Module NTFSSecurity

PS D:> Get-ChildItem -Path D:\Downloads -Recurse -Force | Clear-NTFSAccess

PS D:> Get-ExecutionPolicy -Scope CurrentUser RemoteSigned

PS D:> Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser

PS D:> Get-ExecutionPolicy -Scope CurrentUser Undefined

ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment