How to get, delete or publish wordpress post from powershell using Rest API?

Yes, this is possible to get/set wordpress  data using rest api. This is very simple and quick way to publish, delete or get post from anywhere.

Step 1 – install “JSON Basic Authentication” and “WP REST API” by WP REST API Team , you might want to see this for interested plugins.

Step 2 – below is code to get, delete, post method. you must have to pass username and password for basic authentication.

[gistpen id=”444″]

Output –


(Visited 4 times, 1 visits today)

By Arun Sabale

Arun is a Solution Architect on enterprise client management with more than 14 years of experience in IT. Arun Sabale is Blogger and tech enthusiast. His main focus is on Azure cloud infra, Cloud automation with powershell, python, ARM terraform and all cloud infra services like compute, storage, network, automation, function api etc... LinkedIN - https://www.linkedin.com/in/arun-sabale/