VMware PowerCLI

The Best User Interface for your VMware Datacenter!

Merge Connect-* configuration commands for photon appliances

Hi All, To setup a vcenter via powercli , we need to :

Set up ssh, connect via SSH with New-SShSession,

join the machine via shell: /opt/likewise/bin/domainjoin-cli join ,

use VMware.vSphere.SsoAdmin & Connect-SsoAdminServer

for the local SSO Permissions,

Use Connect-VIServer for the Roles,

Use this webrequest for global permissions: $mob_url = "https://$VcenterName/invsvc/mob3/?moid=authorizationService&method=AuthorizationService.AddGlobalAccessControlList"

Use Invoke-RestMethod with

$NewHeaders = @{

'Accept' = 'application/json'

'vmware-use-header-authn' = $vsphereCredential.username

'vmware-api-session-id' = "null"

} to set up VCSA API .

Also the connect-cisserver for Tags.

It would be nice to merge theses . I do not have an answer for how to do it.

SystemConfiguration.Administrators role could have access to Vi-ConfigServer that will allow the virole/perm + global permissions + API configs + SSO permissions + Tags


Thank you for your time on this.


Regards


  • Alain Tanguy
  • Jun 1 2022
  • Looking for Feedback
  • Attach files