The story: I read a json configuration file and somewhere in this, i get conversion challenges.
The json file
"FwRules":[{ "IP" : "222.33.44.00/27", "Comment" : "Santa" },
{ "IP" : "223.44.11.0/24", "Comment" : "Claus" },
Reading this file info a object gives me:
IP Comment
-- -------
222.33.44.00/27, Santa
223.44.11.0/24, Claus
I need to get to:
222.33.44.00/27
223.44.11.0/24
As you might guess, I want to use this in
New-NetFirewallRule -RemoteAddress $HERE
However column headers need to be removed.
The obvious way
$config.smtpservers.fwrules | select-object IP
returns what I want, but with column headers. And I really do not want to go the "foreach way", just because of OCD reasons.
So, is there a bright mind out there who can learn me how to strip of the column headers, because I cannot figure this out.