Skip to content

Commit a36e549

Browse files
committed
Replace $error
1 parent 21795f6 commit a36e549

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: AD-USER-Get-AccountLockedOut/AD-USER-Get-AccountLockedOut.ps1

+1-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ Function Get-AccountLockedOut {
6868
Write-Verbose -Message "[BEGIN] PDC is $(Get-PDCServer)"
6969
}#TRY
7070
CATCH {
71-
Write-Warning -Message "[BEGIN] Something wrong happened"
72-
Write-Warning -Message $Error[0]
71+
$PSCmdlet.ThrowTerminatingError($_)
7372
}
7473

7574
}#BEGIN

0 commit comments

Comments
 (0)