Didnt know that this would work…
In a project that I’m working on the customer wanted me to create a Management Pack for a couple of services, the only problem was that they wanted to restart the services during the night.
My first solution was to create a group with the computer in it and run a PowerShell script to set the computer in to maintenance mode.
Then I tested to put my own class in that group and use the same script on the class instead.
Worked like a charm 🙂