現在、これは持っていますが、chromeとバージョンのマシンのみを報告します。私はそれが好きだと、オフラインになっているマシン、あるいはもっと重要なことにファイルが欠落しているマシンも報告しています。レポートスクリプト。特定のファイルが欠けているマシンを報告したい
$Computers = Get-Adcomputer -Filter *
foreach ($Computer in $Computers)
{
$PC = $computer.dnshostname
$hostname = $PC.split('.')[0]
Write-Host "\\$PC\c`$\Program Files\Google\Chrome\Application\chrome.exe"
$exe = "\\$pc\c`$\Program Files\Google\Chrome\Application\chrome.exe"
if (Test-Path $exe){
$ver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($exe).FileVersion
Add-Content -path .\results.csv "$exe,$ver"
}
}