[batch-file] How do I get the IP address into a batch-file variable?

if you just want the ip address try this:

#Variable to store ip address
ipaddr=$(hostname -I)

echo "$ipaddr"