Start-Transcript c:\scripts\InstallUpdates.log -Append # -NoClobber
$SourceMSUFiles = (get-content install-list.txt | where {$_ -like "*.msu"})
#Install MSU files
foreach($file in $SourceMSUFiles)
{
$Argument= "$Files",' /quiet',' /norestart'
& start wusa -ArgumentList @Argument -Wait # -RedirectStandardOutput "c:\scripts\InstallUpdates.log"
Write-Host "Installing $file" `n
}
stop-transcript
In normal cmd line this would work like this:
wusa $files /quiet /norestart
I want to use Powershell to do what I would normally do with command line.