If you make use of the Cisco UCS powertool 0.9.6.0, then the in-built Ucs Cmdlets will take care of forming and sending the xml query for you.
PS C:\> Get-UcsServiceProfile -type instance | Get-UcsVhba | Get-UcsVhbaInterface | select Dn,Initiator,Vnet
Dn Initiator Vnet
-- --------- ----
org-root/ls-sp11/fc-hba1/if-default 20:00:00:25:B5:AA:AA:AA 1
org-root/ls-test/fc-vhba2/if-default 20:00:00:25:B5

D

D

D 2
The -xml option gives us more details about the internal functioning of the cmdlet.
It shows us the query that was generated and sent when we executed the cmdlet and the response we received.
PS C:\> Get-UcsServiceProfile -type instance -xml
==>bgl-samc17:<configResolveClass classId="lsServer" cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" inHierarchical="false"><inFilter><and><e
q class="lsServer" property="type" value="instance" /><wcard class="lsServer" property="dn" value="^org-root/" /></and></inFilter></configResolveClass
>
<==bgl-samc17: <configResolveClass cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" response="yes" classId="lsServer"> <outConfigs> <lsServer
agentPolicyName="" assignState="unassigned" assocState="unassociated" biosProfileName="" bootPolicyName="" configQualifier="" configState="not-appli
ed" descr="" dn="org-root/ls-sp11" dynamicConPolicyName="" extIPState="none" fltAggr="1" fsmDescr="" fsmFlags="" fsmPrev="ConfigureSuccess" fsmProgr="
100" fsmRmtInvErrCode="none" fsmRmtInvErrDescr="" fsmRmtInvRslt="" fsmStageDescr="" fsmStamp="2012-02-06T05:46:13.595" fsmStatus="nop" fsmTry="0" host
FwPolicyName="" identPoolName="" intId="186797" localDiskPolicyName="" maintPolicyName="" mgmtAccessPolicyName="" mgmtFwPolicyName="" name="sp11" oper
BiosProfileName="" operBootPolicyName="org-root/boot-policy-default" operDynamicConPolicyName="" operHostFwPolicyName="" operIdentPoolName="org-root/u
uid-pool-default" operLocalDiskPolicyName="org-root/local-disk-config-default" operMaintPolicyName="org-root/maint-default" operMgmtAccessPolicyName="
" operMgmtFwPolicyName="" operPowerPolicyName="org-root/power-policy-default" operScrubPolicyName="org-root/scrub-default" operSolPolicyName="" operSr
cTemplName="" operState="unassociated" operStatsPolicyName="org-root/thr-policy-default" operVconProfileName="" owner="management" pnDn="" powerPolicy
Name="default" scrubPolicyName="" solPolicyName="" srcTemplName="" statsPolicyName="default" type="instance" usrLbl="" uuid="derived" uuidSuffix="00
00-000000000000" vconProfileName=""/> <lsServer agentPolicyName="" assignState="unassigned" assocState="unassociated" biosProfileName="" bootPolicyNa
me="" configQualifier="insufficient-resources,mac-address-assignment" configState="failed-to-apply" descr="" dn="org-root/ls-test" dynamicConPolicyNa
me="" extIPState="none" fltAggr="4294967299" fsmDescr="Configuring Service Profile test(FSM:sam:dme:LsServerConfigure)" fsmFlags="sam:dme:LsServerConf
igure:modification" fsmPrev="ConfigureApplyIdentifiers" fsmProgr="45" fsmRmtInvErrCode="none" fsmRmtInvErrDescr="" fsmRmtInvRslt="" fsmStageDescr="Res
olving and applying identifiers(FSM-STAGE:sam:dme:LsServerConfigure:ApplyIdentifiers)" fsmStamp="2012-02-06T10:10:29.915" fsmStatus="ConfigureApplyIde
ntifiers" fsmTry="1" hostFwPolicyName="" identPoolName="" intId="186914" localDiskPolicyName="default" maintPolicyName="" mgmtAccessPolicyName="" mgmt
FwPolicyName="" name="test" operBiosProfileName="" operBootPolicyName="org-root/boot-policy-default" operDynamicConPolicyName="" operHostFwPolicyName=
"" operIdentPoolName="org-root/uuid-pool-default" operLocalDiskPolicyName="org-root/local-disk-config-default" operMaintPolicyName="org-root/maint-def
ault" operMgmtAccessPolicyName="" operMgmtFwPolicyName="" operPowerPolicyName="org-root/power-policy-default" operScrubPolicyName="org-root/scrub-defa
ult" operSolPolicyName="" operSrcTemplName="" operState="config-failure" operStatsPolicyName="org-root/thr-policy-default" operVconProfileName="" owne
r="management" pnDn="" powerPolicyName="default" scrubPolicyName="" solPolicyName="default" srcTemplName="" statsPolicyName="default" type="instance
" usrLbl="" uuid="12340000-0000-0000-0000-000000000000" uuidSuffix="0000-000000000000" vconProfileName=""/> </outConfigs> </configResolveClass>
PS C:\> Get-UcsServiceProfile -type instance | Get-UcsVhba -xml
==>bgl-samc17:<configResolveClass classId="vnicFc" cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" inHierarchical="false"><inFilter><or><wcar
d class="vnicFc" property="dn" value="^org-root/ls-sp11/" /><wcard class="vnicFc" property="dn" value="^org-root/ls-test/" /></or></inFilter></configR
esolveClass>
<==bgl-samc17: <configResolveClass cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" response="yes" classId="vnicFc"> <outConfigs> <vnicFc ada
ptorProfileName="" addr="20:00:00:25:B5:AA:AA:AA" adminVcon="any" bootDev="disabled" configQualifier="" configState="not-applied" dn="org-root/ls-sp1
1/fc-hba1" equipmentDn="" fltAggr="0" identPoolName="" instType="manual" maxDataFieldSize="2048" name="hba1" nodeAddr="20:00:00:25:B5:BB:BB:BB" nwTemp
lName="" operAdaptorProfileName="org-root/fc-profile-default" operIdentPoolName="org-root/wwn-pool-default" operNwTemplName="" operOrder="1" operPinTo
GroupName="" operQosPolicyName="" operSpeed="line-rate" operStatsPolicyName="org-root/thr-policy-default" operVcon="any" order="1" owner="logical" per
sBind="disabled" persBindClear="no" pinToGroupName="" qosPolicyName="" statsPolicyName="default" switchId="A" type="fc"/> <vnicFc adaptorProfileNam
e="" addr="20:00:00:25:B5

