November 2018
Intermediate to advanced
566 pages
17h 15m
English
This is, in fact, very simple. Here is the high-level flow of what we want to do:
Here is the script that will perform this operation.
$AllLogLines = Get-Content ./ch10/08-mdm-reinstall-log.log
$UserTable = @()
foreach ($Line in $AllLogLines) {
$Timestamp = ($Line.Split(' '))[0]
$Line = $Line -replace ".+(DeviceActionEvent)\ \{", '{'
$Line = $Line -replace '\]$' # Alternatively: $Line = $Line | Select-String -Pattern '(\{.*})' | ForEach-Object { $PSItem.Matches | ForEach-Object { $PSItem.Value } } $JsonData ...Read now
Unlock full access