I have to parse to get an IP address.
$Currentpath = Split-Path -Parent $MyInvocation.MyCommand.Definition
$CheminCSV = $currentpath + '\LesIP.csv'
$csv = Import-Csv $CheminCSV
$MyIPS = $csv | select IP
$MyHostnames = $csv | select HostName
Write-Host($MyIPS[1])
The actual results are:
@{IP=192.168.1.10}
and I expect:
192.168.1.10