PowerShell Logo Small

Rename-VM



This is the built-in help made by Microsoft for the command 'Rename-VM', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Renames a virtual machine.

SYNTAX


Rename-VM [-Name] <String> [-NewName] <String> [-ComputerName <String[]>] [-Passthru] [-Confirm] [-WhatIf] [<CommonParameters>]
Rename-VM [-VM] <VirtualMachine[]> [-NewName] <String> [-ComputerName <String[]>] [-Passthru] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Rename-VM cmdlet renames a virtual machine.



<

RELATED LINKS


Online Version: http://go.microsoft.com/fwlink/?LinkID=306921

REMARKS

<

Examples


Example 1

PS C:\>Rename-VM VM1 –NewName VM2



Renames virtual machine VM1 to VM2.




Example 2

PS C:\>Get-VM VM1 | Rename-VM –NewName VM2 -PassThru



Renames virtual machine VM1 to VM2 and displays the renamed virtual machine.