Did you check that
Get-VMHost -Name host
Get-Datastore -Name datastore
both return objects?
yes - I was able to add it just fine but when I try and remove I get that error.
I should note when I do get-datastore -name datastore it does return it 7 times - is that odd?
ok so I just ran the command again and let it run through and it did complete successfully one time out of 7 tires. so the issue must be the weirdness on why it returns 7 results - any thoughts on that?
Do you have multiple connections open?
Check what is in $global:defaultviservers
when I run that command I am just seeing the one server connection.
Ok, one connection is ok.
Is that to a vCenter?
Are there perhaps 7 ESXi nodes connected to that vCenter?
Or are there datastores with names that closely resemble each other?
Can you show the output with the 7 datastores that are returned?
Yes to a vCenter.
There are 30+ ESXi servers that are connected to the vCenter but now that you say that I think the issue is that the datastore is in 7 different dataCenters so maybe that is my issue? I need to add the -Location attribute
would that make sense?
Yes, but is it the datastorename that was reused, or are all these datastores using the same LUN?
And you would need to do$dc = Get-Datacenter -Name datacenter
Get-Datastore -Name datastore -VMHost host -Location $dc |
yes the datastore name is reused since it is an NFS mount
ok that makes sense thank you!