I want to read element in XML file using parameters. I tried this code, I can print the XML file, but I can't get the element. But I tried to get the element without using parameters and It works.
Param(
[parameter(mandatory=$true)][string]$XML
)
$Feature= Get-Content $XML
$Feature
$Read_XML = $Feature.DocumentElement.InnerText
$Read_XML
I run the script from cmd :
$PowerShell.exe getxml.ps1 -XML <path xml file>