Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1.  
  2. Add-PSSnapin VMware.VimAutomation.Core
  3.  
  4. $server = (Read-Host "Enter VIC Server name ")
  5. $user = (Read-Host "Enter UserName ")
  6. $password = (Read-Host "Enter Password " -assecurestring)
  7. $decodedpassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($password))
  8. $Pool = (Read-Host "Enter ResourcePool Name ")
  9. if ($Pool -eq "") {exit}
  10.  
  11. Connect-VIServer $server -User $user -Password $decodedpassword
  12.  
  13.  
  14. #What VM's do we want to work with
  15. $vms = Get-vm -location $pool
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement