NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Active IQ Unified Manager Discussions

add current date in volume name

Adai
4,565 Views

how to add a date in a given volume name as volname_MMDDYYY.

While creating or while renaming a cDOT volume ?

 

Is there a function that returns the current date ?

 

Any one already done this ?

 

Thanks 

adai

3 REPLIES 3

sinhaa
4,551 Views

Use powershell cmdlet:

 

$date = get-date -Format _MMddyyyy

 

Now add this to your volume name string.

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Adai
4,545 Views

Hi Sinhaa,

    Couple of questions.

1.Where do I define the $date = get-date -Format _MMddyyyy in the resize command ?

 

2.And  if defined $date,then  that would also appear as a input in the inputs tab right ?

 

But I dont want that, just add the current date to the volumename as <volname>_MMDDYYY.

 

Regards

adai

abhit
4,534 Views

In the powershell command you can append the date to the Volume name.

You can append the date to the volume in the command code.

Attached .png file shows an example.

This command is downloadable from automationstore.netapp.com.

 

Regards

Abhi

Public