OBSOLETE. Use Assert-Error
instead.
Assert-LastError [-ExpectedError] <String> [[-Message] <String>] [<CommonParameters>]
OBSOLETE. Use Assert-Error
instead.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
ExpectedError | String | The expected error message for the last error. |
true | false | |
Message | String | A custom message to show when the assertion fails. |
false | false |
Assert-Error -Last 'not found'
Demonstrates how to use Assert-Error
instead.