Only extract Value of CSV

Hi all,

I’m having a little Problem.

Since i use Windows 10, this Method worked for me:

$printers = import-csv -path “.printers.csv” -Delimiter ‘;’ -Header “Location”,”IPAddress”
$printerip = $printers.IPAddress

and when i Write-Hosted it, this comes out:
10.3.196.87

And thats how i want it.

But since our clients are using Windows 7, this Method doesn’t work.

I’ve tried this:

$printers = import-csv -path “.printers.csv” -Delimiter ‘;’ -Header “Location”,”IPAddress”
$printerip = $printers | select “IPAddress”

and this comes out:
@{IPAddress=10.3.196.87}

How can i get rid of @{}?

Thanks for answering!

submitted by /u/francisco_cecilio
[link] [comments]

Leave a Reply