Hi @Diwas K ,
maybe this helps to get started (the test.xml contains the xml structure you posted in your question):
$a = Select-Xml -Path .\Junk\test.xml -XPath "//entry" | Select-Object -ExpandProperty Node
# Get Employee Id
$empId = ($a | Where-Object { $_.key -eq 'Employee Id' }).Value
$empId
# Get Manager
$manager = ($a | Where-Object { $_.key -eq 'Manager' }).Value
$manager
A more dynamic option:
$a = Select-Xml -Path .\Junk\test.xml -XPath "//entry" | Select-Object -ExpandProperty Node
$a | ForEach-Object {
Remove-Variable -Name $($_.Key)
New-Variable -Name $($_.Key) -Value $($_.Value)
}
$manager
${Employee Id}
$name
${Effective Date}
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten