Powershell - Try Catch - Non Powershell Errors
问题 Is it possible to create a try-catch that catches a non-Powershell cmdlet error? Example Error: iperf3: error - unable to connect to server: Connection timed out I want to catch that error and then try a different server for redundancy. Thank you for the assist. 回答1: you can try to build your own powershell function and throw an error with "throw " but you have to identify the error on your own within the powershell function 来源: https://stackoverflow.com/questions/63898608/powershell-try