Skip to content

Instantly share code, notes, and snippets.

@jkbryan
Last active March 7, 2019 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkbryan/9553bd4effc8b51bf6505f8fa77a0329 to your computer and use it in GitHub Desktop.
Save jkbryan/9553bd4effc8b51bf6505f8fa77a0329 to your computer and use it in GitHub Desktop.
LogParserRedactionSQL
SELECT
EventLog,
RecordNumber,
TimeGenerated,
TimeWritten,
EventID,
EventType,
EventTypeName,
EventCategory,
EventCategoryName,
SourceName,
REPLACE_STR(REPLACE_STR(REPLACE_STR(Strings,'OHOLICS','XXXXXXX'),'192.168.','X.X.'),'blog.oholics.net','blog.XXXXXXX.net'),
REPLACE_STR(REPLACE_STR(ComputerName,'OHOLICS','XXXXXXX'),'blog.oholics.net','blog.XXXXXXX.net'),
SID,
REPLACE_STR(REPLACE_STR(REPLACE_STR(Message,'OHOLICS','XXXXXXX'),'192.168.','X.X.'),'blog.oholics.net','blog.XXXXXXX.net'),
REPLACE_STR(REPLACE_STR(REPLACE_STR(Data,'OHOLICS','XXXXXXX'),'192.168.','X.X.'),'blog.oholics.net','blog.XXXXXXX.net')
INTO C:\TEMP\Output\OUTPUT.CSV
FROM C:\TEMP\Logs\*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment