Skip to content

Rename-Item: Tell about NewName parameter allow scriptBlock #13412

Backlog

Description

@i5513

Type of issue

Missing information

Feedback

Please modify doc about newname.

Not only string are allowed

Get-ChildItem *.txt | Rename-Item -NewName { $_.Name -replace '.txt','.log' }
Get-ChildItem *.log

Thanks

Page URL

https://learn.microsoft.com/es-es/powershell/module/microsoft.powershell.management/rename-item?view=powershell-5.1

Content source URL

https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md

Author

Sean Wheeler (@sdwheeler)

Platform Id

03fe7cd2-32ae-598c-cf3e-49a14abc07ee

Document Id

0e1d944b-6c55-89ed-8e9a-5e5532dba818

Activity

  1. added
    needs-triage
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions