OK. After doing some investigation I answered the main question by myself. So commands to achieve the goal look like this:
$VM = get-civm 'centos-template'
($VM.ExtensionData.Section[3]).computername = 'CentOS'
$VM.ExtensionData.Section[3].UpdateServerData()
$VM.ExtensionData.name = 'CentOS'
$VM.ExtensionData.UpdateServerData()
As you see the command I missed was invoke the method to apply changes. Works great!
On the other hand I have to do double applying these settings which takes more time than I perform one action through VMWare Web Console after making multiple changes on VM. Is it possible to make the same through PS instead of wasting time to apply each change separately?