你可能会需要已不同的单元格式输出某个数字,用字节是最精准的方式,但是有时候你更喜 […] Powershell重写ToString()2015年11月20日 在 Powershell / Powershell小技巧 标签 重写 来自 codecook
1 下面是常规的创建目录方法: #requires -Version 1 $path […] PowerShell使用哈希表创建有条件的代码库2015年9月22日 在 Powershell小技巧 标签 哈希表 来自 codecook
3 Invoke-WebRequest命令可以帮你从网上下载文件,这段例子是下载一段 […] Powershell下载文件2015年9月22日 在 Powershell小技巧 标签 下载 来自 codecook
大多数情况下,我们使用如下方法来定义多行文本: $text = @" I am […] Powershell定义多行文本2015年8月18日 在 Powershell小技巧 标签 多行文本 / 文本文件 来自 codecook
我们先演示下常用的缩短字符串方法: $text = "Some text" $f […] Powershell缩短字符串2015年8月17日 在 Powershell小技巧 标签 正则表达式 来自 codecook
1 你可以这样列出本机电脑的MAC和IP地址: #requires -Version […] Powershell快速获取IP地址2015年8月17日 在 Powershell小技巧 标签 网络 来自 codecook
我们先观察下面Compare-Object的使用: $array1 = 1..1 […] Powershell删除数组中的元素2015年8月17日 在 Powershell小技巧 标签 数组 来自 codecook
1 Powershell缺乏原生的INI读写方法,JSON和XML又比较麻烦,一般人 […] Powershell简单的使用配置文件2015年8月17日 在 Powershell小技巧 标签 配置文件 来自 codecook
先前的方法都受版本限制,下面介绍一种WindowsShell方法来实现解压缩: […] Powershell可通用的ZIP解压方法2015年7月31日 在 Powershell小技巧 标签 shell / unzip / Zip / 解压 来自 codecook
当你安装了.Net4.5及以后版本,你可以这样尝试解压缩: #requires […] Powershell3.0_4.0解压zip2015年7月30日 在 Powershell小技巧 标签 unzip / 压缩 / 解压 / 解压缩 来自 codecook
这个命令居然只能用在Powershell5.0: #requires -Vers […] Powershell解压ZIP文件2015年7月29日 在 Powershell小技巧 标签 解压 来自 codecook
结合先前学习的技能,我们可以使用Test-Port和微软AD模块,来对公司电脑做 […] Powershell检查所有电脑的远程端口2015年7月28日 在 Powershell小技巧 标签 网络 来自 codecook