Function to rename the local datastore of a new installed ESXi

This is a small function to rename the local datastore of a fresh installed ESXi server from datastore1 to SERVERNAME-local.

 $ServerIP="192.168.4.3" function renameds { $vmHost = Get-VMHost -Name $ServerIP $dsname = $vmHost + "-local" Get-Datastore -Name datastore* | Set-Datastore -Name $dsname }