Active IQ Unified Manager Discussions

add current date in volume name

Adai
2,898 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
2,884 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
2,878 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
2,867 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