Skip to content

Instantly share code, notes, and snippets.

View thecloudxpert's full-sized avatar

Christopher Lewis thecloudxpert

View GitHub Profile
$vcenter = Read-Host -Prompt "Enter the FQDN of the vCenter Server"
$sso_user = Read-Host -Prompt "Enter the SSO Admin User"
$sso_password = Read-Host -assecurestring -Prompt "Enter the SSO Admin Password"
$vra_privileges = @(
"ContentLibrary.AddLibraryItem",
"ContentLibrary.CreateLocalLibrary",
"ContentLibrary.DeleteLibraryItem",
"ContentLibrary.DeleteLocalLibrary",
"ContentLibrary.DeleteSubscribedLibrary",
#Cloud Automation Services
$role = Read-Host -Prompt "Enter the name for the CAS Role"
$vcenter = Read-Host -Prompt "Enter the FQDN of the vCenter Server"
$sso_user = Read-Host -Prompt "Enter the SSO Admin User"
$sso_password = Read-Host -assecurestring -Prompt "Enter the SSO Admin Password"
$cas_user = Read-Host -Prompt "Enter the name of the VRA User (<domain>\<user>)"
$CAS_Privileges = @(
# DataStore
#Automation
$role = "vRealize Automation User"
$vcenter = Read-Host -Prompt "Enter the FQDN of the vCenter Server"
$sso_user = Read-Host -Prompt "Enter the SSO Admin User"
$sso_password = Read-Host -assecurestring -Prompt "Enter the SSO Admin Password"
$vra_user = Read-Host -Prompt "Enter the name of the VRA User (<domain>\<user>)"
$vRA_Privileges = @(
"Datastore.AllocateSpace",
# Deploy PSC ClLuster using vCSA-Deploy
# Convert JSON file to PowerShell object
$ConfigLocation = "<location of custom JSON template files>"
$Installer = "<ISO>\vcsa-cli-installer\win32\vcsa-deploy.exe"
$UpdatedConfig = "<location>"
$domain = "<ad domain>"
$vCenterServer="<server>"
$vCenter_user = "<vCenter User>"
$vCenter_password = "<vCenter User password>"
$sso_domain= "<vCenter SSO domain>"
# Deploy vCSA6 using vCSA-Deploy
# Convert JSON file to PowerShell object
$TMP = Read-Host -Prompt "Enter the location of the JSON Template:"
$ISO = Read-Host -Prompt "Enter the Root folder for ISO (i.e. d:\temp):"
$CFG = Read-Host -Prompt "Enter the location for the new configuration file:"
$SSOPassword = Read-Host -Prompt "Enter the SSO Administrator Password:"
$PSCPassword = Read-Host -Prompt "Enter the PSC Root Password:"
$VCServer = Read-Host -Prompt "Enter the FQDN of the target vCenter server:"
$VCUsername = Read-Host -Prompt "Enter the name of the vCenter User:"
{
"__version": "1.1",
"__comments": "Sample template to deploy a Platform Services Controller to a vCenter Server.",
"target.vcsa": {
"appliance": {
"deployment.network": "<port group>",
"deployment.option": "infrastructure",
"name": "<display name>",
"thin.disk.mode": true
},
# 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>"
{
"__version": "1.1",
"__comments": "Sample template to deploy a Platform Services Controller to an ESXi host.",
"target.vcsa": {
"appliance": {
"deployment.network": "VM Network",
"deployment.option": "infrastructure",
"name": "vCenter-Server-Appliance",
"thin.disk.mode": true
},