This repository was archived by the owner on Dec 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ function Add-ScopeMachine {
158158# Check if app is installed
159159function Confirm-Install ($AppID ) {
160160 # Get "Winget List AppID"
161- $InstalledApp = & $winget list -- Id $AppID - e -- accept- source- agreements | Out-String
161+ $InstalledApp = & $winget list -- Id $AppID - e -- accept- source- agreements - s winget | Out-String
162162
163163 # Return if AppID exists in the list
164164 if ($InstalledApp -match [regex ]::Escape($AppID )) {
@@ -172,7 +172,7 @@ function Confirm-Install ($AppID) {
172172# Check if App exists in Winget Repository
173173function Confirm-Exist ($AppID ) {
174174 # Check is app exists in the winget repository
175- $WingetApp = & $winget show -- Id $AppID - e -- accept- source- agreements | Out-String
175+ $WingetApp = & $winget show -- Id $AppID - e -- accept- source- agreements - s winget | Out-String
176176
177177 # Return if AppID exists
178178 if ($WingetApp -match [regex ]::Escape($AppID )) {
@@ -256,7 +256,7 @@ function Install-App ($AppID, $AppArgs) {
256256
257257 # Install App
258258 Write-Log " -> Installing $AppID ..." " Yellow"
259- $WingetArgs = " install --id $AppID -e --accept-package-agreements --accept-source-agreements -h $AppArgs " -split " "
259+ $WingetArgs = " install --id $AppID -e --accept-package-agreements --accept-source-agreements -s winget - h $AppArgs " -split " "
260260 Write-Log " -> Running: `" $Winget `" $WingetArgs "
261261 & " $Winget " $WingetArgs | Tee-Object - file $LogFile - Append
262262
You can’t perform that action at this time.
0 commit comments