Just a simple question regarding how import-csv command is read. if I have something like this in ps (sorry first time poster, and I can't seem to indent block the script below):
$ReadthisCSV = "C:\...\List.csv"
Function Meh{
param ($readhere)
import-csv $readhere | foreach-object{
#do something here
}
}
Meh $ReadthisCSV
Is it possible for import-csv command to read from an object variable? or can it only read from a direct path.
I did a write-host inside function Meh
to see if $readhere
was passed through correctly, and it did.