wget Equivalent for Windows PowerShell

by Scott Saad - August 12, 2013

Today I needed to install Python’s setup tools in a Windows environment which comes with the recommendation to just download the script directly and run python against it. This works fine of course but if you’re coming from a Linux environment you’re probably looking for an equivalent of wget. With wget the setup becomes slick like by running the following:

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python

This can now be replicated in PowerShell V3 with the Invoke-WebReqest cmdlet.

(Invoke-WebRequest https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py).Content | python

Just another way to keep yourself in the shell more often than not. You know, if you’re into that sort of thing.

Discussion, links, and tweets

I'm a software geek living and working in Boulder, Colorado. Follow me on Twitter; you'll dig my tweets if you're into that sort of thing.