下载文件

http://powershell.com/cs/blogs/tips/archive/2012/10/11/downloading-files-from-internet.aspx

PowerShell v3 comes with a hugely useful new cmdlet called Invoke-WebRequest. You can use it to interact with websites which also includes downloading files.

This will download the SysInternals suite of tools to your computer:

$Source = 'http://download.sysinternals.com/files/SysinternalsSuite.zip'
$Destination = "$env:temp\sysinternalssuite.zip"
Invoke-WebRequest -uri $Source -OutFile $Destination
Unblock-File $Destination

Since downloaded files are blocked by Windows, PowerShell v3 comes with yet another new cmdlet: Unblock-File removes the block. Now you're ready to unzip the file.

If your Internet connection requires proxy settings or authentication, take a look at the parameters supported by Invoke-WebRequest.

PowerShell 常用命令的更多相关文章

  1. Powershell常用命令

    Powershell常用命令1.Get-Command 得到Powshell所有命令2.Get-Process 获取所有进程3.Set-Alias 给指定命令重命名 如:Set-Alias aaa G ...

  2. PowerShell常用命令及美化(现代化的CMD)

    PowerShell可谓现代终端,是微软用来替代古老的CMD的. PowerShell拥有面向对象的思想,非常方便. 常用命令 下载文件(此处以install.ps1文件为例) $client = n ...

  3. bash 和 powershell 常用命令集锦

    Linux Shell # 1. 后台运行命令 nohup python xxx.py & # 查找替换 ## 只在目录中所有的 .py 和 .dart 文件中递归搜索字符"main ...

  4. cmd/powershell常用命令 git常用命令

    cmd/powershell: 1. 新建文件夹: mkdir directoryName 2. 新建文件: cmd: type nul>fileName (空文件) powershell: n ...

  5. powershell 常用命令之取磁盘分区信息

    //查看mac 地址 PS C:\Users\yyy> get-wmiobject -class Win32_NetworkAdapterConfiguration -namespace &qu ...

  6. Windows PowerShell基本语法及常用命令

    PowerShell常用命令: 一 Get类 1.Get-Command : 得到所有PowerShell命令,获取有关 cmdlet 以及有关 Windows PowerShell 命令的其他元素的 ...

  7. PowerShell常用的.Net 、COM对象(New-Object、Assembly)、加载程序集

    #新建随机数对象实例:$Ran = New-Object System.Random$Ran.NextDouble() 有时候,要使用的实例的类保存在独立的库文件中,PowerShell默认未加载,会 ...

  8. Windows运行常用命令(win+R)

    Windows运行常用命令(win+R) 1.calc: 启动计算器 2.notepad: 打开记事本 3.write: 写字板 4.mspaint: 画图板 5.snippingtool:截图工具, ...

  9. Windows下内网渗透常用命令总结

    域内信息收集常用命令 net group /domain //获得所有域用户组列表 net group zzh /domain //显示域中zzh组的成员 net group zzh /del /do ...

随机推荐

  1. 《深入浅出Windows Phone 8.1 应用开发》基于Runtime框架全新升级版

    <深入浅出Windows Phone 8.1 应用开发>使用WP8.1 Runtime框架最新的API重写了上一本<深入浅出Windows Phone 8应用开发>大部分的的内 ...

  2. 【BZOJ1012】 【JSOI2008】最大数maxnumber

    Description 现在请求你维护一个数列,要求提供以下两种操作: 1. 查询操作.语法:Q L 功能:查询当前数列中末尾L个数中的最大的数,并输出这个数的值.限制:L不超过当前数列的长度. 2. ...

  3. 《你必须知道的.NET》书中对OCP(开放封闭)原则的阐述

    开放封闭原则(OCP,Open Closed Principle)是面向对象原则的核心.由于软件设计本身所追求的墓边就是封装变化,降低耦合,而开放封闭原则就是对这一目标的直接体现.(你必须知道的.NE ...

  4. HBase1.0以上版本的API改变

    HBase1.0以上版本已经废弃了 HTableInterface,HTable,HBaseAdmin等API的使用,新增了一些API来实现之前的功能: Connectioninterface: Co ...

  5. PHP 操作MySQL———来自copy

    学习要点:1.PHP 连接到MySQL2.增删改查3.其他常用函数 如果你已经具有了使用PHP.SQL 和MySQL 的丰富经验,现在就可以把所有这些技术组合在一起.PHP 与MySQL 之间稳固的集 ...

  6. Android基于XMPP的即时通讯3-表情发送

    这篇博文主要讲表情发送的一些东西. 参考:Android基于XMPP的即时通讯1-基本对话 1.准备好资源文件 采用的是emoji的表情,我打包好了,下载地址:http://files.cnblogs ...

  7. [CareerCup] 18.4 Count Number of Two 统计数字2的个数

    18.4 Write a method to count the number of 2s between 0 and n. 这道题给了我们一个整数n,让我们求[0,n]区间内所有2出现的个数,比如如 ...

  8. sbt commands

    速查手册 常用命令 actions – 显示对当前工程可用的命令 update – 下载依赖 compile – 编译代码 test – 运行测试代码 package – 创建一个可发布的jar包 p ...

  9. 无法分配超出32(XXX)的MINEXTENTS报错的解决方法

    今天在创建新表的时候,遇到该报错:ORA-01659 无法分配超出32(XXX)的MINEXTENTS 解决方法:修改表空间大小. 命令如下: ALTER DATABASE DATAFILE ''D: ...

  10. 一个参数大小写引发的uploadify报错 "Syntax error, unrecognized expression: #"

     上传控件uploadify 报错"Syntax error, unrecognized expression: #" 版本为 uploadify3.2  报错原因:参数ID[hi ...