Guest User

Untitled

a guest
May 21st, 2018
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #$viserver = "192.168.68.20"
  2. $viserver = "vcsa1-nadc-hl2.vlab.local"
  3. $viusername = "administrator@vlab.local"
  4. $vipassword = "VMware1!"
  5.  
  6. $viconnection = Connect-VIServer -Server $viserver -User $viusername -Password $vipassword
  7.  
  8. $datastore = Get-Datastore -Name "vsanDatastore" -Server $viconnection
  9.  
  10. New-PSDrive -Location $datastore -Name ds -PSProvider VimDatastore -Root "\"
  11.  
  12. #New folder
  13. New-Item -Path ds:\VM-OVAS-OVFS -ItemType Directory
  14. New-Item -Path ds:\VM-OVAS-OVFS\W2K16 -ItemType Directory
  15.  
  16.  
  17. Copy-DatastoreItem -Item C:\bits\W2K16\F5w2k16base.mf -Destination ds:\VM-OVAS-OVFS\W2K16\
  18. Copy-DatastoreItem -Item C:\bits\W2K16\F5w2k16base.ovf -Destination ds:\VM-OVAS-OVFS\W2K16\
  19. Copy-DatastoreItem -Item C:\bits\W2K16\F5w2k16base-1.vmdk -Destination ds:\VM-OVAS-OVFS\W2K16\
  20.  
  21. Remove-PSDrive -Name DS -Confirm:false
  22. #Copy-DatastoreItem -Item C:\bits\en_windows_server_2016_updated_feb_2018_x64_dvd_11636692.iso -Destination ds:\ISOS\
Add Comment
Please, Sign In to add comment