I posted a NICInfo UDF a while back - it returns an array of all network adapters detected on a local or remote system. One of the items is the adapter name. You could do something like
Code:

$Name = NicInfo()[0][12]
$Cmd = 'netsh interface ip set address "' + $Name + '" gateway=192.168.0.2 gw=1'
Shell $Cmd


This example assumes a single NIC is located, and returns the 12th element of the first NIC in the NIC array. (This is an array of arrays.)

Alan (AlPo) has a similar UDF, but I'm not sure if it enumerates all of the network adapters.

Glenn