Import from csv failing RRS feed

  • Question

  • Hi to all, 

    I am trying to run a simple import which is not working: 

    I have created a csv file with one column and one string 


    $SCCM = import-csv c:\blt.csv
    $SCCM = ForeEach-object {
    $setlocation = $_.setlocation

    when i check the result of $Setlocation i get nothing. 

    I need it to be BLT. 

    What am i doing wrong?

    Thank you


    Sunday, March 15, 2020 10:30 AM


  • You've misspelled "ForEach-Object". Remove the extra "e".

    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    • Marked as answer by Amir Atary Monday, March 16, 2020 7:11 AM
    Sunday, March 15, 2020 3:28 PM
  • It's definitely a typo. That code won't run at all.

    Maybe the second "=" is a typo too! :-P

    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    Monday, March 16, 2020 1:42 AM

All replies