PowerShell equivalente ao cmd "IF% ERRORLEVEL% NEQ 0"

Procurando o equivalente do PowerShell a esta verificação de erro do cmd:

IF %ERRORLEVEL% NEQ 0

Aqui está o código do PowerShell que estou tentando escrever:

Write-Information "Installing .NET 3 from DVD:"
$NetFX3_Source = "D:\Sources\SxS"
dism /online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:$NetFX3_Source /NoRestart
IF (****TheCommandYouTellMe****) {
Write-Information "DVD not found, installing from online sources, the Win default method"
DISM.EXE /Online /Add-Capability /CapabilityName:NetFx3~~~~
Add-WindowsCapability –Online -Name NetFx3~~~~
}

questionAnswers(1)

yourAnswerToTheQuestion