There might be more than one way to do this but here's what works for me:
1. Remote in to the IdPi using VNC or RDP and enter 99 at the text menu;
2. Enable user authorisation within the MC GUI of the IdPi from Tools > Options > Media Network and then navigate to Panel's System Settings at (using default setup)
<PC IP Address>:52199/Panel/#/system3. Log in and proceed to the Power option at:
<PC IP Address>:52190/Panel/#/system/power4. Execute shutdown
Once you've logged in you could probably issue an MCWS command but I'll leave you to research that one through. I'm sure you'll enjoy that homework exercise..