When trying to execute the POST to /api/command according to this description the following error occurs:
PS C:\\> $Result.Error remove-item : The Win32 int
After checking this issue on github the correct POSH command should be:
get-childitem -recurse | remove-item -recurse -force
It works well when executing directly from Kudu console or even REST API /api/command endpoint