SharpWMI.exe computername=$IP action=exec command="cmd.exe /c whoami > C:\Temp\out.txt"

Execute a command on a remote host via WMI from Windows.

Command: Windows

References:

https://github.com/GhostPack/SharpWMI