The MSF exploits the port 445 & 443, when the file sharing is on, its on SMB, which alllows MSF to exploit via firewall, as firewall allows the traffic this is regardless of payload. If you try to attempt a listening shell on port 443, then your traffic to port 443 needs to be allowed by the firewall. If your traffic to port 445 is allowed but your traffic to port 443 is not, As port 443 is directly assosiated with payload, if its block, you can adjust the payload and still gain the access, but if your traffic sent to port 445 is block then the exploit wont work.
This link may also help with your query.
Thank you for your answer.
I reading your answer I could not quite see where Nexpose and Metasploit was able to scan a load balancer that was positioned behind the firewall.
Port 80 and 443 was open on the firewall for access through to the load balancer, however when the filesharing tickbox was enabled on the firewall's external adaptor I could see all of the 8 open ports on the load balancer behind it.
The explanation that was given above does not seem to tell me why nexpose and metasploit were able to use filesharing to scan so much of the load balancer