Disable-WinGetLocalManifest.ps1 (899B)
1 Function Disable-WinGetLocalManifest 2 { 3 <# 4 .SYNOPSIS 5 Disables the Windows Package Manager to work with local manifest files. 6 7 .DESCRIPTION 8 By running this cmdlet the Windows Package Manager will configured not to support working with manifests on the file system. 9 10 .PARAMETER VerboseLog 11 Used to provide verbose logging for the Windows Package Manager. 12 13 .EXAMPLE 14 Disable-WinGetLocalManifest 15 16 This cmdlet must be executed in an administrative terminal. 17 #> 18 PARAM ( 19 [Parameter()] [switch] $VerboseLog 20 21 ) 22 BEGIN 23 { 24 [string[]] $WinGetArgs = "Settings", "--disable", "LocalManifestFiles" 25 $WinGetArgs += "--Verbose-Logs", $VerboseLog 26 } 27 PROCESS{ 28 & "WinGet" $WingetArgs 29 } 30 END{ 31 return 32 } 33 } 34 35 Export-ModuleMember -Function Disable-WinGetLocalManifest