【发布时间】:2019-03-07 17:11:06
【问题描述】:
从目录中查找 MSI 文件列表并远程或本地安装在给定的 PC 上。我希望能够运行一个脚本,该脚本将在给定目录中 1 个 1 个安装 8 个单独的 MSI 文件。我找到了这个脚本并认为它可以工作,但我觉得它好像缺少什么对吗?
foreach($_msiFiles in
($_msiFiles = Get-ChildItem $_Source -Recurse | Where{$_.Extension -eq ".msi"} |
Where-Object {!($_.psiscontainter)} | Select-Object -ExpandProperty FullName))
{
msiexec /i $_msiFiles /passive
}
【问题讨论】:
-
您熟悉Heath Stewart 的Windows Installer PowerShell Module - Microsoft 高级软件工程师 (github) 吗?还有for the record.
标签: powershell windows-installer