Rename-Item: Tell about NewName parameter allow scriptBlock

未关闭 适合新手
#13,412 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@gerardrecinto 已经在做这个了。

开始于 2026年12月1日。

  • #13422 来自 @gerardrecinto —— 未关闭

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
88/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
powershell
领域
documentation

调研方向

编辑 reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md 的 -NewName 部分,并检查 reference/ 下较新版本文件夹中是否需要相同的措辞(该 issue 链接到 7.6 页面)。说明 -NewName 除了字符串外还接受脚本块,并添加该 issue 提供的示例 Get-ChildItem *.txt | Rename-Item -NewName { $_.Name -replace '.txt','.log' }。当参数说明和示例在 Markdown 中正确呈现时即完成。

由索引模型根据 Issue 内容生成。

描述

needs-triage
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

@sdwheeler

Platform Id

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

Document Id

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

主要语言
PowerShell
星标
2.6k
派生
1.7k
平均合并
3 小时 49 分钟
30 天内合并 PR
5

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MicrosoftDocs/PowerShell-Docs 的其他 Issue

查看 MicrosoftDocs/PowerShell-Docs 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。