D

D

D" adminVcon="any" bootDev="disabled" configQualifier="" configState="not-applied" dn="org-root/ls-test/fc-vhba2" eq
uipmentDn="" fltAggr="0" identPoolName="" instType="manual" maxDataFieldSize="2048" name="vhba2" nodeAddr="20:00:00:25:B5:CC:CC:CC" nwTemplName="" ope
rAdaptorProfileName="org-root/fc-profile-default" operIdentPoolName="org-root/wwn-pool-default" operNwTemplName="" operOrder="unspecified" operPinToGr
oupName="" operQosPolicyName="" operSpeed="line-rate" operStatsPolicyName="org-root/thr-policy-default" operVcon="any" order="1" owner="logical" persB
ind="disabled" persBindClear="no" pinToGroupName="" qosPolicyName="" statsPolicyName="default" switchId="A" type="fc"/> </outConfigs> </configResolv
eClass>
PS C:\> Get-UcsServiceProfile -type instance | Get-UcsVhba | Get-UcsVhbaInterface -xml
==>bgl-samc17:<configResolveClass classId="vnicFcIf" cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" inHierarchical="false"><inFilter><or><wc
ard class="vnicFcIf" property="dn" value="^org-root/ls-sp11/fc-hba1/" /><wcard class="vnicFcIf" property="dn" value="^org-root/ls-test/fc-vhba2/" /></
or></inFilter></configResolveClass>
<==bgl-samc17: <configResolveClass cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" response="yes" classId="vnicFcIf"> <outConfigs> <vnicFcIf
dn="org-root/ls-sp11/fc-hba1/if-default" initiator="20:00:00:25:B5:AA:AA:AA" name="default" operState="indeterminate" operVnetDn="fabric/san/net-def
ault" operVnetName="default" owner="logical" switchId="A" type="fc" vnet="1"/> <vnicFcIf dn="org-root/ls-test/fc-vhba2/if-default" initiator="20:0
0:00:25:B5

D

D

D" name="vsan2" operState="indeterminate" operVnetDn="fabric/san/net-vsan2" operVnetName="vsan2" owner="logical" switchId="A" type
="fc" vnet="2"/> </outConfigs> </configResolveClass>
PS C:\> Get-UcsServiceProfile -type instance | Get-UcsVhba | Get-UcsVhbaInterface | select Dn,Initiator,Vnet
Dn Initiator Vnet
-- --------- ----
org-root/ls-sp11/fc-hba1/if-default 20:00:00:25:B5:AA:AA:AA 1
org-root/ls-test/fc-vhba2/if-default 20:00:00:25:B5

D

D

D 2
You can download the lastest version of Cisco UCS PowerTool 0.9.6.0 and Getting Started guide from
http://developer.cisco.com/web/unifiedcomputing/microsoft
Thanks,
Vijay Vikrant Balyan