Microsoft Virtualization Discussions

PowerShell Toolkit - Get-NcVol Creation Date

david_sole
3,443 Views

Hi all,

 

I want to get the creation date of a volume running on a ONTAP 9.x system. I can get date from ONTAP shell but I need to get it from PowerShell.

 

Any help is apreciated.

 

David,

1 ACCEPTED SOLUTION

JohnChampion
3,386 Views

If you want to see all the objects/properties use:

 

          Get-NcVol -Name {volume_name} -Vserver {vServer_name} | Format-List  

 

You'll see a "VolumeIdAttributes" object - to see the additional properties for the volume

 

          (Get-NcVol -Name {volume_name} -Vserver {vServer_name}).VolumeIdAttributes

 

Finally, try this:

 

PS C:\> $vol=Get-NcVol {volume_name} -Vserver {vServer_name}
PS C:\> $vol.VolumeIdAttributes.CreationTimeDT

 

Sunday, November 25, 2018 5:07:40 PM

 

View solution in original post

2 REPLIES 2

JohnChampion
3,387 Views

If you want to see all the objects/properties use:

 

          Get-NcVol -Name {volume_name} -Vserver {vServer_name} | Format-List  

 

You'll see a "VolumeIdAttributes" object - to see the additional properties for the volume

 

          (Get-NcVol -Name {volume_name} -Vserver {vServer_name}).VolumeIdAttributes

 

Finally, try this:

 

PS C:\> $vol=Get-NcVol {volume_name} -Vserver {vServer_name}
PS C:\> $vol.VolumeIdAttributes.CreationTimeDT

 

Sunday, November 25, 2018 5:07:40 PM

 

david_sole
3,299 Views

Thats it!

 

Thank you so much,

 

David

Public