If this isn't the correct board, please point me in the right direction.
Our VM Templates all have extensive details in the Notes section in vSphere and the problem is they aren't blanked out when deploying a VM from that template.
Is there a way to remove or blank out the Notes section when actually deploying the VM? Perhaps running a command in the customization script? Or even having a batch file saved on the windows template, that's called by the customization script? I'm thinking there *might* be a vmtools command line that might accomplish it that way..?
Trying to only find a solution that does this on the deployment, or in that timeframe. I don't want to just remove them all, or run a task every day that wipes out Notes from recent deployments, in case someone deployed one and updated the Notes section appropriately.
Thanks in advance.
Hahaha yeah that's the issue I'm having. I'd love to be able to add a runonce command into the customization script but how do I define "this vm that I'm deploying right now"?
Get-vm -name $env:Computername
I'll just have to make sure my template has powercli setup, which isnt' a problem..
Actually that worked. So my template will need the powercli modules and i haven't worked out if i can run the command in the runonce section of the customization script or, more likely call it from a cmd file that's already running as part of the customization script....one of the lines in the customization script is c:\Admin\Process.cmd and I could just call powershell from that...regardless...this worked and nearly instantly removed the Notes section of the VM:
Get-VM -name $env:Computername |Set-VM -Description " " -Confirm:$false