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.
thatsameer
Posts: 10
Joined: Fri Aug 03, 2018 7:02 am

Re: Select-Object output into ListView?

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

Solved.

Put it into an Array:

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

Thanks

Locked