Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

powershell http request

# 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
Source by www.techthoughts.info #
 
PREVIOUS NEXT
Tagged: #powershell #http #request
ADD COMMENT
Topic
Name
1+4 =