Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Add-PSSnapin VMware.VimAutomation.Core
- $server = (Read-Host "Enter VIC Server name ")
- $user = (Read-Host "Enter UserName ")
- $password = (Read-Host "Enter Password " -assecurestring)
- $decodedpassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($password))
- $Pool = (Read-Host "Enter ResourcePool Name ")
- if ($Pool -eq "") {exit}
- Connect-VIServer $server -User $user -Password $decodedpassword
- #What VM's do we want to work with
- $vms = Get-vm -location $pool
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement