How to update the vSphere inventory remotely after resizing the disk with vmkfstools?

after successfully resizing a disk with:

vmkfstools --datacenter x --vihost esx42 - server vc1.example.com --username me 
-X 25G -d eagerzeroedthick /vmfs/volumes/FOOBAR/FOOBAR.vmdk

now, how can I update the inventory programmatically remotely (not from the esx server), via a Linux command line or through an API / script?

The size has not changed in the vSphere 6.0.0 Web Client even after logging out and reconnecting. I have to manually unregister the virtual machine from the inventory and add it back to see the disk changes via vSphere.

The script is a modified version (by myself) because --database of data was not really implemented: https://pastebin.com/raw/cE8vFRDe