I was pondering the possibilities myself... While there's no command that will allow you to explicitly pull out a single host from an export, you could use 'export -io' to re-write the export with the updated RW/R/Root hosts info. So, we do have the ability do pull this off assuming we could somehow capture the updated entries minus the host(s) entered.
Being new to WFA for the most part, I'm not quite sure of how this could be done. I explored the 'Update Export' command a bit to see if I could wrap my head around what's happening -
It appears that we are creating a new line for each security entry and appending the new host entry to that -
# get the rule for the provided export
$securityRule = $export.SecurityRules[0]
$newRoots = PrepareHosts -ListType Root -SecurityRuleInfo $securityRule -NewHosts $RootHosts
$newRWHosts = PrepareHosts -ListType ReadWrite -SecurityRuleInfo $securityRule -NewHosts $RWhosts
$newROHosts = PrepareHosts -ListType ReadOnly -SecurityRuleInfo $securityRule -NewHosts $ROhosts
Looks like this one may have to be done via perl unless someone has any other way to spin this.
If I was going to do something outside of PowerShell, I'm thinking that I would opt for updating the /etc/netgroup and using netgroups for my exports instead. In my case, we would likely have to update several exports via WFA using the current command just to say add a new ESX host into the mix whereas a netgroup would make only one point of touch to update all exports associated with a particular VMware instance's datastores in a single flow.
Anyone else gone this route?
Thanks!