@This is what I just got working in my environment:
$access_token="accessTokenHere"
$url = "URLGoesHere/api/v1/courses/canvasCourseIDGoesHere/?access_token=$access_token&course[event]=claim"
Invoke-RestMethod -Method Put -Uri $url -ContentType 'application/json'
Example:
$access_token="6589~bpboeFDztrlyoh2nb4ktio257nm90qido3wjnmxcksHDE213"
$url = "https://institution.test.instructure.com/api/v1/courses/771/?access_token=$access_token&course[event..."
Invoke-RestMethod -Method Put -Uri $url -ContentType 'application/json'
course[event]=claim will unpublish the course, remember if a course has graded student submissions then you will be unable to unpublish the course.