Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - How do i retrieve only the values from array ?

Reply
 
Old 10-24-2008   #1 (permalink)
IT Staff


 
 

How do i retrieve only the values from array ?

Using quest get-qadcomputer | select name ....

Results are :

Name NoteProperty System.String Name=A0034632

IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Object[] System.Array

foreach ($computer in $computernames) {write-host $computer}

@{Name=A0034632}
@{Name=A0054213}
@{Name=B0000769}

=======================================================
I m interested in the values like a0034632,a0054213, etc




My System SpecsSystem Spec
Old 10-24-2008   #2 (permalink)
Shay Levy [MVP]


 
 

Re: How do i retrieve only the values from array ?

Hi IT,


Can you share the full command? What version of QAD are you using?
The 'Name' property should be a system.string type.



---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar: http://tinyurl.com/PSToolbar



IS> Using quest get-qadcomputer | select name ....
IS>
IS> Results are :
IS>
IS> Name NoteProperty System.String Name=A0034632
IS>
IS> IsPublic IsSerial Name BaseType
IS> -------- -------- ---- --------
IS> True True Object[]
IS> System.Array
IS>
IS> foreach ($computer in $computernames) {write-host $computer}
IS>
IS> @{Name=A0034632}
IS> @{Name=A0054213}
IS> @{Name=B0000769}
IS> ======================================================= I m
IS> interested in the values like a0034632,a0054213, etc
IS>


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Unable to retrieve value from drop down list (values read from textfile) VB Script
Getting all values out of an array of objects PowerShell
how to assign values to array and how to create array via variable PowerShell
Initialize array without values PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46