PassThrou to rename computer

This commit is contained in:
Manuel Romero
2020-10-29 12:15:19 +01:00
parent b1c2e3d1c1
commit 324d5cc3b0

View File

@@ -10,5 +10,5 @@ if ($NotApply){
Write-Host "Not renaming machine"
} else {
Write-Host "Machine is going to be renamed as $NewName"
Rename-Computer -NewName $NewName -Force -Restart
Rename-Computer -NewName $NewName -PassThru -Force -Restart
}