rename-itemPowershell command to rename an item. Note:
renandrnican both be used as an alias forRename-Item. More information: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/rename-item.
Rename-Item -Path "{{path/to/file}}" -NewName "{{new_file_name}}"
Rename-Item -Path "{{path/to/directory}}" -NewName "{{new_directory_name}}"
Rename-Item -Path "{{path/to/file}}" -NewName "{{path/to/new_file_name}}"
Rename-Item -Path "{{path/to/file}}" -NewName "{{new_file_name}}" -Force
Rename-Item -Path "{{path/to/file}}" -NewName "{{new_file_name}}" {{[-Confirm|-cf]}}