Download portqry if its not already installed: http://www.microsoft.com/downloads/en/details.aspx?familyid=89811747-C74B-4638-A2D5-AC828BDC6983&displaylang=en
portqry -n 192.168.1.2 -e 135
To obtain a list of endpoint mappings.
Get the port of the dynamic service you need from this list.
portqry -n 192.168.1.2 -o 5722 (where 5722 is the port number obtained from the first command)
To check if the port is listening.
Keep in mind that the dynamic port range changed in Windows 2008 and Vista. The old default range was 1025 to 5000, the Vista and 2008 + range is now 49,152 to 65,535.
You can view the range (and modify it) with netsh:
view: netsh int ipv4 show dynamicport tcp
change: netsh int ipv4 set dynamic tcp start=number num=range
(variations to the commands for ipv6 and for udp)