There may be more setup to do, especially for Windows Vista, Windows 7 and further windows versions, to allow remote shutdown:

Part A) On the Windows machine:

1) Add a remote shutdown security policy:

  • run secpol.msc

  • in the program tree, open Security Settings > Local Policies > User rights Assignment

  • Find the entry Force shutdown from a remote system

  • Edit the entry, add the windows user account that will be used for shutdown (ex: nouknouk)

2) Add registry keys to disable UAC remote restrictions:

  • Run regedit.exe as Administrator

  • Find HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System

  • Create a new registry DWORD(32) value named LocalAccountTokenFilterPolicy and then assign it the value 1

3) Start remote registry service:

  • Open cmd.exeas Administrator

  • Execute the two following commands:

    sc config RemoteRegistry start= auto

    sc start RemoteRegistry