Popular Posts

less than 1 minute read

Pages:

Page Category
How to be a Linux SysAdmin General
How to be a Windows SysAdmin General
3 Part Quiz General
Setting Up A Test Lab General
Setup A New Computer General
Connecting To Github General
Template Powershell
Logging Powershell
PS Remoting GPO Powershell
Modules Powershell
Single Commands Powershell
Using Passwords Powershell
Top Xkcd’s Other
Meta - Categories and Tags for this site Other

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