got it :
$vmlist = get-vmhost esx04.pimdomain | get-vm
foreach($vm in $vmlist){
Get-NetworkAdapter $vm | %{
Write-Host "Setting adapter" $_.NetworkName on $vm
$_ | Set-NetworkAdapter -PortGroup (Get-VirtualPortGroup -VMhost esx04.pimdomain -Standard -Name $_.NetworkName) -Confirm:$false
}
}
thanks for the help