# WebページのURLを指定する
$url = "<https://example.com>"

# WebページのHTMLソースコードを取得する
$response = Invoke-WebRequest $url

# ダウンロードボタンに対応する要素を取得する
$button = $response.AllElements | Where-Object { $_.TagName -eq "button" -and $_.InnerText -eq "Download" }

# ダウンロードボタンをクリックする
$response = Invoke-WebRequest -Uri $url -Method Post -Body $button.Click()

# ダウンロードされたファイルを保存する
$response.Content | Set-Content -Path "C:\\path\\to\\save\\file.txt"