title: Query XML file for a value in Powershell
body: <p>Hi I am trying to query below Displayname in XML file using powershell</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;DeploymentConfiguration PackageId="dce78f0d-d8d4-4a89-9f5d-c37fbf95ee7a" DisplayName="Beyond-Compare-3-3-8" IgnorableNamespaces="" xmlns="http://schemas.microsoft.com/appv/2010/deploymentconfiguration"&gt;
  </code></pre>
  
  <p>I did try</p>
  
  <pre><code>$Xml = Select-Xml -Path "C:\temp\Beyond-Compare-3-3-8_DeploymentConfig.xml"  -Namespace $Namespace -XPath "DisplayName=" 
  </code></pre>
  
  <p>I get error </p>
  
  <blockquote>
    <p>Select-Xml : Cannot validate argument on parameter 'Namespace'. The argument is null or empty. Supply an argument that
    is not null or empty and then try the command again.
    At line:1 char:191
    + ... l"  -Namespace $Namespace -XPath "DisplayName="
    +                    ~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Select-Xml], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.SelectXmlCommand</p>
  </blockquote>