Saturday, March 5, 2016

VMware PowerCLI add postfix to vm name


clear
$folderid=get-folder | get-vm |select name

foreach($vmn in $folderid)
{

$dis=$vmn.name.ToString()+"_expired_by_script"
 Set-VM -VM $vmn.name -Name $dis -Confirm:$false

}

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...