Microsoft Virtualization Discussions

Powershell - LUN serial number

i found several old articals (6yr).

What they outline does in fact still work, here is a tiny bit of additional info and a newer date stamp.

 

the gist.

 

get-ncLun does in fact get the lun information

the information it gives you is helpful, but incomplete to a fault.

you can get a lot of extra detail out of the object the get-ncLun returns.

 

$monkey = get-ncLun /vol/*somethingYouWant*

 

$monkey.serialNumber
80Abu]JzGvAB

 

Here is a list of properties you can get out of the object.

$monkey | get-member


TypeName: DataONTAP.C.Types.Lun.LunInfo

Name MemberType Definition
---- ---------- ----------
Protocol AliasProperty Protocol = MultiProtocolType
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
Validate Method void Validate()
Alignment Property System.Object Alignment {get;set;}
Application Property System.Object Application {get;set;}
ApplicationUuid Property System.Object ApplicationUuid {get;set;}
BackingSnapshot Property System.Object BackingSnapshot {get;set;}
BlockSize Property System.Object BlockSize {get;set;}
BlockSizeSpecified Property bool BlockSizeSpecified {get;set;}
Class Property System.Object Class {get;set;}
CloneBackingSnapshot Property System.Object CloneBackingSnapshot {get;set;}
Comment Property System.Object Comment {get;set;}
CreationTimestamp Property System.Object CreationTimestamp {get;set;}
CreationTimestampDT Property System.Nullable[datetime] CreationTimestampDT {get;}
CreationTimestampSpecified Property bool CreationTimestampSpecified {get;set;}
DeviceBinaryId Property System.Object DeviceBinaryId {get;set;}
DeviceId Property System.Object DeviceId {get;set;}
DeviceIdSpecified Property bool DeviceIdSpecified {get;set;}
DeviceTextId Property System.Object DeviceTextId {get;set;}
IsClone Property System.Nullable[bool] IsClone {get;set;}
IsCloneAutodeleteEnabled Property System.Nullable[bool] IsCloneAutodeleteEnabled {get;set;}
IsCloneAutodeleteEnabledSpecified Property bool IsCloneAutodeleteEnabledSpecified {get;set;}
IsCloneSpecified Property bool IsCloneSpecified {get;set;}
IsInconsistentImport Property System.Nullable[bool] IsInconsistentImport {get;set;}
IsInconsistentImportSpecified Property bool IsInconsistentImportSpecified {get;set;}
IsRestoreInaccessible Property System.Nullable[bool] IsRestoreInaccessible {get;set;}
IsRestoreInaccessibleSpecified Property bool IsRestoreInaccessibleSpecified {get;set;}
IsSpaceAllocEnabled Property System.Nullable[bool] IsSpaceAllocEnabled {get;set;}
IsSpaceAllocEnabledSpecified Property bool IsSpaceAllocEnabledSpecified {get;set;}
IsSpaceReservationEnabled Property System.Nullable[bool] IsSpaceReservationEnabled {get;set;}
IsSpaceReservationEnabledSpecified Property bool IsSpaceReservationEnabledSpecified {get;set;}
Mapped Property System.Nullable[bool] Mapped {get;set;}
MappedSpecified Property bool MappedSpecified {get;set;}
MultiprotocolType Property System.Object MultiprotocolType {get;set;}
NcController Property NetApp.Ontapi.Filer.C.NcController NcController {get;set;}
Node Property System.Object Node {get;set;}
Online Property System.Nullable[bool] Online {get;set;}
OnlineSpecified Property bool OnlineSpecified {get;set;}
Path Property System.Object Path {get;set;}
PrefixSize Property System.Object PrefixSize {get;set;}
PrefixSizeSpecified Property bool PrefixSizeSpecified {get;set;}
QosAdaptivePolicyGroup Property System.Object QosAdaptivePolicyGroup {get;set;}
QosPolicyGroup Property System.Object QosPolicyGroup {get;set;}
Qtree Property System.Object Qtree {get;set;}
ReadOnly Property System.Nullable[bool] ReadOnly {get;set;}
ReadOnlySpecified Property bool ReadOnlySpecified {get;set;}
Serial7Mode Property System.Object Serial7Mode {get;set;}
SerialNumber Property System.Object SerialNumber {get;set;}
ShareState Property System.Object ShareState {get;set;}
Size Property System.Object Size {get;set;}
SizeSpecified Property bool SizeSpecified {get;set;}
SizeUsed Property System.Object SizeUsed {get;set;}
SizeUsedSpecified Property bool SizeUsedSpecified {get;set;}
Staging Property System.Nullable[bool] Staging {get;set;}
StagingSpecified Property bool StagingSpecified {get;set;}
State Property System.Object State {get;set;}
SuffixSize Property System.Object SuffixSize {get;set;}
SuffixSizeSpecified Property bool SuffixSizeSpecified {get;set;}
Uuid Property System.Object Uuid {get;set;}
Volume Property System.Object Volume {get;set;}
Vserver Property System.Object Vserver {get;set;}
Thin ScriptProperty System.Object Thin {get=if (!($this.IsSpaceReservationEnabledSpecified)) { $null }...

1 REPLY 1

Re: Powershell - LUN serial number

Hi. can you check if the question (if there was) has been disappeard/truncated from your post?

Gidi Marcus (Linkedin) - Storage and Microsoft technologies consultant - Hydro IT LTD - UK
Forums