Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Blog posts

The PowerShell Sorting Trap: Why 10 Always Comes Before 2 in Your CSV Data

When sorting CSV data with PowerShell, I observed unexpected results, as shown in the screenshot below. The initial command, Import-Csv C:\Temp\Numberings.csv, shows that the numbers in the CSV are out of sequence. To sort these numbers, I used the simple pipeline command Sort-Object specifying the

Read more

Automating VMware ESXi Cluster Admission Control Report Insights with PowerCLI

This PowerCLI script retrieves detailed information about VMware Cluster High Availability (HA) and Admission Control policies. It is extremely useful for system administrators and auditors who need to verify that cluster settings comply with engineering or governance standards.

By running this s…

Read more

PowerCLI GUI: One Click Renew and Refresh VMware VMCA ESXi Certificate

This is second script article wrote on same topic 'How to Renew and Refresh an ESXi Certificate with a PowerCLI script'. In the earlier post I gave simple PowerCLI script, very easy to execute. In this article I have written the same script but added a Graphical User Interface for more easiness. Bel…

Read more

How to Renew and Refresh an ESXi Certificate with a PowerCLI script

By renewing VMware ESXi server certificate through vCenter Server you can safeguards adherence to security best practices. You renew ESXi certificate to continue securing connection for your vSphere environment, avert trust issues with vCenter Server, and guarantee compatibility for upgrades, as exp…

Read more

Terraform String Encoding and Decoding with PowerShell

This is another script I have written to encode and decode string for Terraform using PowerShell GUI. These scripts helps me in the live demonstrations and PowerPoint to client about infrastructure as a code. Once script is executed in PowerShell GUI, it looks like below, It helps to Base64 Encode g…

Read more

Self-Signed Certificates Made Easy with PowerShell GUI

I was delivering few demos for Azure Application Gateway client side, I got information, there will be very limited Internet and only specific things will work in the given environment. In one of the demo I wanted to created few Self Signed SSL Certificates for Azure Application Gateway. In the demo…

Read more

How to create byte array in PowerShell

To create a byte array in PowerShell, you can use several methods, depending on whether you want to initialize it with values, specify a size, or convert data like a string or file. The simplest method is to cast an array to the [byte[]] type.

1. Create a byte array with pre-defined values

Thi…

Read more

Streamlining Intune MDM Device Management with Microsoft Graph and PowerShell

As an IT administrator, managing devices in your organization can be a daunting task. With the help of Microsoft Graph and PowerShell, you can automate device management tasks and streamline your workflow. In this article, You can explore how to use PowerShell to connect to Microsoft Graph, retrieve…

Read more

PowerShell & Microsoft Graph API: Automate Full Intune Devices Sync more than 1000 Pagination

This PowerShell script leverages the Microsoft Graph API to synchronize Intune MDM devices. A previous iteration of the script was limited to fetching and syncing only the first 1000 devices due to pagination. To overcome this, the updated script iterates through the @odata.nextLink property, allowi…

Read more

Automate Intune MDM Device Sync: A PowerShell Script for Microsoft Graph API

This PowerShell script demonstrates automated management and synchronization of devices with Microsoft Intune via Microsoft Graph API. Using client credentials to authenticate against Azure AD, it retrieves an OAuth 2.0 token and lists all managed devices in the environment for reporting purpose. 

Read more

PowerShell Create and Export Self-Signed RSA Certificates (PFX, CER, PEM)

This script helps creating SSL Self Signed Certificates and Private/Public key using PowerShell. PowerShell has inbuilt cmdlet command New-SelfSignedCertificate which is used to create proper SSL certificate which doesn't require third party applications such as OpenSSL or similar. There are multipl…

Read more

Get VMware vCenter Appliance Version using Broadcom PowerCLI VCSA REST API

This PowerShell script uses VMware vCenter Server Rest API and shows VCSA (vCenter Server Appliance) version through the command line. Keeping track of your vCenter Server Appliance (VCSA) version is crucial for effective management and update. Simply provide your vCenter credentials, and the script…

Read more

Install VMware VCSA Patch Upgrade using PowerCLI vCenter REST API

This is the main script in the series and does major task of Installing the latest patch update on VCSA (VMware vCenter Server Appliance).

Screenshot of Install Broadcom VMware VCSA Patch Upgrade using PowerCLI vCenter server REST API

While running this script you will need to provide vCenter Server, User, Password, Version (Optional), Patch URL parameter information in the script, as g…

Read more

Check VCSA Upgrade Staging Progress using PowerShell vCenter REST API

While staging patches update on the VCSA (vCenter Server Appliance), it takes some time to download updates on vCenter Server from remote source. Using this script I can track whether staging is completed or not. It simply shows value true or false for Staging Completed in the given output. I found …

Read more

Leveraging PowerShell to Stage VCSA Updates via vCenter REST API

Staging in VMware VCSA (vCenter Server Appliance) allows you to upload/download patches and updates, In the staging process it does not directly install or apply the patches/updates immediately but just copies patch updates on VCSA appliance. Which allows for a faster remediation process during upda…

Read more

Retrieve VCSA vCenter Version with PowerShell REST API

This PowerShell helps to fetch the current version of  VCSA (VMware vCenter Server Appliance). This information is useful while automating VCSA upgrade, It is fetched used from VCSA REST API.

Screenshot of a PowerShell console running 'Show-VCSACurrentVersion.ps1'. The output shows 'Appliance Update Status:', 'Latest Query Time: 08/04/2025 16:00:56', 'Current State: UP_TO_DATE', and 'Installed Version: 8.0.0.300400'.

In the vCenter Server Management portal you can see the Version in the update.

Screenshot of the vCenter Server Management interface, 'Update' tab. It shows 'Current version details' as 8.0.0.400. Below 'Available updates', an update for version 8.0.0.500 is listed as 'Staged', with 'Type: Fix', 'Release Date: Apr 10, 2025', 'Reboot required: Yes', and 'Severity: Critical'.

You can downloa…

Read more

PowerShell & VCSA: Checking for Pending & Latest Updates via REST API

This script helps me to get the latest available pending updates for VCSA in vCenter Server Appliance Management portal before stage and install. It shows all in dept information of pending update from local web repo website url. Which will be helpful to automate installation further with correct ve…

Read more

Configure VCSA Update Web Repository Settings with PowerShell and REST API

This PowerShell script helps to configure VCSA (vCenter Server Appliance) update settings. As a prerequisite I have already configured on prem web server based repository for vCenter updates, which I use to streamline updates/patches on vCenter server appliance (VCSA). To change repository web URL o…

Read more

Reset vCenter Server Appliance (VCSA) Forgotten Root Password Without Reboot

These steps help you to Reset VMware vCenter Server Appliance (VCSA) Forgotten Root Password, best part it does it without reboot means no downtime. First prerequisite for this is SSH must be enabled on VCSA server and Second part is you must know [email protected] account password to logi…

Read more

Delete VMware VCSA Management Schedule Backup Job using PowerShell

This PowerCLI script helps to remove vCenter Server Appliance Management backup schedule job.

Screenshot of a PowerShell console showing the execution of 'Remove-VCSAScheduledBackup.ps1' script. The output confirms a connection to 'marvel.vcloud-lab.com', and then states 'Removing existing backup schedules...' followed by 'Deleted schedule: monthly', indicating successful removal of a vCenter backup schedule.

You can download Remove-VCSAScheduledBackup.ps1 script here or it is also available on github.com.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19…

Read more

20 blog posts

Blog Search

Page Views

1 4 7 9 7 9 4 9

Archive

Follow me on Blogarama