-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified Get-LogUserAssist.ps1 to return Key LastWriteTime in ISO for…
…mat for easier sorting. Added analysis script to sort UserAssist data based on key LastWriteTime.
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<# | ||
Get-LogUserAssistValueByDate.ps1 | ||
Requires logparser.exe in path | ||
Returns UserAssist data sorted by KeyLastWritetime ascending | ||
This script expects files matching the *LogUserAssist.tsv pattern to be in the | ||
current working directory. | ||
#> | ||
|
||
|
||
if (Get-Command logparser.exe) { | ||
$lpquery = @" | ||
SELECT | ||
User, | ||
Subkey, | ||
KeyLastWriteTime, | ||
Value, | ||
Count, | ||
PSComputerName | ||
FROM | ||
*LogUserAssist.tsv | ||
ORDER BY | ||
KeyLastWriteTime ASC | ||
"@ | ||
|
||
& logparser -i:tsv -dtlines:0 -fixedsep:on -rtp:-1 "$lpquery" | ||
|
||
} else { | ||
$ScriptName = [System.IO.Path]::GetFileName($MyInvocation.ScriptName) | ||
"${ScriptName} requires logparser.exe in the path." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters