Hi,
I'm trying to write a script that will add any NFS datastores missing on a specified host that is present on another specified host and I'm having trouble finding the correct variables from Get-Datastore. In the foreach loop traversing through the datastores on the source host, I can use $_.Name but I also need NFS mount point and server name. I've been trying to find out what Get-Datastore actually returns with Get-Member but it seems the object only contains six properties and none of them points to where the NFS filesystem resides. Is there any built in command to present the entire object and its properties on screen to find these things out?
Thanks in advance!
Daniel
Hi Daniel!
You can get more info by using NFS datastore objects's view. Here's an example:
>$nfsDSView = Get-VMHost -Name
$nfsDSView.Info.Nas.RemoteHost and $nfsDSView.Info.Nas.RemotePath are the NFS mount values you need
Irina
Thank you, that works great! About time I started using Get-View, it seems that's where PowerCLI really shines!
With Get-View, one of the two Web Service Access cmdlets, you get access to all the SDK objects with their properties and methods.
Last Friday I did a short presentation which included using the SDK from PowerCLI.
See Dutch VMUG event 2009 – The (nearly) lost tapes for the demos I showed there.
The presentation itself should appear shortly on the Dutch VMUG website.