Tag Archives: datatable

Send Windows Event Logs to SQL Database

I’m currently in the process of planning for an AppLocker rollout to all my PCs (about 7,500 of them) due to an increasing amount of malware. You should probably be doing this too. Anyway, a sensible first step is to … Continue reading

Rate this:

Posted in PowerShell, Scripting, Security, Windows | Tagged , , , , , , , , , , , , , , , , , , , , , , , | 4 Comments

Missing row when using ExecuteReader to fill a DataTable

I’ve been using the following PowerShell code to retrieve the contents of an SQL Server table and store it in a DataTable for fast local processing: $BuildDBConnection = New-Object -TypeName System.Data.SqlClient.SqlConnection -ArgumentList “Server=RCMSQL01;Database=TSBuild;Integrated Security=SSPI” $BuildDBConnection.Open() # Get Main table $SQLCommand … Continue reading

Rate this:

Posted in PowerShell, Scripting | Tagged , , , , , , , , | Leave a comment