📜  powershell http 请求 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:14.787000             🧑  作者: Mango

代码示例1
# Here we are using Invoke-WebRequest to retrieve web content from /r/PowerShell:
# retrieve dynamic content from a website
$webResults = Invoke-WebRequest -Uri 'https://reddit.com/r/powershell.json'
$rawJSON = $webResults.Content
$objData = $rawJSON | ConvertFrom-Json
$posts = $objData.data.children.data
$posts | Select-Object Title,Score | Sort-Object Score -Descending