Posted On August 29, 2022

How To Use CredSSP to Move Virtual Machines In a Hyper-V Cluster

kimconnect 0 comments
blog.KimConnect.com >> Codes , Virtualization >> How To Use CredSSP to Move Virtual Machines In a Hyper-V Cluster
# Prep on Client
$domain='intranet.kimconnect.com'
Enable-WSManCredSSP -Role "Client" -DelegateComputer "*.$domain"

# Prep on Server
Enable-WSManCredSSP -Role "Server"

# Test a command the requires CredSSP
$adminUsername='intranet\brucelee'
$plaintextPassword='SOMEPASSWORD'
$encryptedPassword=ConvertTo-securestring $plaintextPassword -AsPlainText -Force
$adminCredential=New-Object -TypeName System.Management.Automation.PSCredential -Args $adminUsername,$encryptedPassword

$vmName='testWindows'
$currentNode='lax-node002'
$newOwnerNode='lax-node008'

invoke-command -computername $currentNode -credential $adminCredential -scriptblock {
		param($vmName,$newOwnerNode)
		Move-ClusterVirtualMachineRole -Name $vmName -MigrationType Live -Node $newOwnerNode
	} -Args $vmName,$newOwnerNode

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Some Useful VMWare ESX CLI commands

#Clear current session terminal messages:clear#Review shell command history:vi /var/log/shell.log#Round robin for EQLOGIC HBA ports:esxcli storage…

Windows Domain Controller restore Procedure

1. Terminate instance on AWS or Delete VM from VMWare 2. Perform these steps on…

Basic JavaScript: Understanding Uninitialized Variables

// Initialize these three variablesvar a;var b;var c;// Do not change code below this linea…