VMware Cloud Community
La_Jip
Contributor
Contributor

rename datastore after vicfg-volume -r

Hi all,

I use vmA 4.1

After a vicfg-volume -r, Datastore appears with a name beginning by snap-######. I would like to make a script that run vicfg-volume -r and rename Datastore with the original name.

Can anybody help me?

Thx in advance

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership

Did you try the Set-Datastore cmdlet ?

You can automate the renames

Get-Datastore | where {$_.Name -like "snap-*"} | Set-Datastore -Name ($_.Name.Replace("snap-",""))

____________

Blog: LucD notes

Twitter: lucd22


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

La_Jip
Contributor
Contributor

Thx,

I'll try this.

Smiley Wink

Reply
0 Kudos