Requirement: Finding a way to automate the creation of Role for any services with its permissions. Example: Citrix service account to be integrated with vCenter. Steps: 1) Login to vCenter : https://192.168.1.68/mob 2) Click on 'Content' 3) Click on Authorization Manager 4) Click on 'AddAuthorizationRole' 5) Provide name in name field & privId in xml format & Click Invoke Method This should give you a return value and then the Role will be reflected on vCenter.
Requirement: We needed to collect all the iDRAC/ILO/CIMC/OOB/BMC IPs of the ESXi host connected to vCenter Note: Create a directory and update the path. Script: # Prompt for vCenter $vcenter = Read-Host "Enter vCenter IP or FQDN" $cred = Get-Credential # Output file $OutputPath = "C:\Users\TestUser\Documents\ESXi_Full_Report.csv" # Connect Connect-VIServer -Server $vcenter -Credential $cred -WarningAction SilentlyContinue Write-Host "Connected to vCenter. Gathering data..." -ForegroundColor Green $report = @() $vmhosts = Get-VMHost foreach ($vmhost in $vmhosts) { Write-Host "Processing host: $($vmhost.Name)" -ForegroundColor Cyan $view = Get-View $vmhost.Id # --- SERIAL NUMBER LOGIC --- $serial = $view.Hardware.SystemInfo.SerialNumber if (-not $serial) { foreach ($id in $view.Summary.Hardware.OtherIdentifyingInfo) { if ($id.IdentifierType.Key ...