Skip to content

Instantly share code, notes, and snippets.

@thecloudxpert
Last active August 6, 2016 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thecloudxpert/40300ed0819c042658dfcada47453bb4 to your computer and use it in GitHub Desktop.
Save thecloudxpert/40300ed0819c042658dfcada47453bb4 to your computer and use it in GitHub Desktop.
# Deploy PSC using vCSA-Deploy
# Convert JSON file to PowerShell object
$ConfigLoc = "D:\vcsa-cli-installer\templates\install\PSC_on_ESXi.json"
$Installer = "D:\vcsa-cli-installer\win32\vcsa-deploy.exe"
$UpdatedConfig = "C:\Temp\configuration.json"
$json = (Get-Content -Raw $ConfigLoc) | ConvertFrom-Json
# ESXi Host Information
$json."target.vcsa".esx.hostname="<ESXi Host FQDN>"
$json."target.vcsa".esx.datastore="vmNFS02"
$json."target.vcsa".esx.username="root"
$json."target.vcsa".esx.password="<Password>"
# vCSA system information
$json."target.vcsa".os.password="<Password>"
$json."target.vcsa".os."ssh.enable"=$true
# VCSA SSO information
$json."target.vcsa".sso.password = "<Password>"
$json."target.vcsa".sso."site-name" = "Default-First-Site"
$json."target.vcsa".sso."domain-name" = "vsphere.local"
$json."target.vcsa".appliance."deployment.option"="infrastructure"
$json."target.vcsa".appliance."deployment.network"="<Port Group>"
$json."target.vcsa".appliance.name="<PSC Name>"
$json."target.vcsa".appliance."thin.disk.mode"=$false
# Networking
$json."target.vcsa".network.hostname = "<PSC FQDN>"
$json."target.vcsa".network.mode = "static"
$json."target.vcsa".network.ip = "<PSC IP Address>"
$json."target.vcsa".network."ip.family" = "ipv4"
$json."target.vcsa".network.prefix = "24"
$json."target.vcsa".network.gateway = "<Default Gateway>"
$json."target.vcsa".network."dns.servers"="<DNS Server>"
$json | ConvertTo-Json | Set-Content -Path "$UpdatedConfig"
Invoke-Expression "$installer $UpdatedConfig --accept-eula"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment