RT @AndSimonSaid: Mijn baas werkt thuis en vraagt me haastig via whatsapp dat ik haar om drie uur moet bellen. Lijkt best serieus dus om dr… 1 hour ago
RT @samgerrits: Precies een jaar geleden trok ik aan de bel om een ernstig besmettelijke SARS variant die ik "SARS 2.0" noemde. Om politiek… 1 hour ago
@CBoonacker Ik had een minder loodzwaar traject toegewenst. Kennelijk niet gelukt. Daarom veel sterkte. 1 hour ago
RT @locuta: Navalny is naar de gevangenis gestuurd waar eerder Magnitsky door de Russische overheid werd vermoord. Hij moet daar 30 dagen b… 2 hours ago
RT @claudiadebreij: Dit is zoooo South Park 🤪
‘Just wanna let you guys know, this is THE sacredest place.’ 2 hours ago
This works better than "runas /user:administrator cmd.exe" as that forces to use the specific Administrator account, whereas the PowerShell way allows you to specify the actual account during elevation.
Disks are listed under /vmfs/devices/disks/ where there are two entries per device: a path leading to the device, and a link to that path which starts with vml. which I filter out with grep.
If a disk under under /vmfs/devices/disks/ ends with :# where # is a number, then it is a partition
Just skip partedUtil get as partedUtil getptblwill give you exactly the same information,
plus an extra initial line indicating what kind of partition table it is. KB 1036609 has a longer list, but these are the ones you usually see:
unknown: the disk has no partition table yet (usually), or the type of partition table cannot be determined (hardly)
on ESXi 6.x two extra columns listing the partition GUID and partition type description
The output of partedUtil is unformatted, which means it is easy to parse, but hard to read for humans. You can pipe through sed 's/ /\t/g' (as there is no tr on the ESXi busybox)
Some more background reading
On scripting:
The shell is sh (always been there)
There is Python (ESXi 5.1 has Python 2.7.8; ESXi 6.5 has Python 3.5.3; it has likely been available in earlier versions too).
At the recent Embedded Linux Conference and OpenIoT Summit, Mozilla Technical Evangelist Dietrich Ayala proposed a simple and affordable solution to home automation: A discarded smartphone can handle some of the most useful home automation tasks without requiring expensive hubs and sensors — or risking data security in the cloud.