As you can see in the image bellow there are (org.Nemo) :
/org/Nemo/window/1
/org/Nemo/window/2
/org/Nemo/window/3
/org/Nemo/window/4
I have four windows open and it shows that.
Each window has a GetMachineID command.
- How can I find how many windows are open by dbus-send or any equivalent command (using cli)?
- How to run the GetMachineID command on each window by dbus-send or any equivalent command (using cli)?

Many D-Bus API's make use of
GetManagedObjectsbut Nemo doesn't seem to be doing this. A way to find the information you want would be to usebusctltreecommand to find all the object paths and then use them to call theGetMachineId.For example:
You can wrap that in shell scripting or you could use Python.
An example using Python:
Gave the following output when I ran it: