暂停Windows PowerShell 10秒: Start-Sleep –s 10 暂停脚本10秒(10,000毫秒) Start-Sleep –m 10000 语法 Start-Sleep [-seconds] <int> [<CommonParameters>] Start-Sleep -m ...
分类:
系统相关 时间:
2017-06-30 19:54:39
阅读次数:
241
1 $num=0 2 do 3 { 4 $num 5 $num+=1 6 } 7 while($num -le 10) 或是用until 或是用until 结果 ...
分类:
系统相关 时间:
2017-06-30 18:55:51
阅读次数:
253
或 结果 这里的感叹号!代表非的意思,也可以写作-not Powershell 中的比较运算符 -eq :等于 -ne :不等于 -gt :大于 -ge :大于等于 -lt :小于 -le :小于等于 -contains :包含 -notcontains :不包含 -not :非 -is :是 -a ...
分类:
系统相关 时间:
2017-06-30 18:46:43
阅读次数:
281
Powershell Exchange Message Per Day Sent and Reveive ...
分类:
系统相关 时间:
2017-06-29 20:26:42
阅读次数:
237
Update-SPSolution -Identity contoso_solution.wsp -LiteralPath c:\contoso_solution_v2.wsp -GACDeployment此示例将已部署的 contoso_solution.wsp SharePoint 解决方案升级 ...
分类:
系统相关 时间:
2017-06-28 11:53:08
阅读次数:
190
在Windows PowerShell里New-TimeSpan cmdlet提供了一种方法做日期算法。 计算时间间隔: 这个命令告诉你今天的日期与2006年除夕之间的天数: New-TimeSpan $(Get-Date) $(Get-Date –month 12 -day 31 -year 20 ...
分类:
系统相关 时间:
2017-06-26 22:50:06
阅读次数:
601
代码原文地址: https://gallery.technet.microsoft.com/scriptcenter/Get-TimeZone-PowerShell-4f1a34e6 ...
分类:
系统相关 时间:
2017-06-26 22:40:53
阅读次数:
207
Function Get-PendingReboot { <# .SYNOPSIS Gets the pending reboot status on a local or remote computer. .DESCRIPTION This function will query the regi ...
分类:
系统相关 时间:
2017-06-26 22:27:12
阅读次数:
201
Function Get-registerkey 引用前一篇文章中的代码的一部分做修改,从注册表中查询server的susid Function Get-registerkey { <# #> [CmdletBinding()] param( [Parameter(Position=0,ValueF ...
分类:
系统相关 时间:
2017-06-26 22:26:40
阅读次数:
232