摘要: Write-Host DU 1.0 - 统计目录大小的脚本,作用和linux的du类似。`n$args = "D:/software"if (!$args){write-host "du 绝对目录名,如:`ndu.ps1 d:/mp3"}elseif (!(Test-Path $args)){write-host "错误:找不到目标目录名!"}else# 我在前人基础上整理,简化了不必要的功能,效果不错。个人感觉比sysinternals的du.exe好。{$b=Get-ChildItem $args -Recurse | Measu 阅读全文
posted @ 2013-09-23 10:42 cnsealine 阅读(4306) 评论(0) 推荐(1) 编辑
摘要: #Runing in Administrator$NICs = Get-WMIObject Win32_NetworkAdapterConfiguration -Filter Index=10#index 要手动修改Foreach($NIC in $NICS){$NIC.EnableStatic("192.168.0.100","255.255.255.0")#若返回值不为0,则是地址有误$NIC.SetGateways("192.168.171.1")$DNSServers = "198.102.234.125" 阅读全文
posted @ 2013-09-23 10:41 cnsealine 阅读(1609) 评论(0) 推荐(1) 编辑