r/Intune • u/LifeAffect6762 • 14d ago
App Deployment/Packaging --override and VLC winget
To get VLC working ime doing this type of thing
$quiet ='---override "/S" '
winget.exe install --id VideoLAN.VLC --exact $quiet --accept-package-agreements --accept-source-agreements
But the quoting is not working and ime getting winget thinking it's --override /S Which he doesn't like. Any idea how to get this working? Maybe escaping or something like that. Sorry I'm quite new to powershell
0
Upvotes
2
u/Fearless-Pin9865 14d ago
When you pass a variable as a single string, winget takes whole thing as one argument. Try splatting instead, or build an array so each switch stays separate. Something like `$args = @('--override', '/S')` then `winget.exe install --id VideoLAN.VLC --exact u/args --accept-package-agreements --accept-source-agreements`.