• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Clatent

Technology | Fitness | Food

  • About
  • Resources
  • Contact

One-Liner Wednesday March 8, 2023

March 8, 2023 by ClaytonT Leave a Comment

Are you using VMWare? Ever had to troubleshoot why a VM isn’t working? Or need to know the status of a virtual machine? If you haven’t used PowerCLI before(I know I’ve mentioned it previously), check out this one liner.

 get-vm servername | select-object name, powerstate, usedspacegb, provisionedspacegb

What this does is first finds the server you are looking for with “servername.” Then it shows the server name, whether it is turned on or off, how much storage space is used, and finally how much storage is provisioned. This gives you a very quick overview of the status of the server.

I know, very simple, but it works… and you can expand on this. You could not put a servername in, and it will show all of your virtual machines with the information above.

What about if you have 100s or even 1,000s of servers, you could export to gridview or even better to excel with the importexcel module for filtering.

Hope you found this useful, and if your not already using the PowerCLI module to start using it and make your life easier.

PowerShell Gallery:
PowerCLI

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Reddit (Opens in new window) Reddit

Like this:

Like Loading...

Related

Tagged With: Automation, Documentation, PowerCLI, PowerShell, Reporting, VMWare, Windows Server

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recipe Rating




Primary Sidebar

Clayton Tyger

Tech enthusiast dad who has lost 100lbs and now sometimes has crazy running/biking ideas. Read More…

Find Me On

  • Email
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter

Recent Posts

  • EntraFIDOFinder: New Web UI and Over 70 New Authenticators
  • January 19, 2026 Updates to EntraFIDOFinder
  • v0.0.20 EntraFIDOFinder is out
  • EntraFIDOFinder Update
  • Did you know: SSPR/Password Reset Edition

Categories

  • 365
  • Active Directory
  • AI
  • AzureAD
  • BlueSky
  • Cim
  • Dashboards
  • Documentation
  • Entra
  • Get-WMI
  • Learning
  • Module Monday
  • Nutanix
  • One Liner Wednesday
  • Passwords
  • PDF
  • Planner
  • PowerShell
  • Read-Only Friday
  • Reporting
  • Security
  • Windows
  • WSUS

© 2026 Clatent

%d