diff --git a/How-to-retrieve-links-to-latest-packages.md b/How-to-retrieve-links-to-latest-packages.md new file mode 100644 index 0000000..953f86e --- /dev/null +++ b/How-to-retrieve-links-to-latest-packages.md @@ -0,0 +1,8 @@ +####Follow these Powershell steps to retrieve links to latest packages: + +`$url = 'https://github.com/PowerShell/Win32-OpenSSH/releases/latest/'` +`$request = [System.Net.WebRequest]::Create($url)` +`$request.AllowAutoRedirect=$false` +`$response=$request.GetResponse()` +`$([String]$response.GetResponseHeader("Location")).Replace('tag','download') + '/OpenSSH-Win64.zip'` +`$([String]$response.GetResponseHeader("Location")).Replace('tag','download') + '/OpenSSH-Win32.zip'` \ No newline at end of file