Hi,
If i do a get datastore and check $_.freespacemb. then i move a vm from datastore1 to datastore2 and then check $_.frespacemb again nothing changed.
How can i get the updated information?
/Allan
You can use UpdateViewData() method to refresh view of a managed entity. Post refresh re-calculate your values.
Example
$myDS = Get-DataStore "DS1" | Get-View $myDS.UpdateViewData()
Hope that answers the question.