Skip to content

Instantly share code, notes, and snippets.

View imtrinity94's full-sized avatar
๐ŸŽฏ
Focusing on VMware VCF

Mayank Goyal imtrinity94

๐ŸŽฏ
Focusing on VMware VCF
View GitHub Profile
@imtrinity94
imtrinity94 / Updating Various Certificates in Aria Automation Orchestrator
Created July 14, 2026 12:16
Updating Various Certificates in Aria Automation Orchestrator
TITLE
Updating Various Certificates in Aria Automation Orchestrator
ISSUE/INTRODUCTION
Aria Automation Orchestrator utilizes several types of certificates for client communication,
internal component communication (gRPC), and external integrations.
If any of these certificates expire, it can cause critical issues.
Since these certificates do not renew automatically, an expired certificate may lead to unexpected communication failures.
ENVIRONMENT
@imtrinity94
imtrinity94 / vcfa9.1_contextParameters.js
Created July 10, 2026 13:09
VCF Automation 9.1 Context Parameters with 2 __
/* In VCF Automation 9.1 the Context Parameters - when used in vRO Actions in Custom forms
are with 2 x "_"
(and not 1 x "_" as mentioned in Aria Auto 8.18 Release Notes or KB as workaround). */
//Below references in case somebody needs it ๐Ÿ™‚:
var projectId = System.getContext().getParameter("__projectId");
var orgId = System.getContext().getParameter("__orgId");
var requestedBy = System.getContext().getParameter("__requestedBy");
@imtrinity94
imtrinity94 / sslCertificateReporter.ts
Created June 25, 2026 08:18
sslCertificateReporter.ts
public SSLCertificateReportGenerator(arrUrl: string[]): void {
let objDateToday: Date = new Date();
let intMillisecondsPerDay: number = 1000 * 60 * 60 * 24;
let objRegExpCommonName: RegExp = /Common Name.*?:\s*(.*)/;
let objRegExpValidity: RegExp = /Validity\s*:\s*\[From\s*:\s*(.*?)\s*To\s*:\s*(.*?)\]/;
let objRegExpHTTPS: RegExp = /^https:\/\//i;
@imtrinity94
imtrinity94 / monitor_cloud_init_realtime.ps1
Created June 12, 2026 08:56
monitor_cloud_init_realtime.ps1
<#
.SYNOPSIS
Monitors cloud-init provisioning progress on a remote VM over SSH.
.DESCRIPTION
1. Polls TCP port 22 until SSH is reachable (up to -PortTimeoutSecs).
2. Requires -StabilityCount consecutive successful SSH connections before
proceeding, ensuring sshd is fully initialised.
3. Streams /var/log/cloud-init-output.log in near real-time.
4. Polls 'cloud-init status' every -PollIntervalSecs until done or error.
@imtrinity94
imtrinity94 / Bulk vRA Network Tagging.js
Created April 14, 2026 07:35
Bulk vRA Network Tagging using CSV - vRO code
/**
* Inputs: vraFqdn (String), username (String), password (SecureString), csvFile (MimeAttachment)
*/
// --- 1. GET TOKEN (Using your proven logic) ---
function getAuthToken() {
var restHost = RESTHostManager.createHost("dynamicRequest");
var httpRestHost = RESTHostManager.createTransientHostFrom(restHost);
httpRestHost.url = "https://" + vraFqdn;
@imtrinity94
imtrinity94 / pingTestInVro.ps1
Last active April 14, 2026 07:36
Ping Test using vRO or VCF Orchestrator
function Handler($context, $inputs) {
$target = if ($inputs.target) { $inputs.target } else { "google.com" }
Write-Host "Pinging $target"
$result = ping -c 3 $target 2>&1
$output = $result -join "`n"
Write-Host $output
$reachable = $output -notmatch "Name or service not known|Temporary failure in name resolution|100% packet loss"
@imtrinity94
imtrinity94 / vra-health-check.sh
Last active January 23, 2026 07:46
Health Check Commands for Aria Automation 8.x
# Ogignal KB -> https://knowledge.broadcom.com/external/article/345946/analyzing-health-status-of-aria-automati.html
vracli status;sleep 5;vracli service status;sleep 5;vracli disk-mgr;sleep 5;kubectl get pods -n prelude;sleep 5;vracli ntp status;sleep 5;kubectl get nodes
@imtrinity94
imtrinity94 / enable-multi-writer-flag-vsphere-vm.ps1
Last active January 20, 2026 10:09
Setting Multi Writer Flag for Oracle RAC on vSphere without any downtime - PowerShell script
## Disclaimer:
## - This is an generic script provided and can be customized as ## per your requirement.
## - This script is provided for educational purposes only , ## ## please use at your own risk
## Add-PSSnapin VMware.VimAutomation.Core
## connect-viserver 127.0.0.1 -User Administrator
write-host ""
$diskCount = 0
do {
$diskCount = [int](read-host "How Many Shared Disks shall I create for you? [1-55]")
@imtrinity94
imtrinity94 / vRO-JS-Style-Guide-8.18.1.md
Last active December 22, 2025 10:24
[WIP] Updated JavaScript Style Guide for vRealize Orchestrator 8.18.1 (2025) upto ES5.1+

JavaScript Style Guide for vRealize Orchestrator 8.18.1

Executive Summary

This comprehensive style guide establishes best practices and standards for writing JavaScript code in VMware vRealize Orchestrator versions up to 8.18.1. As vRO utilizes Mozilla Rhino 1.7R4 JavaScript engine and implements ECMAScript 5.1 with selected features from ES5.1+, this guide focuses exclusively on constructs supported in vRO 8.18.1, deliberately excluding ES6+ features available in vRO 9.0+ to maintain compatibility and consistency within enterprises running 8.x versions.


Table of Contents

@imtrinity94
imtrinity94 / AriaAutomation2Git.py
Last active December 10, 2025 08:30
Python script to push Aria Automation Templates, ABXs and Subscriptions to Git - Cloudblogger.co.in
#!/usr/bin/env python3
"""
Script to fetch content from Aria Automation REST API and push to Git repository
Saves both JSON and extracted content in same directories
Adds subscription support
Handles self-signed certificates for both API and Git
"""
import requests
import json