Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

How to download an archive and extract it without saving the archive to disk using Powershell?

Had to adjust Geralds answer to make it work:

# create temp with zip extension (or Expand will complain)
$tmp = New-TemporaryFile | Rename-Item -NewName { $_ -replace 'tmp$', 'zip' } –PassThru
#download
Invoke-WebRequest -OutFile $tmp $url
#exract to same folder 
$tmp | Expand-Archive -DestinationPath $PSScriptRoot -Force
# remove temporary file
$tmp | Remove-Item

Tags:

Powershell

Related

How to add a hotspare with storcli to a LSI MegaRAID controller? A DNS record that will frequently change? Error when installing NFS service on Windows 2016 Does a RAID controller with an NV cache improve the performance or integrity of an SSD array? Grab value from nginx location path How can I reject base64 encoded spam email? How to send an email if a systemd service is restarted? Unable to limit Apache server-status page to localhost gcloud SSH connection asks for password instead of passphrase SSH - identify which users still login using passwords What are passive checks good for on Zabbix? What's the difference between include_tasks and import_tasks?

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy