Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Code Block
languagepowershell
<#
Unblocks all files in the same folder as this script.
Uncomment the "-WhatIf" option to see what files would be unblocked without unblocking any files. 
#>
clear-host
write-host "Root folder of script: " $PSScriptRoot

Unblock-File -path $PSScriptRoot\* -Verbose         #  -WhatIf

Unblock-File -path $PSScriptRoot\*\* -Verbose       # - unblock subfolders for testing
Unblock-File -path $PSScriptRoot\*\*\* -Verbose 
Unblock-File -path $PSScriptRoot\*\*\*\* -Verbose       # - unblock subfolders for testing

Get-ExecutionPolicy -list
Set-ExecutionPolicy Unrestricted -scope currentUser