Hallo,
ich möchte das Ergebnis einer Abfrage unseres WSUS Servers als HTML ausgeben.
Folgendes Beispiel funktioniert wunderbar mit einer Ausgabe als .txt Datei, aber ich weiß nicht wo bzw. wie ich convertto-html einsetzen muss damit ich mehr oder weniger die gleiche Ansicht als HTML-Datei bekomme.
if (!$wsus) {$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer('WSUS-Server',$FALSE,80);}
$computerScope = new-object Microsoft.UpdateServices.Administration.ComputerTargetScope;
$computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::failed;
$updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope;
$updateScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::failed;
$computers = $wsus.GetComputerTargets($computerScope);
#dies ist eine Zeile
$computers | Where-Object {$_.OSDescription -like "*Server*";} | Sort-Object FullDomainName | foreach-object {$_.FullDomainName;$failedupdates = $_.GetUpdateInstallationInfoPerUpdate($updateScope);$failedupdates | foreach-object { $failedUpdate = $wsus.GetUpdate($_.UpdateId);" "+$failedUpdate.Title;}} > "c:\temp\wsus_failed_updates.txt"
Invoke-Item "c:\temp\wsus_failed_updates.txt"
Danke
Marcel
Ergänzung: Ich habe schon die eine oder andere HTML-Datei erstellt, aber in diesem speziellen Fall finde ich keine Lösung und mit Google komme ich auch nicht weiter.