More than a matter of powershell but you all are great

Hello everyone, I have a question for you, it's more a question of powershell, but this group is good.  When I look through an object I want the object reference and value, something like that;

$a = @()

$t = "" | Select first, last, e-mail

$t.first = 'Tom '.

$t.last = "Jones".

$t.email = " " [email protected] "" "

{foreach ($view in $t)

$view

}

/ code

This will make me the answers, I want the answer (Tom) and the reference (the first).  Is this possible?

Thank you

Tim

OK, got it.

Maybe not more elegant solution for this, but it should do the trick

$a = "" | select Field1, Field2
$a.Field1 = "abc"
$a.Field2 = 111

$t = $a | gm -memberType NoteProperty
for($i=0; $i -lt $t.Count; $i++){
     $name = $t[$i].Name
     Write-Host $name "=" $a."$name"
}

Tags: VMware

Similar Questions

Maybe you are looking for

  • How we prevent Windows Media Player plug-ins from the substitution of sizing in html code integration?

    My html code for integration of Windows Media Player in Firefox but not IE 8 problems recently developed framework. The player displays correctly at the beginning, but then repositions and resizes. It seems that my width setting is to honor, but not

  • Portege Z30-B-10v - internal mic stops working when I plug headphones

    I have Toshiba Portege Z30-B-10v. There is a problem when I plag in the internal microphone headset no longer works and I can't find possibilities how to turn it on. It has been found on both win7 and win10 platform any hint how to solve? THX B.

  • Intel pro wireless 2200BG doesn't work

    I installed an Intel pro wireless 2200BG mini PCI card on my Satellite 1900-303, everything looks OK, but it says hardware turn off switch is on but the led remains off and the Wireless does not work

  • Parameters of the agenda...

    Is it possible to have all the days on the calendar with a white background?  Right now my calendar watch on weekends in white, but in week in gray.  I looked in preferences, but don't see any possibility to change weekends.

  • TELUSURI and line status "unavailable".

    Hi all Came across an interesting 'line status shows as unavailable (Red Cross)' in the TELUSURI customer. Cisco TAC tell me it's because of the camera that monitors the Client. Static phones - TELUSURI uses the name of the device - SEPxxxxxxxxxxxx M