`refactor`: Purge set-script-policy lib
- Only set execution policy when creating the Winget scheduled job
- There's no reason to block script usage, at least from my side
- Update FUNDING.yml because i got GitHub Sponsors working 🥳
main
parent
a1d79cf823
commit
e50d3beab8
@ -1,21 +0,0 @@
|
||||
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1"
|
||||
|
||||
function Unlock-ScriptUsage() {
|
||||
[CmdletBinding()] param ()
|
||||
|
||||
Write-Status -Symbol "@" -Status "Receiving permissions to run scripts as Current User..."
|
||||
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
|
||||
}
|
||||
|
||||
function Block-ScriptUsage() {
|
||||
[CmdletBinding()] param ()
|
||||
|
||||
Write-Status -Symbol "@" -Status "Denying permissions to run scripts as LocalMachine..."
|
||||
Set-ExecutionPolicy Restricted -Scope LocalMachine -Force
|
||||
}
|
||||
|
||||
<#
|
||||
Example:
|
||||
Unlock-ScriptUsage # to Unlock script usage
|
||||
Block-ScriptUsage # to Lock script usage
|
||||
#>
|
Loading…
Reference in New Issue