curl.exeコマンドを使う。PowerShellにはcurlがInvoke-WebRequestコマンドレットのエイリアスとして割り当てられているため、PowerShellのコマンドプロンプトでは「curl.exe」として実行すること。以下では、首相官邸のトップページをtemp.htmlというファイル名でダウンロードした例。
PS > curl.exe -o temp.html https://www.kantei.go.jp/index.html % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 32804 100 32804 0 0 21152 0 0:00:01 0:00:01 --:--:-- 21163 PS > Get-Content .\temp.html -TotalCount 4
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">