Create Rows with Powershell PSCustomObject

Jul 8, 2013 at 3:50 PM

I try to load a DB with SQLite Provider with filtered events (from the event log), the code looks like :

Get-eventLog | [SomeFiltering] |% { add-member -Passthru } |% { $_ | new-item mydb:/MyTable }

Psh can not bind parameters to new item due to missing mandatory parameter "NAme" which did not exist in the table nor in the added property. I assume that the Module doesn't know how to "manage" PSCustomObject ?

Another point is that the more rows are inserted the slower it goes. For example, the first scan generate around 2300 rows, it takes 1 minute to insert the first 100 rows, and almost 30minutes to insert the first 1200 rows. The entire operation will last almost 1hour :/ Is there a workaround ?