Advertisement
Xyberviri

checkifheader.ps1

Aug 6th, 2022
852
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.      $file = "C:\temp\file.csv"
  2.      $os = "Windows 10"
  3.      $content= Import-Csv -Path $file
  4.      $headers = ($content | Get-Member -MemberType NoteProperty).Name
  5.      if($os -in $headers){
  6.         $kb =  $content.$os
  7.      }
Advertisement
RAW Paste Data Copied
Advertisement