Connect-HPOVMgmt -Hostname itdoneviewp1.nd.gov -Credential $AdminCred -LoginAcknowledge

$VMwareHosts = Get-VMHost
$HPOVServers = Get-HPOVServer | Select-Object *,@{n='Enclosure';e={$_.Name.split(',')[0]}}

ForEach($VMwareHost in $VMwareHosts)
{
    $HPOVServer = $HPOVServers | where-object ServerName -eq $VMwareHost.Name
    $VMwareHost | New-TagAssignment -Tag $HPOVServer.Enclosure -Server $VMwareHost.Uid.split('@')[1].split(':')[0]
}