Created
January 15, 2019 19:29
-
-
Save wsmelton/683340e4a68cdcad409dd5ab7c77f547 to your computer and use it in GitHub Desktop.
Download from PowerShell Gallery via API
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
$package = 'https://powershellgallery.com/api/v2/package/dbatools' | |
$zipPath = 'C:\temp\dbatools.zip' | |
(New-Object System.Net.WebClient).DownloadFile($package, $zipPath) | |
$extractPath = 'C:\temp\modules\' | |
[io.compression.zipfile]::ExtractToDirectory($zipPath, $extractPath) | |
# verify | |
ipmo "$extractPath\dbatools.psd1" | |
Get-Module dbatools |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment