< Back
Assert-LastError
Post
NAME Assert-LastError
SYNOPSIS
OBSOLETE. Use `Assert-Error` instead.
SYNTAX
Assert-LastError [-ExpectedError] <String> [[-Message] <String>] [<CommonParameters>]
DESCRIPTION
OBSOLETE. Use `Assert-Error` instead.
PARAMETERS
-ExpectedError <String>
The expected error message for the last error.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Message <String>
A custom message to show when the assertion fails.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Assert-Error -Last 'not found'
Demonstrates how to use `Assert-Error` instead.
RELATED LINKS
SYNOPSIS
OBSOLETE. Use `Assert-Error` instead.
SYNTAX
Assert-LastError [-ExpectedError] <String> [[-Message] <String>] [<CommonParameters>]
DESCRIPTION
OBSOLETE. Use `Assert-Error` instead.
PARAMETERS
-ExpectedError <String>
The expected error message for the last error.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Message <String>
A custom message to show when the assertion fails.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Assert-Error -Last 'not found'
Demonstrates how to use `Assert-Error` instead.
RELATED LINKS