Microsoft Virtualization Discussions

PowerShell Toolkit - Get-NcVol Creation Date

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,

2 REPLIES 2

Re: PowerShell Toolkit - Get-NcVol Creation Date

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

 

Re: PowerShell Toolkit - Get-NcVol Creation Date

Thats it!

 

Thank you so much,

 

David

Forums