Microsoft Virtualization Discussions

PowerShell Toolkit - Get-NcVol Creation Date

david_sole

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

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

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

david_sole

Thats it!

 

Thank you so much,

 

David

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public