Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Apr 25, 2020. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstall.ps1
More file actions
Latest commit
25 lines (21 loc) · 1.27 KB
/
Copy pathInstall.ps1
File metadata and controls
25 lines (21 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Run this in an administrative PowerShell prompt to install the ModuleBuildToolsTemp PowerShell module:
#
# iex (New-Object Net.WebClient).DownloadString("https://www.github.com/justin-p/ModuleBuildToolsTemp/raw/master/Install.ps1")
# Some general variables
$ModuleName='ModuleBuildToolsTemp'
$DownloadURL='https://www.github.com/justin-p/ModuleBuildToolsTemp/raw/master/release/ModuleBuildToolsTemp-current.zip'
# Download and install the module
$webclient=New-Object System.Net.WebClient
$file="$($env:TEMP)\$($ModuleName).zip"
Write-Host"Downloading latest version of $ModuleName from $DownloadURL"-ForegroundColor Cyan
$webclient.DownloadFile($DownloadURL,$file)
Write-Host"File saved to $file"-ForegroundColor Green
$targetondisk="$($env:USERPROFILE)\Documents\WindowsPowerShell\Modules\$($ModuleName)"
$null=New-Item-ItemType Directory -Force -Path $targetondisk
$shell_app=new-object-com shell.application
$zip_file=$shell_app.namespace($file)
Write-Host"Uncompressing the Zip file to $($targetondisk)"-ForegroundColor Cyan
$destination=$shell_app.namespace($targetondisk)
$destination.Copyhere($zip_file.items(),0x10)
Write-Host"Module has been installed!"-ForegroundColor Green
Write-Host"You can now import the module with: Import-Module -Name $ModuleName"