Last active
October 4, 2019 13:38
-
-
Save ryancbutler/5abe117969d1752e716f2b5b75b2470c 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
$download = Invoke-WebRequest -UseBasicParsing -Uri ("https://www.citrix.com/downloads/workspace-app/windows/workspace-app-for-windows-latest.html") -SessionVariable websession | |
$href = $download.Links|Where-Object {$_.rel -like "*CitrixWorkspaceApp.exe*"} | |
$DLurl = "https:" + $href.rel | |
Invoke-WebRequest -Uri ($DLurl) -WebSession $websession -UseBasicParsing -OutFile "C:\temp\CitrixWorkspaceApp.exe" -Verbose | |
$version = $download.RawContent | Select-String '(?<=.*<p>Version: ).+?(?=<\/p>.*)' -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Unique |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment