上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 90 下一页
  2014年8月26日
摘要: New-Alias -name appcmd -value $env:windir\system32\inetsrv\appcmd.exe这样就可以在当前PS环境下直接使用appcmd了 阅读全文
posted @ 2014-08-26 15:14 momingliu11 阅读(393) 评论(0) 推荐(0) 编辑
摘要: PSBASEthe raw view of the objectPSADAPTEDthe fully adapted view of the objectPSEXTENDEDjustthe extended elements of the objectPSOBJECTa view of the ad... 阅读全文
posted @ 2014-08-26 15:00 momingliu11 阅读(551) 评论(0) 推荐(0) 编辑
摘要: 示例:空值判断方法:$csv[1].b -eq "" #返回true[string]::isnullorempty($csv[1].b) #返回true$b[1].b -eq [String]::Empty #返回true$csv[1].b.length -eq 0 #返回true$csv[1].b... 阅读全文
posted @ 2014-08-26 11:48 momingliu11 阅读(597) 评论(0) 推荐(0) 编辑
  2014年8月25日
摘要: 如果$b="aa,bb"Start-Process PowerShell.exe -Argumentlist "d:\w.ps1 $a $b $c"Start-Process powershell.exe "d:\w.ps1 $a $b $c"则 $b 中的 逗号 会被识别为特殊字符,在此处会自动被... 阅读全文
posted @ 2014-08-25 17:57 momingliu11 阅读(848) 评论(0) 推荐(0) 编辑
摘要: $a="asdfghjklqwe"$b=$nullforeach ($_ in ("$a".length-1)..0){$b +=$a[$_]}$b$a="asdfghjklqwe"$b = $a.ToCharArray()[array]::Reverse($b)$b -join ''[array]... 阅读全文
posted @ 2014-08-25 15:20 momingliu11 阅读(186) 评论(0) 推荐(0) 编辑
  2014年8月22日
摘要: 1 $testFile="pstips.net"2 dir | Out-File $testFile3 $shell = new-object -comobject "Shell.Application"4 $item = $shell.Namespace(0).ParseName( (Resolv... 阅读全文
posted @ 2014-08-22 09:53 momingliu11 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 创建,显示和删除保存的用户名和密码:cmdkey.exe /add:targetname /user:username /pass:password 阅读全文
posted @ 2014-08-22 09:51 momingliu11 阅读(619) 评论(0) 推荐(0) 编辑
摘要: 映射网络路径:1 $net = New-Object -com WScript.Network2 $drive = "Z:"3 $path = "\\$ip\D$"4 $net.mapnetworkdrive($drive, $path, $true, $username, $password) 阅读全文
posted @ 2014-08-22 09:50 momingliu11 阅读(389) 评论(0) 推荐(0) 编辑
  2014年8月21日
摘要: Windows2008/2012配置时间同步:w32tm /config /manualpeerlist:"time.youxinpai.com" /syncfromflags:manual /reliable:yes /update查客时间间隔:w32tm /stripchart /compute... 阅读全文
posted @ 2014-08-21 15:45 momingliu11 阅读(3368) 评论(0) 推荐(0) 编辑
摘要: 1 $text = "\\127.0.0.1\D$\Hotfix\Hotfix_Win2003\2014-04"2 $pathRoot = [System.IO.Path]::GetPathRoot($text)3 $driverLetter = $pathRoot[-2]4 Join-Path (... 阅读全文
posted @ 2014-08-21 14:37 momingliu11 阅读(184) 评论(0) 推荐(0) 编辑
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 90 下一页