Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (New-Object System.Net.WebClient).Downloadfile( 'https://wireshark.org/download/win64/' + $($filename = (Invoke-WebRequest -Uri 'https://wireshark.org/download/win64'|Select -exp Links|Where-Object { $_.Innertext -match '^(.*)(\d+\.\d+\.\d+)(.*)$' }|ForEach-Object { [pscustomobject]@{ download = $matches[0] ; version = ($matches[2] -as [version] )} }|Sort-Object -Property version -Descending|Select-Object -First 1).download;$filename) , (Join-Path -Path (Get-Location) -ChildPath $filename))
Add Comment
Please, Sign In to add comment