Select-Object output into ListView?

Ask your 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.
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
thatsameer
Posts: 18
Last visit: Thu Apr 18, 2019 7:07 am

Re: Select-Object output into ListView?

Post by thatsameer »

Solved.

Put it into an Array:

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

Thanks
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked