摘要:
安装MSI包使用PowerShell调用WMI对象,你可以执行下面的脚本来安装你的MSI安装包:1 $box="deviis01" #this is the name of your server2 $product= [WMICLASS]"\\$box\ROOT\CIMV2:win32_Produ... 阅读全文
posted @ 2014-08-28 13:59
momingliu11
阅读(2345)
评论(0)
推荐(1)
摘要:
powershell.exe -Command "& { ('time={0},user={1}' -f (get-date),(whoami)) | Out-File "d:\user.log" -Append }"给.exe文件添加参数,参数是 array 格式$argus = "$env:wi... 阅读全文
posted @ 2014-08-28 13:57
momingliu11
阅读(7473)
评论(0)
推荐(0)
摘要:
WMI服务能够报告详细的硬件信息。通常,每个硬件都来自它们自己的WMI代理类。但是要找出这些硬件类的名字是不容易。所有硬件类都在同一个WMI根下面,你可以在根类查询所有的硬件:Get-WmiObject -Class CIM_LogicalDevice | Out-GridView上面命令能返回基础... 阅读全文
posted @ 2014-08-28 13:37
momingliu11
阅读(626)
评论(0)
推荐(0)
摘要:
function Invoke-SQL1:function Invoke-SQL { param( [string] $DBServer, [string] $Database, [string] $SQLCMD ) $connecti... 阅读全文
posted @ 2014-08-28 11:15
momingliu11
阅读(2023)
评论(0)
推荐(0)
浙公网安备 33010602011771号