Created
October 7, 2021 10:08
-
-
Save matarillo/e945cdc6b275b8516c07989dca220445 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$psi = New-Object Diagnostics.ProcessStartInfo | |
$psi.FileName = $env:LOCALAPPDATA + "\Microsoft\WindowsApps\winget.exe" | |
$psi.Arguments = "list" | |
$psi.UseShellExecute = $false | |
$psi.StandardOutputEncoding = [Text.Encoding]::UTF8 | |
$psi.RedirectStandardOutput = $true | |
$p = [Diagnostics.Process]::Start($psi) | |
$s = $p.StandardOutput.ReadToEnd() | |
$p.WaitForExit() | |
$p.Dispose() | |
$s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment