I want to read the contents of a .vmv file using power shell but I am running into this problem. At the shell I do the following:
$datastoreObject = get-datastore -name <my datastore>
$DSDrive = New-PSDrive -Name datastoreUnderTest -Location $datastoreObject -PSProvider VimDatastore -Root /
cd datastoreUnderTest:\testVM
From here I can do an ls and see all of the files in the directory. But if I try to do:
$content = get-content testVM.vmx
It fails with:
Get-Content : Cannot use interface. The IContentCmdletProvider interface is not
implemented by this provider.
At line:1 char:23
What should I be using to get the contents of the file?
Also where can I get more information on PSProvider VimDatastore does anyone have link where I can read up on this?
Thanks