PowerCLI

 View Only

 VCF.PowerCLI Tag cmdlets are not workin

Patrick Bool's profile image
Patrick Bool posted Jun 24, 2026 08:05 AM

Hello everyone,

I am currently struggling with the Get-TagAssignment Command in PowerCLI. The goal was to use a script to generate a list of VMs based on their assigned Tag, and restart them if they are currently running. This worked on vSphere 8 with PowerCLI 13, but when attempting to use Get-Tag or Get-TagAssignment on a vCenter 9.0.0.0 Build No. 24755230, i get the error "Get-Tag: MM/DD/YYYY H:MM:SS AM    Get-Tag        Unexpected character encountered while parsing value: n. Path '', line 0, position 0..". The Linux machine I am performing the commands from is running Ubuntu 22.04.5 LTS, and Powershell was installed using the debian package downloaded from the stable release page. The error occurs both with Powershell v7.5.8 and 7.6.3, as well as VCF.PowerCLI 9.0 and 9.1. Did anyone else encounter this or similar problems? Other cmdlets work fine, such as Get-VM, Set-VM or Get-Datastore, so far I only encountered it on the cmdlets in the Tags Category

Thanks in advance!
Patrick