Reset-WinGetSource.ps1 (882B)
1 Function Reset-WinGetSource 2 { 3 <# 4 .SYNOPSIS 5 Resets the sources for the Windows Package Manager. 6 7 .DESCRIPTION 8 By running this cmdlet will reset sources for the Windows Package Manager. 9 10 .PARAMETER Name 11 Used to specify the Name of the source 12 13 .EXAMPLE 14 Reset-WinGetSource 15 16 This will reset the default sources for the Windows Package Manager 17 18 .EXAMPLE 19 Reset-WinGetSource -Name "Private" 20 21 This will reset the source named "Private" for the Windows Package Manager 22 #> 23 24 PARAM( 25 [Parameter()] [string] $Name 26 ) 27 BEGIN 28 { 29 [string[]] $WinGetArgs = "Source", "reset" 30 $WinGetArgs += "--Name", $Name 31 } 32 PROCESS 33 { 34 WinGet $WingetArgs 35 } 36 END 37 { 38 return 39 } 40 } 41 42 Export-ModuleMember -Function Reset-WinGetSource