Microsoft Virtualization Discussions

ScriptProperty

JSHACHER11
3,594 Views

Hi Guys,

I see that there is a special Property under 'Get-NaLun' called 'ScriptProperty'

I understand that this will somehow trigger a script (?) that will check if the Lun is thin provisioned(?)

+++++++++++++++++++++++++++++++++++++++++++++++

Thin                      ScriptProperty System.Object Thin {get=!($this.IsSpaceReservationEnabled);}

+++++++++++++++++++++++++++++++++++++++++++++++

can someone please explain what it does and how to run it?

also, if it is to check if the Lun is thin provisioned, how is that different from the Property "IsSpaceReservationEnabled"?

Can you also please explain what '$this' means?

Thank you

Joel

3 REPLIES 3

vinith
3,594 Views

Hello Joel,

You can get to this property by creating custom objects.

PS C:\Windows\system32> Get-NaLun | select path,protocol,@{l='Thin Sub Property';e={$_ | select -ExpandProperty thin}}

JSHACHER11
3,594 Views

cool

so how is that different from the Property "IsSpaceReservationEnabled"?

JGPSHNTAP
3,594 Views

Vinith - I believe you can play around witht his and make it boolean as well right?

Public