Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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="cx-esx-01.tehcloudxpert.local"
- $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"
- Write-Host "finished"
- Invoke-Expression "$installer $UpdatedConfig --accept-eula"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement