This is a duplicate of this question: powershell-scripting-issue.html
Powershell script
Mark Gamble
1
Reputation point
Data in the resulting script looks like this
H|datadata
D|record, record
I Created a calculation within the script to count the instances of “D|“. I assigned the resulting value to a variable. When there are more than one instances of the indicated string it gives the correct count. If there are no instances of the indicated string it gives the correct count of zero. If there is only one instance of the indicated string the result is nothing.
I have tried IF statements to check for a count of one and nothing so far has worked.
Ideas???