Popular Posts

less than 1 minute read

General:

How to be a Linux SysAdmin

or

How to be a Windows SysAdmin

3 Part Quiz

Setting Up A Test Lab

Setup A New Computer

Powershell:

Template

Logging

PS Remoting GPO

Modules

Single Commands

Other

Top Xkcd’s

Meta - Categories and Tags for this site

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

Categories:

Updated:

-----------------------------------------------------------
Spotted a mistake in this article? Why not suggest an edit!
Did you like the article? Donations are always welcome!
-----------------------------------------------------------

Comments