Powershell XML count error



Currently I'm working on a little powershell script which process an XML file and display some statistics info from it.


At a part I'd like to count the occurence of a node and here I run into trouble. Everything works as it should be except the fact that it do not write to the host if there is only 1 occurence. In other cases it is ok, but when tehre is only one instance to count, the count property (or fucntion sry I'm not sure whic one is this) got no value.


Anyone experienced ever the same? I'm new in PS it's about a few days so if I did some idiot thing sorry for that in advance :)


No comments:

Post a Comment