From the README at https://sourceforge.net/p/winexe/winexe-waf/ci/master/tree/ Building ======== Winexe makes use of Samba version 4. Winexe can be built such that it is statically linked to Samba libraries, resulting in an executable that is several megabytes in size. The winexe binary is still dynamically linked to a number of shared libraries such as libc. On some distributions winexe can be built such that it is linked to Samba shared libraries, resulting in an executable less than 100 kilobytes in size. * * * As for waf (the build tool) -- https://packages.altlinux.org/en/Sisyphus/srpms/waf
See also https://sourceforge.net/p/winexe/activity?source=project_activity for info about building on recent Fedora...
The usage is documented in the screenshot at https://sourceforge.net/projects/winexe/ -- https://a.fsdn.com/con/app/proj/winexe/screenshots/winexe%20screenshot.png .
A similar functionality is provided by pywinrm (written in Python) -- https://bugzilla.altlinux.org/show_bug.cgi?id=32317 .