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