naosuke84

vm-remigrate.ps1

Sep 1st, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #script to migrate VMs back to VMWare host
  2.  
  3. #connects to VCenter
  4. connect-viserver aom-c-vcenter-01.c-tran.org
  5.  
  6. #Set's target server
  7. $target = Read-Host 'What Server are we moving VMs to?'
  8.  
  9. #imports list of servers from vm-migrate.ps1 and sets it to variable $vms
  10. $vms = Import-Csv h:\Migrated-VMs.CSV
  11.  
  12. #moves servers from $vms to specified host.
  13. move-vm -vm $vms.name -destination $target -vmotionpriority high
Advertisement
Add Comment
Please, Sign In to add comment