Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Powershell to export some security events to a csv file

$
0
0

I am trying to do some powershell scripting, finally, after putting things off for way too long. I am looking to parse security logs and output just the timestamp, username, domain, and originating IP address. I have the below script that I found through google, Thank You Soostibi from Experts Exchange, it does what I want it to, now I just need to export the information to a csv file.
Thank sin advance.

Powershell
Get-EventLog-LogNamesecurity-InstanceId4625|Select-Object-Propertytimegenerated,@{n="AccountName";e={$_.replacementstrings[5]}},@{n="AccountDomain";e={$_.replacementstrings[6]}},@{n="WorkstationName";e={$_.replacementstrings[19]}}


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>