I have been having an issue with parsing an xml file
<DisplayName>Remote_Take_Over_S1_0002</DisplayName>
I am trying to get the above information from "C:\ProgramData\App-V\1BBEDDA5-595E-4CF7-834A-B282C4981469\0C71FE9F-F1C0-47F9-9518-E94898B6424F\AppxManifest.xml"
I have know idea how or where to start but i have got this far.
$ComputerName = $txb_hostname.Text
$RemoteParentPath = Join-Path -Path "\\$ComputerName" -ChildPath 'c$\ProgramData\App-V'
$RemoteManifestPaths = Get-ChildItem -Path $RemoteParentPath -Recurse -Filter 'AppxManifest.xml' | Select-Object -ExpandProperty FullName
foreach ($manifestFile in $RemoteManifestPaths)
{
$xml = [xml](Get-Content -Path $manifestFile -Raw)
$xml.SelectSingleNode('//*[local-name()="DisplayName"]/text()').Value
LogWrite $xml
}
Any Ideas?
Errors now You cannot call a method on a null-valued expression. At line:6 char:5
Get-Content : Cannot find path 'H:\AppxManifest.xml' because it does not exist. At line:5 char:18
Managed to sort above errors