title: Get the Data values from the registry using powershell
body: <p>I am trying to add an application in 'DisallowRun' registry key to avoid running application to specific users. Need to add the application if not exist. Consider 'TestApp3.exe' in this case.</p>
  
  <p>Used below query to get the list of items in the key. It is giving Name(<code>Key Name</code>), Property(<code>Name Value : Data Value</code>)</p>
  
  <pre><code>Get-Item -Path "Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun"
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <p>Name                           Property<br>
  ----                           --------<br>
  DisallowRun                    1 : TestApp1.exe<br>
  DisallowRun                    2 : TestApp2.exe<br>
  DisallowRun                    3 : TestApp3.exe<br>
  DisallowRun                    4 : TestApp4.exe</p>
  
  <p>When i use .Property in the code, getting only Name Values and not Data Values</p>
  
  <pre><code>(Get-Item -Path "Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun").Property
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <p>1<br>
  2<br>
  3<br>
  4  </p>
  
  <p>If i get only the Data Values (similar to below) then i could have use <code>contains</code> function to check the specific application is already available or not. Please help me to get only Data Value or is there anyway to check the application is exist in the registry key.</p>
  
  <p>TestApp1.exe<br>
  TestApp2.exe<br>
  TestApp3.exe<br>
  TestApp4.exe</p>