Sorry, don't know how bloknot all the ports, but you can try using dash, that is 1-49151
Team
netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=(port) name="Block_TCP-(port)
or you can sasamat in the batch file this command and change only the port number.
Software simpler.