I'm totally lost when it comes to WMI based calls and was wondering if anyone could shed some light?

All I need to specifically retrieve (not set) the WINS, DNS, and Default GW.

I've looked at a lot of the UDF's and can only find things to set, not just read.

Any help would be awesome.

Thanks,
Chris

Code:

$CurrentIP=EnumIPInfo(0,0)
$CurrentGW=EnumIPInfo(0,3)
$CurrentSM=EnumIPInfo(0,1)

$ComputerName = @WKSTA
$Username = @USERID

$msg = MessageBox("OS Version: " + @PRODUCTTYPE + @CRLF +
"Computer: " + @WKSTA + @CRLF +
@CRLF +
"IP: " + $CurrentIP + @CRLF +
"Subnet: " + $CurrentSM + @CRLF +
"Gateway: " + $CurrentGW + @CRLF +
@CRLF +
"Username: " + @USERID, "Computer Information",64)



Edited by dataspike (2006-01-04 09:46 PM)