Luc and I both use PowerGUI to format the code and then use "Copy as HTML" in PowerGUI to export the code to formatted html. We insert this html code into the post on the VMware VMTN Communities using the "HTML" button in the upper right corner.
I am not sure that the numbers of the hostid and the hostnetworksystemid are related. So you're trick might not work. You can find the networkid with:
$networkid=$VMHostObj.ExtenSionData.Configmanager.NetworkSystem
Message was edited by: RvdNieuwendijk