Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

help with Rename Command

$
0
0

I have recently started learning powershell so don't have that much idea on the command i am using to rename a .PS1 file.

Rename-item C:\Users\admbharti.gupta\"users attribute.ps1" -new name "UsersAttribute.ps1"

After running the above command i am getting the below error:

Rename-Item : A positional parameter cannot be found that accepts argument 'UsersAttribute.ps1'.

At line:1 char:1

+ Rename-item C:\Users\admbharti.gupta\"users attribute.ps1" -new name "UsersAttri ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (:) [Rename-Item], ParameterBindingException

    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.RenameItemCommand

 

Kindly help me with this error.

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles