Find all MSI files and install them from a directory

0
Find all MSI files and install them from a directory
1
2
3
4
$Path = Get-ChildItem -Path C:\Windows\CCMCache -Recurse -Filter *.MSI
ForEach ( $Installer in ( Get-ChildItem -Path $Path.DirectoryName -Filter *.MSI ) ) {
    Start-Process -Wait -FilePath C:\windows\system32\msiexec.exe -ArgumentList "/i $Installer.FullName /passive /norestart"
    }

Found priceless insights in this blog? Support the author’s creativity – buy them a coffee!

Leave a Reply

Your email address will not be published. Required fields are marked *