Share via

Powershell script

Mark Gamble 1 Reputation point
2022-05-26T18:21:29.613+00:00

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???

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

1 answer

Sort by: Most helpful
  1. Rich Matheisen 48,116 Reputation points
    2022-05-26T19:13:01.94+00:00

    This is a duplicate of this question: powershell-scripting-issue.html

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.