Microsoft Virtualization Discussions

ScriptProperty

JSHACHER11

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

Re: ScriptProperty

vinith

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}}

Re: ScriptProperty

JSHACHER11

cool

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

Re: ScriptProperty

JGPSHNTAP

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

Earn Rewards for Your Review!
GPI Review Banner
All Community Forums
Public