![]() ![]() HelpMessage = "The system the credentials will be used for.")] Out-CUConsole -Message "The script did not get enough arguments from the Console. # Check all the arguments have been passed # Not an exception or a warning, output the message # Write the warning to Warning stream, thats it. Write-Warning -Message "There was an error.`n$Message" Write-Warning "There was an unexpected error: $($)`nPlease see the Error tab for details." Write-Error "$Message`n$($)`n$($Exception.CategoryInfo)`n$($)" -ErrorAction Stop Write-Warning -Message "$Message`n$($)`nPlease see the Error tab for the exception details." # Write simplified error message to Warning stream, Throw exception with simplified message as well ![]() ![]() # Throw error, include $Exception details if they exist # Name of the Horizon View connection server. Copy Script Copied to clipboard $ErrorActionPreference = 'Stop' ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |