How to use Windows netsh firewall command to allow only specific ipaddress on all port and deny all other ipaddress?

You can use these commands:

netsh advfirewall firewall add rule name="My Trusted In" dir=in action=allow protocol=ANY remoteip=62.9.97.12

netsh advfirewall firewall add rule name="My Trusted Out" dir=out action=allow protocol=ANY remoteip=62.9.97.12