Hi Luc ,
could suggest on the following scenerio.in which $snap1 and $snap which contains snapshot info of vms in cluster but defined differently as follows.
1:
$snap1= Get-VM -location $cluster | Get-Snapshot |
Select Name,@{N='VM';E={$_.VM.Name}},Created
and if we run $snap1|remove-snapshot it throws error.
however if we define variable as follows
$snap=get-vm -location $cluster|get-snapshot
and then run $snap|remove-snapshot it works .
what is the difference in data being stored in $snap and $snap1 as both are of following types
There are two things happening here.
You can see the difference in type when you look at one element in the array, i.e.
$span1[0] | Get-Member
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
There are two things happening here.
You can see the difference in type when you look at one element in the array, i.e.
$span1[0] | Get-Member
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks for yur response .
but i am getting same type for both.
You are looking at the same variable twice, the 2nd one should be $snap[0]
Those types are different, as I explained
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
ok thnaks .