VCSA 6.5u1 Ad integrated Identity Source automation

Share This:

Unfortunately there isn’t any official supported way to Automate PSC AD Integrated identity source in VCSA 6.5u1
In the past in v5.5 / 6.0 or 6.5 that was possible using sso-add-native-ad-idp.sh and sso_import.sh however for some reason those utilities are no longer present in 6.5u1 image.
Major pain point for any pod / stack build relying on orchestration! No identity source, prevents from importing users and groups and so on.
The workaround is to spin up VCSA 6.5 GA or earlier and extract:
sso_import.sh
sso-add-native-ad-idp.sh
Once done import into newly deployed 6.5u1 PSC (as a part of the workflow)
Syntax I’m using to built this part into Jenkins orchestration, (PSC is already joined to domain using /opt/likewise/bin/domainjoin-cli)
It throws an error after Identity source configuration but it works!!
I can use my domain creds, I can also remove this identity source using Web Client and re-add it so no stable objects there.
hopefully that help you folks
If someone found other ways to automate it please let me know!
 

Configure VCSA proxy at scale – SSHsessions module and vcsa list json – script

Share This:

 

 

Stage VCSA 6.5 updates using JSON file and SSHSessions module – script

Share This:

 

 

Create / Import host profile from existing config – PS PowerCLI

Share This:

https://github.com/cann0nf0dder/PS_PowerCLI.git

<#
NAME: Import_Host_Profile.ps1
AUTHOR: Chris Danielewski
DATE : 8/22/2017
PURPOSE: This script will import host profile from config location

OUTPUT: N/A
REQUIRED UTILITIES: PowerCLI,

==========================================================================
CHANGE HISTORY:
GE HISTORY:
v1.0 8/23/2017 CD New script!
#>

param(
[Parameter(Mandatory=$true)][String]$location
)

#environemt
$profile_name = “Imported_profile”
$pathTOprofile = $location + “profile.vpf”

$obj = Get-View ServiceInstance
$hpobj = Get-View -Id $obj.Content.HostProfileManager

$spec = New-Object VMware.Vim.HostProfileSerializedHostProfileSpec
$spec.Name = $profile_name
$spec.Enabled = $true
$spec.Annotation = “Imported via automation”
$spec.Validating = $false
$spec.ProfileConfigString = (Get-Content -Path $pathTOprofile)

$hpobj.CreateProfile($spec)

 

Export last host profile – PS Powercli script

Share This:

Quick script to export last host profile: https://github.com/cann0nf0dder/PS_PowerCLI.git

<#
NAME: Export_HostProfile.ps1
AUTHOR: Chris Danielewski
DATE : 8/22/2017
PURPOSE: This script will export host profile to new pod config location.

OUTPUT: N/A
REQUIRED UTILITIES: PowerCLI,

==========================================================================
CHANGE HISTORY:
GE HISTORY:
v1.0 8/22/2017 CD New script!
#>

param(
[Parameter(Mandatory=$true)][String]$location
)

#environemt
$lastprof = @()
$lastprof = Get-VMHostProfile
$hostProfile = $lastprof[-1]
$hostProfileName = $lastprof[-1].Name
$output = $location + “\” + “profile.vpf”
Export-VMHostProfile -FilePath $output -Profile $hostProfile -Force

 

Quick powercli search for information on recently deleted VMs

Share This:

Above is quick and dirty syntax that’s quite easy to remember!

More syntax options can be found here: http://www.virtu-al.net/2009/08/27/powercli-one-liners-last-10-vms-created-and-removed/

 

 

vSphere 6.x Enable & Disable iSCSI Jumbo Frames on vmk & vswitches powershell script

Share This:

 

 

PowerCLI Core on Mac OS Sierra setup guide

Share This:

“PowerCLI Core uses Microsoft PowerShell Core and .Net Core to enable users of Linux, Mac and Docker to now use the same cmdlets which were previously only available on windows.”

This will allow you to use PowerCLI and connect to vCenter Server / Hosts directly from your Mac Terminal!

1.Download the fling from:

https://labs.vmware.com/flings/powercli-core#summary

2.Download and Install Homebew

“Homebrew installs the stuff you need that Apple didn’t” – is a free and open-source software package management system that simplifies the installation of software on Apple’s macOS operating system – Amazing tool!

Open Terminal and run:

Output:

3. Install OpenSSL and Curl (using homebrew!)

Output:

4. Install wget (using homebrew!)

Output:

5. Donwload Powershell for MAC

Output:

6.Install Powershell (via GUI or terminal)

7.Create modules directory

8.Unzip flig contents to modules directory

9.Run powershell!

10. Import modules

11. Ignore the certs

12. Connect to vC:

Enjoy!

 

vSphere ESXi Rolling reboots Safe powershell script – Calculate Cluster load / Safe MM

Share This:

 

 

Calculate Cluster Load vSphere powershell script / function

Share This:

I was surprised I couldn’t find this script/function when looking across WWW.

Here it is!