Skip to content

Instantly share code, notes, and snippets.

@aytch
Last active January 25, 2016 21:44
Show Gist options
  • Select an option

  • Save aytch/7c1876b5e57a6cf393e4 to your computer and use it in GitHub Desktop.

Select an option

Save aytch/7c1876b5e57a6cf393e4 to your computer and use it in GitHub Desktop.
function Expand-ZIPFile($file, $destination) {
$shell = new-object -com shell.application
$zip = $shell.NameSpace($file)
foreach ($item in $zip.items()) {
$shell.Namespace($destination).copyhere($item)
}
}
cd ~/Documents
mkdir WindowsPowershell\modules\PSReadLine
(New-Object System.Net.WebClient).DownloadFile('https://github.com/lzybkr/PSReadLine/releases/download/Latest/PSReadline.zip', 'C:\Users\administrator.ADATUM\Documents\PSReadline.zip')
Expand-ZIPFile -File "C:\Administrator.ADATUM\Documents\PSReadline.zip" -Destination "C:\Administrator.ADATUM\Documents\WindowsPowershell\modules\PSReadLine"
New-Item $PROFILE -Type File -Value 'Import-Module PSReadLine'
powershell.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment