As Allen says, the interface will not work with Vista, but if you only need it for pre-Vista OS:

$strComputer = "."
$objWMIService = GetObject("winmgmts:\\" + $strComputer + "\root\wmi")
$colItems = $objWMIService.ExecQuery("Select * from MSNdis_80211_ServiceSetIdentifier",,48)
For Each $objItem in $colItems
$objItem.instanceName+" SSID: '"+funByteArray2String($objItem.Ndis80211SsId)+"'"+@CRLF
Next


Function funByteArray2String($ab)
$funBtyeArray2String=""
For Each $b in $AB
If CInt($b)>=32 AND CInt($b<=127)
$funByteArray2String=$funByteArray2String+CHR($b)
EndIf
Next
Exit 0
EndFunction



Important note!
The other thing you need to be aware of is that the data returned is a "byte array", and KiXtart does not support this data type although in this case the code does work.

The first four elements of the array appear to be the SSID string length so you could code a more complex array-to-string converter but as long as your SSIDs are short and contain only typeable 7-bit ASCII characters you can get away with the function as presented.