Popular Posts
less than 1 minute read
Posts:
- Python:
- Powershell:
- General:
- Actions to know how to do:
- Other:
Optionally download my latest Powershell module
1
2
3
4
5
6
7
8
9
10
11
| $URI = "https://api.github.com/repos/gerryw1389/powershell/releases/latest"
# Prevent "Invoke-RestMethod : The request was aborted: Could not create SSL/TLS secure channel."
# This is because Powershell uses 1.0 and most sites require 1.2
[Net.ServicePointManager]::SecurityProtocol = "Tls12, Tls11, Tls, Ssl3"
$Response = Invoke-RestMethod -Method Get -Uri $URI
$ZipUrl = $Response.zipball_url
# Download the file to the current location
$OutputPath = "$((Get-Location).Path)\$($Response.name.Replace(" ","-")).zip"
Invoke-RestMethod -Method Get -Uri $ZipUrl -OutFile $OutputPath
|
Comments