title: Add filename increment in my script
body: <p>I have created a script that will rename pst files to acl owner. It works. The only problem i have is when there are two pst files in the same folder.It gives them the same name. How can i add an increment in my script. It ried it with Si = 1 and Si++ but with no results.</p>
  
  <p>Here is my script:</p>
  
  <pre class="lang-cs prettyprint-override"><code>Get-ChildItem C:\Users\tester\* -Filter *.pst -recurse |
      ForEach-Object{
          $owner = ( $_ | Get-Acl ).Owner.Split("\")[1]
          $newname = "$owner.pst"
          $_ | Rename-Item -NewName $newname -Verbose -WhatIf
      }
  </code></pre>