I would recommend the following:
Get-OSCustomizationNicMapping $s.name | Set-OSCustomizationNicMapping -IpMode UseStaticIP -IpAddress $s.IPAddress -SubnetMask 255.255.255.0 -DefaultGateway 1.1.2.1 -Dns $dns1,$dns2
I'm a bit late, but I hope this helps.
Andre