• 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

NFS

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