Microsoft OneDrive latest version #105
-
Hi guys, Small question: When I run the following:
The output will be two Exe files, do you have an idea how to download only the highest version? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You could try this: (Get-MicrosoftOneDrive | Where-Object { $_.Type -eq "Exe" -and $_.Ring -eq "Production" }) | Sort-Object -Property @{ Expression = { [System.Version]$_.Version }; Descending = $true } | Select-Object -First 1 Will work for however many versions are returned. |
Beta Was this translation helpful? Give feedback.
-
The OneDrive update source doesn't always return multiple Exes, not sure why. Sorting on the Get-MicrosoftOneDrive | Where-Object { $_.Type -eq "Exe" -and $_.Ring -eq "Production" } | Sort-Object -Property Version -Descending | Select-Object -First 1 |
Beta Was this translation helpful? Give feedback.
You could try this:
Will work for however many versions are returned.