How to use the Client API to put server in maintenance mode?

We know how to get whether or not a server is in maintenance mode.

But how do we use the Client API to turn maintenance mode on and off?

A bit more searching and I found this script, which works perfectly.

Hi Michael,

Thanks for getting in touch. That’s great to hear you’ve found a working solution, and great that old script still works! Seems like we’ve done a good job at keeping backwards compatibility. :slight_smile:

Even though Octoposh is officially out of support, and that this script seems to come from the Octoposh PowerShell gallery page, it’s only doing a raw API call, so it’s fine to keep using it.

Thanks for letting us know, and please don’t hesitate to reach out if you have any questions or concerns moving forward!

Best regards,


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.