For the complete documentation index, see llms.txt. This page is also available as Markdown.

Write-PSUError

ÜBERSICHT

Schreibt einen Fehler in den Fehlerstream in PSU-Jobs.

SYNTAX

Write-PSUError -ErrorRecord <ErrorRecord> [<CommonParameters>]

BESCHREIBUNG

Schreibt einen Fehler in den Fehlerstream in PSU-Jobs.

BEISPIELE

Beispiel 1

try {
    throw "Error"
} catch {
    Write-PSUError $_
}

Löst eine Ausnahme aus, lässt den Job aber nicht fehlschlagen. Der Fehler wird im PSU-Fehlerprotokoll angezeigt.

PARAMETER

-ErrorRecord

Der im Protokoll anzuzeigende Fehlerdatensatz.

CommonParameters

Dieses Cmdlet unterstützt die allgemeinen Parameter: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable und -ProgressAction. Weitere Informationen finden Sie unter about_CommonParameters.

EINGABEN

System.Management.Automation.ErrorRecord

AUSGABEN

System.Object

HINWEISE

Zuletzt aktualisiert

War das hilfreich?