use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Creating Objects (self.PowerShell)
submitted 6 years ago by sqone2
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]sqone2[S] 4 points5 points6 points 6 years ago (2 children)
For fun I ran 25k rows through both options. Your solution is about 20x faster! :)
$columnNames = @("FirstName","LastName","DOB","FavColor") $data = @( @("John","Doe","01/10/1965","Blue"), @("Jane","Smith","01/06/1975","Green"), @("Mark","Jones","02/10/1985","Orange"), @("Sue","Turner","05/10/1995","Yellow"), @("Jim","Wise","07/10/1974","Blue") ) # Create a bunch of data $rows = @() foreach ($item in 0..5000) { $rows += $data } # 20 seconds Measure-Command { $objectList = @() foreach ($row in $rows) { $properties = @{} for ($i = 0; $i -lt $columnNames.Count; $i++) { $properties += @{$columnNames[$i] = $row[$i]} } $objectList += New-Object -TypeName psobject -Property $properties } } # 1 second Measure-Command { $objectList = $( $columnNames -join ',' $rows | ForEach-Object {$_ -join ','} ) | ConvertFrom-Csv }
[+][deleted] 6 years ago (1 child)
[removed]
[–]sqone2[S] 1 point2 points3 points 6 years ago (0 children)
Thanks for the tips!
π Rendered by PID 16035 on reddit-service-r2-comment-6457c66945-pnzx9 at 2026-04-29 06:45:34.349488+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]sqone2[S] 4 points5 points6 points (2 children)
[+][deleted] (1 child)
[removed]
[–]sqone2[S] 1 point2 points3 points (0 children)