Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Adding a filter

$
0
0

Hi

I'm a PowerShell newbie trying to filter the output of a ForEach-Object startement:

 $spItems | ForEach-Object { 

 $xml.WriteStartElement('item');

 $xml.WriteAttributeString("ID",$_['ID']);
 $xml.WriteAttributeString("Title",$_['Title']);
 $xml.WriteAttributeString("Start",$_['Start']);
 $xml.WriteAttributeString("End",$_['End']);
 

I need to add a filter that ensures that only list items where the "End" column is empty, will be written.

How do I do that?

Thanks,

Jakob


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>