Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. # Deploy PSC using vCSA-Deploy
  2. # Convert JSON file to PowerShell object
  3. $ConfigLoc = "D:\vcsa-cli-installer\templates\install\PSC_on_ESXi.json"
  4. $Installer = "D:\vcsa-cli-installer\win32\vcsa-deploy.exe"
  5. $UpdatedConfig = "C:\Temp\configuration.json"
  6. $json = (Get-Content -Raw $ConfigLoc) | ConvertFrom-Json
  7.  
  8.  
  9. # ESXi Host Information
  10. $json."target.vcsa".esx.hostname="cx-esx-01.tehcloudxpert.local"
  11. $json."target.vcsa".esx.datastore="vmNFS02"
  12. $json."target.vcsa".esx.username="root"
  13. $json."target.vcsa".esx.password="<Password>"
  14.  
  15. # vCSA system information
  16. $json."target.vcsa".os.password="<Password>"
  17. $json."target.vcsa".os."ssh.enable"=$true
  18.  
  19. # VCSA SSO information
  20. $json."target.vcsa".sso.password = "<Password>"
  21. $json."target.vcsa".sso."site-name" = "Default-First-Site"
  22. $json."target.vcsa".sso."domain-name" = "vsphere.local"
  23.  
  24.  
  25. $json."target.vcsa".appliance.deployment.option="infrastructure"
  26. $json."target.vcsa".appliance."deployment.network"="<Port Group>"
  27. $json."target.vcsa".appliance.name="<PSC Name>"
  28. $json."target.vcsa".appliance."thin.disk.mode"=$false
  29.  
  30. # Networking
  31. $json."target.vcsa".network.hostname = "<PSC FQDN>"
  32. $json."target.vcsa".network.mode = "static"
  33. $json."target.vcsa".network.ip = "<PSC IP Address>"
  34. $json."target.vcsa".network."ip.family" = "ipv4"
  35. $json."target.vcsa".network.prefix = "24"
  36. $json."target.vcsa".network.gateway = "<Default Gateway>"
  37. $json."target.vcsa".network."dns.servers"="<DNS Server>"
  38.  
  39. $json | ConvertTo-Json | Set-Content -Path "$UpdatedConfig"
  40. Write-Host "finished"
  41.  
  42. Invoke-Expression "$installer $UpdatedConfig --accept-eula"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement