4 ms·
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{iex ((new-object net.webclient).DownloadString('https://dist.asp.net/dnvm/dnvminstall.ps1'))}"
by mattmanser 11y ago
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{iex ((new-object net.webclient).DownloadString('https://dist.asp.net/dnvm/dnvminstall.ps1'))}"
Hmmmmmmmm. Technically they do. Can't tell if this is a joke...
- Taren 11y agoAlright, let's be fair here. If you have a sensible execution policy set which you basically have to the first time you use powershell it is only: Invoke-WebRequest https://dist.asp.net/dnvm/dnvminstall.ps1 https://dist.asp.net/dnvm/dnvminstall.ps1 | Invoke-Expression or this for short: iwr https://dist.asp.net/dnvm/dnvminstall.ps1 https://dist.asp.net/dnvm/dnvminstall.ps1 | iex Also, the powershell package manager is quite nice. So far it is basically chocolatey for me but if there are some more it can handle in the future... https://github.com/OneGet/oneget/issues/77 https://github.com/OneGet/oneget/issues/77
- rylee 11y agoheh, the Microsoft curl|sh.
- Taren 11y agoYeah, they copied a lot of the syntax over. To the point that there is an alias for curl by default. Probably a good thing, though.
- manicgeek 11y agoYeah, unfortunately that nice clean syntax requires a fairly recent version of PowerShell so the code we actually use has to be a bit verbose for compat :) Source/Disclaimer: I work for the ASP.NET team
- UK-AL 11y agoThat got a lot boilerplate on it on purpose, to make you have the right ExecutionPolicy(Powershell won't let you run random scripts, unless you override it), etc.