-
-
Save KurtDeGreeff/6619e9fbe44dbfd2d402bb718f13fe1b to your computer and use it in GitHub Desktop.
Remove built-in version of Pester on Windows 10, and all other versions of Pester
This 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 characters
#Requires -RunAsAdministrator | |
$modulePath = "C:\Program Files\WindowsPowerShell\Modules\Pester" | |
if (-not (Test-Path $modulePath)) { | |
"There is no Pester folder in $modulePath, doing nothing." | |
break | |
} | |
takeown /F $modulePath /A /R | |
icacls $modulePath /reset | |
icacls $modulePath /grant Administrators:'F' /inheritance:d /T | |
Remove-Item -Path $modulePath -Recurse -Force -Confirm:$false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment