0

Powershell Invoke-WebRequest は、ディスクがいっぱいなどのダウンロード要求でクライアント側のエラーをスローするのでしょうか?

例えば:

 # Download recording
        try {
            $ProgressPreference = 'SilentlyContinue'
            $r = Invoke-WebRequest -Uri $jwtURL -OutFile $outfile
            $a = [int]$r.StatusCode
        }
        catch {
            $a = [int]$_.Exception.Response.StatusCode
        }

上記のコードは http ステータス コードのみを取得しますか、それともローカル ファイル システムにエラーを書き込みますか?

4

1 に答える 1