フォルダからインストールされた更新プログラムの状態を確認するためのヘルプが必要でした。以下のスクリプトがあります。フォルダからWindows Updatesをインストールし、インストール済みかどうかを返信してください
# Specify the location of the *.msu files
$updatedir = "C:\install\hvpatches"
foreach ($msu in $msus)
{
write-host "Installing update $msu ..."
$fullname = $msu.fullname
# Need to wrap in quotes as folder path may contain spaces
$fullname = "`"" + $fullname + "`""
###
$files = Get-ChildItem $updatedir -Recurse
$msus = $files | ? {$_.extension -eq ".msu"}
# Specify the command line parameters for wusa.exe
$parameters = $fullname + " /quiet /norestart"
# Start wusa.exe and pass in the parameters
$install = [System.Diagnostics.Process]::Start("wusa",$parameters)
$install.WaitForExit()
write-host "Finished installing $msu"
}
更新はスクリプト上からインストールされているウィンドウは、私が望んでいたことは、これらの更新プログラムが正しくインストールされているかどうかを確認するか、インストールが失敗した場合、ステータスを与えるためにいくつかの方法です。
私たちのPowerShellの達人のいくつかは私を助け願っています:)
おかげで、 Vinith!