title: Cannot Bind Argument to Parameter 'NewName' because it is an empty string
body: <pre><code>Get-ChildItem -Name *.txt | Rename-Item -NewName { $_.name -replace '\.txt','.log' }
  </code></pre>
  
  <p>I have 3 text files in my current path, I'm using this snip bit of code found in the last example of...</p>
  
  <pre><code>get-help rename-item -full
  </code></pre>
  
  <p>(Powershell Version 2.0). For whatever reason, I keep receiving the following error:</p>
  
  <pre><code>Rename-Item : Cannot bind argument to parameter 'NewName' because it is an empty string.
  At line:1 char:40
  + Get-ChildItem -Name *.txt | Rename-Item &lt;&lt;&lt;&lt;  -NewName { $_.name -replace 
  '\.txt','.log' }
  + CategoryInfo          : InvalidData: (testfile3.txt:PSObject) [Rename-Item], 
  ParameterBindingValidationException
  + FullyQualifiedErrorId : 
  ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Rena
  meItemCommand
  </code></pre>
  
  <p>Clearly my alteration form .txt to .log isn't an empty string, and this matches exactly the same code as in found in Microsoft's last example of the cmdlet rename-item.</p>