SRM-Cmdlets
SRM-Cmdlets copied to clipboard
Get-protecteddatastore full object
Get-ProtectedDatastore to return full datastore object
MallocArray committed 886ae6d 1 changed file The $pg.ListProtectedDatastores() command returns an object with type VMware.Vim.Datastore and is incomplete, including the name of the datastore. Only the MoRefID is of any use. Piping this to Get-Datastore inside the get-protecteddatastore function returns fully usable datastore types, such as VMware.VimAutomation.ViCore.Impl.V1.DatastoreManagement.NasDatastoreImpl VMware.VimAutomation.ViCore.Impl.V1.DatastoreManagement.VmfsDatastoreImpl VMware.VimAutomation.ViCore.Impl.V1.DatastoreManagement.DatastoreImpl The only place this is referenced in the module is Get-UnProtectedVM which has been modified as well.
This would break scripts users have written to use Get-ProtectedDatastore if they are doing a similar method of piping the output to Get-Datastore in their script, but this change seems to be more what would be expected output from the function.