Select-Object output into ListView?

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Posts: 18
Joined: Fri Aug 03, 2018 7:02 am

Re: Select-Object output into ListView?

Post by thatsameer » Wed Aug 08, 2018 7:43 am


Put it into an Array:

foreach($person in $usernameresults)
Add-ListViewItem -ListView $listview1 -Items $person.ntaccountname -SubItems $person.accountislockedout