Get-Content $env:SystemRoot\\System32\\Drivers\\etc\\hosts

Get-WinEvent -Path 'C:\\Users\\Administrator\\Desktop\\merged.evtx' -FilterXPath '*"*/System/EventID=4104 ' -Oldest -MaxEvents 1 | Format-List '*'

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/75e7c9ff-8638-4b48-a43b-5a947f95d516/Untitled.png


Get-WinEvent  -Path 'C:\\Users\\Administrator\\Desktop\\merged.evtx'  -FilterXPath '*/EventData/Data[@Name="CallerProcessName"]="C:\\Windows\\System32\\net1.exe"' |Where-Object -Property Id -eq 4799 | Format-List '*'

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/44ea1073-d235-4292-bcfb-693159c58220/Untitled.png

Get-WinEvent -Path 'C:\\Windows\\System32\\winevt\\Logs\\Security.evtx' -FilterXPath ' */System/EventID=4624 and */EventData/Data[@Name="TargetUserName"]="John"'
ForEach ($user in Get-LocalUser) {echo $user.Name $user.Lastlogon}

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/5f426588-4115-4b0f-9bb3-a3e9e97027b3/Untitled.png

Get-LocalGroupMember -Group "Administrators"

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/fcf887b8-d2f8-4f5a-a89f-bbf1215f0054/Untitled.png