Files
qmi-cloud-tf-modules/archived/vm-fromsnapshot/scripts/RenameComputer.ps1
2020-12-03 09:49:23 +01:00

14 lines
247 B
PowerShell

Param(
[string] $NewName,
[switch] $NotApply = $False
)
if ($NotApply){
Write-Host "Not renaming machine"
} else {
Write-Host "Machine is going to be renamed as $NewName"
Rename-Computer -NewName $NewName -Force -Restart
}