I am wanting to retrieve all network information like that of a IPCONFIG /ALL. Now I suppose I can have bigfix run the IPCONFIG /ALL and pipe that into registry keys then create retrieved properties on those keys but I wonder if this is a better way? So far I have come up with
(description of it & " " & address of it as string & " " & gateway of it as string & " " & subnet mask of it as string) of adapters of network
But if there is an adapter that has NOTHING for the gateway or DNS I will get an error Error: Singular expression refers to nonexistent object.
Anybody come up with something like this? IPCONFIG /ALL would be great because it also shows the binding order of the interfaces.
for gateways, we use : addresses of gateway lists of adapters whose (address of it != “0.0.0.0”) of network, but this gives all gateways on all network adapters. I take it you want what settings go with which cards.
I bet there is a better way to get what you are looking for by creating an analysis with individual properties, but if you want it all in one property, try throwing some if’s in there:
( description of it &
" " & address of it as string &
" " & (
if exists gateway of it then gateway of it as string
else
"N/A" ) &
" " & (
if exists subnet mask of it then subnet mask of it as string
else
"N/A" ) &
" " & (
if exists dns servers of it then concatenation
"," of ( address of it as string ) of dns servers of it
else
"N/A" ) ) of adapters whose ( address of it !=
"0.0.0.0" ) of network