Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 721 Bytes

File metadata and controls

19 lines (14 loc) · 721 Bytes

PowerShell Function - WordPress.com retrieve blog data using API

A quick PowerShell Function to retrieve blog post data from my blog site - added to Github as may be useful for others!

Run this function easily by:

Get-Blogs -BlogSiteName "thomasthornton.cloud"

Output: alt text

If you require further Output data from the used api, you can run

$WPBlogRetrieve = Invoke-RestMethod -uri "https://public-api.wordpress.com/rest/v1/sites/$BlogSiteName/posts/?number=100"
$WPBlogRetrieve.posts

Further info on WordPress.com API