Well this was by no means obvious:
Foreach ($Line in $Config)
{
Foreach ($Entry in $Line.psobject.properties)
{
If ($Entry.Value -eq $null)
{
Return $False
}
}
}
jlc
________________________________________
From: Joseph L. Casale [[email protected]]
Sent: Monday, June 04, 2012 7:45 PM
To: NT System Admin Issues
Subject: RE: Powershell PSCustomObject
Sorry Michael,
$Config = Import-Csv -Path somefile.csv
The csv may look like:
"A","B","C","D"
"foo","bar","biz","baz"
"foo","bar","baz"
So I should expect to a see a NoteProperty for A,B,C and D on both lines but
testing for $Config[0].A through D etc is tedious and if the CSV file is
expanded the test has to be updated.
This is certainly easier with a hash...
Thanks!
jlc
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin