2014年8月26日
摘要:
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
阅读(561)
推荐(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
阅读(607)
推荐(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
阅读(867)
推荐(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
阅读(198)
推荐(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
阅读(287)
推荐(0)
摘要:
创建,显示和删除保存的用户名和密码:cmdkey.exe /add:targetname /user:username /pass:password
阅读全文
posted @ 2014-08-22 09:51
momingliu11
阅读(650)
推荐(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
阅读(403)
推荐(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
阅读(3400)
推荐(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
阅读(191)
推荐(0)
2014年8月20日
摘要:
在一个button_click下调用了如下外部可执行文件:1 $button1_Click = {2 #TODO: Place custom script here3 .\PsExec.exe \\192.168.10.2 -u testp\administrator -p cm...
阅读全文
posted @ 2014-08-20 23:02
momingliu11
阅读(260)
推荐(0)