Search found 18 matches

by thatsameer
Tue Nov 20, 2018 8:48 am
Forum: Windows PowerShell
Topic: Image file name contains date taken - put into metadata
Replies: 2
Views: 990

Image file name contains date taken - put into metadata

Hi all, Not sure where to go because i've tried endless googles but have come back to my trusty community for help. I have a bunch of images which have had their exif data removed - but the date the images were taken remain in the filename e.g. img-2018-03-23.jpg I want to somehow take the date from...
by thatsameer
Wed Aug 08, 2018 7:43 am
Forum: Windows PowerShell
Topic: Select-Object output into ListView?
Replies: 10
Views: 1274

Re: Select-Object output into ListView?

Solved.

Put it into an Array:

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

Thanks
by thatsameer
Wed Aug 08, 2018 5:06 am
Forum: Windows PowerShell
Topic: Select-Object output into ListView?
Replies: 10
Views: 1274

Re: Select-Object output into ListView?

Hmm, It seems I spoke to soon. I actually need more assistance. It seems -Subitems only takes the first result and displays it in the column. It does not take all the rows into account. It only takes the first row and shows the whole column with the first row only. What I mean by this - If I add the...
by thatsameer
Mon Aug 06, 2018 7:38 am
Forum: Windows PowerShell
Topic: Select-Object output into ListView?
Replies: 10
Views: 1274

Re: Select-Object output into ListView?

So to conclude this topic, this is what I did to make the above code work. I read on the spotlight link mentioned above: "In the Details view the Subitems will be displayed only if Columns are defined." That was a critical piece I was missing from my form. So I added 2 columns in Powershell studio, ...
by thatsameer
Fri Aug 03, 2018 1:59 pm
Forum: Windows PowerShell
Topic: Select-Object output into ListView?
Replies: 10
Views: 1274

Re: Select-Object output into ListView?

Thank you my friend! I got it working exactly how I wanted it by actually spending time reading the spotlight :D

I will post screenshots and what I did in a bit, in case anyone else needs some assistance...
by thatsameer
Fri Aug 03, 2018 1:24 pm
Forum: Windows PowerShell
Topic: import-csv and combobox
Replies: 4
Views: 1492

Re: import-csv and combobox

Try this my friend, add to the form load section of your script: $csvlist = import-csv -path 'C:\path to your csv file' $combobox1.DataSource = [system.Collections.ArrayList]$csvlist $combobox1.DisplayMember = 'company' $combobox2.DataSource = [system.Collections.ArrayList]$csvlist $combobox2.Displa...
by thatsameer
Fri Aug 03, 2018 8:39 am
Forum: Windows PowerShell
Topic: Select-Object output into ListView?
Replies: 10
Views: 1274

Re: Select-Object output into ListView?

Hi, Thank you for the very quick reply. I have my ListView set to SmallIcon and checkbox on. I added the line you mentioned below and it's getting there. I had to remove the | select-object ntaccountname, accountislockedout for the listview to display properly. This is what it looks like (code behin...
by thatsameer
Fri Aug 03, 2018 7:37 am
Forum: Windows PowerShell
Topic: Select-Object output into ListView?
Replies: 10
Views: 1274

Select-Object output into ListView?

Hi, I firstly request your patience and politeness as I haven't used message boards before & also I'm not a super expert at PowerShell. So if I post something wrong, apologies, but please be nice. I created a form on Powershell Studio 2018. (I'm using the Quest ActiveRoles Management Shell to work w...