Menu

Virtual Geek

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

Blog posts August 2025

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

T…

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, allow…

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 multip…

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, a…

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 downlo…

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

11 blog posts

Blog Search

Page Views

13869636

Archive

Follow me on Blogarama