• Skip to primary navigation
  • Skip to content

jdgreen.io

The personal blog of James Green

  • Home
  • Technology
    • Announcements
    • Industry
    • Reviews/Guides
    • Tech Field Day
    • Interviews
  • Health
    • Food
    • Biohacking
    • Fitness
  • Faith
  • Book Notes
    • Business Books
    • Faith Books
    • Health Books
    • Technology Books
  • About
  • Show Search
Hide Search

datastores

Find VMFS3 Datastores

James Green · Oct 16, 2013 ·

I was looking to find all the VMFS3 datastores still existing in an environment today so that we could migrate them to their new VMFS5 counterparts. I used this PowerCLI one-liner which I thought someone else might find useful. Let me know if it helps!

 

[code language=”powershell”]Get-Datastore | Select Name,FileSystemVersion,CapacityGB | Where {
$_.FileSystemVersion -lt 5 -and $_.FileSystemVersion -ne $null
} | Sort Name | ft -autosize[/code]

Create NFS Datastores across many hosts

James Green · Sep 18, 2013 ·

So you created a new NFS datastore and you want to mount it to all the hosts in your vCenter or cluster. You’re really dreading clicking through each host and doing “Add Storage” for every one.

PowerCLI to the rescue! This one-liner will add your new datastore in a snap! Just modify it with details specific to your environment.

[code lang=”powershell”]Get-VMHost | New-Datastore -Nfs -Name "Name Here" ‘
-Path "/path/path-here" -NfsHost 0.0.0.0[/code]

Copyright © 2021 · Monochrome Pro on Genesis Framework · WordPress · Log in