Hi I need to build a bat possible power shell on standard windows 10 instance.
I need a programmatic way to set an environment variable with the version string of the latest msodbcsql library at https://packages.microsoft.com/rhel/8/prod/
the current latest version is https://packages.microsoft.com/rhel/8/prod/msodbcsql17-17.8.1.2-1.x86_64.rpm but this changes every couple of months.
I thought of something like the following PSEUDO CODE
set msodbcver=Invoke-WebRequest -Uri https://packages.microsoft.com/rhel/8/prod/ | grep msodbcsq | sort
but my windows system cannot find Invoke-WebRequest in either cmd.exe or powershell. Yes I am a unix guy trying to figure out equivilent MS scripting
If you are running a modern version of Powershell (v3 or above) you can do this with: