-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
I am expecting a problem with «Invoke-WebRequest» in «Try-Catch».
I think error should generated when Internet connection is breaking, but next operator in Try-block is running.
The file on the disk remains PARTIALLY downloaded without any errors raising.
Expected behavior
I starts the downloading and reboots the router.
Try {Invoke-WebRequest -URI TheLargeFile -ErrorAction Stop; Write-Host "Error NOT exist"}
Catch {Write-Host "Error exist"}
Error existActual behavior
I starts the downloading and reboots the router.
Try {Invoke-WebRequest -URI TheLargeFile -ErrorAction Stop; Write-Host "Error NOT exist"}
Catch {Write-Host "Error exist"}
Error NOT existError details
No response
Environment data
Name Value
---- -----
PSVersion 7.1.4
PSEdition Core
GitCommitId 7.1.4
OS Microsoft Windows 10.0.19043
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module