The NetApp Community is moving to a new platform and is in Read-Only mode. Click to learn more.
Stay connected during the transition - Join our Discord community today.

Microsoft Virtualization Discussions

ScriptProperty

JSHACHER11
4,583 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
4,583 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
4,583 Views

cool

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

JGPSHNTAP
4,583 Views

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

Public