lamw / vmware-scripts

Various scripts for VMware based solutions
http://www.williamlam.com/
BSD 2-Clause "Simplified" License
859 stars 489 forks source link

create_custom_vsan_esa_hcl_json.ps1 - ensure hex values have leading zeros #133

Open adarobin opened 4 hours ago

adarobin commented 4 hours ago

This will ensure all of the hex values in the generated HCL will be 4 hex digits long (i.e. have leading 0's).

For example, on some hardware in my lab the script originally generated this:

        "did": "953",
        "vid": "8086",
        "ssid": "370b",
        "svid": "108e",

when it should have been:

        "did": "0953",
        "vid": "8086",
        "ssid": "370b",
        "svid": "108e",