I am working on a PowerShell command that updates all my apps with one click but I ran into a problem
I stored the winget command inside a variable $upgradeResult
the code was $upgradeResult=winget upgrade -u --id $($_.Id) --silent --accept-source-agreements
I noticed that the code runs without displaying anything so I added Write-Host $upgradeResult
but there is an issue with the output it shows like this
- \ | - \ | No available upgrade found. No newer package versions are available from the configured sources.
I don't know why it shows these characters - \ | - \ |
I tried Invoke-Expression
and I tried to add | Out-String
after the code but nothing seems to work
it still shows these random characters - \ | - \ |