Update README.md

This commit is contained in:
Alex Kup 2023-03-18 09:59:34 +03:00 committed by GitHub
parent 89ceab0df4
commit 5cc79073f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1186,7 +1186,7 @@
`Get-VBRBackupServerCertificate` \
`Get-VBRRestorePoint` \
`Get-VBRViProxy` \
`https://veeam-11:9419/swagger/ui/index.html` RAST API
`https://veeam-11:9419/swagger/ui/index.html` API
# XML
@ -1202,17 +1202,17 @@
`else {return}` \
`}`
`$FilterXPath = '<QueryList><Query Id="0"><Select>*[System[EventID=21]]</Select></Query></QueryList>'`
`$RDPAuths = Get-WinEvent -ComputerName $srv -LogName "Microsoft-Windows-TerminalServices-LocalSessionManager/Operational" -FilterXPath $FilterXPath`
`[xml[]]$xml = $RDPAuths | Foreach {$_.ToXml()}`
`$EventData = Foreach ($event in $xml.Event) {`
`New-Object PSObject -Property @{`
`"Connection Time" = (Get-Date ($event.System.TimeCreated.SystemTime) -Format 'yyyy-MM-dd hh:mm K')`
`"User Name" = $event.UserData.EventXML.User`
`"User ID" = $event.UserData.EventXML.SessionID`
`"User Address" = $event.UserData.EventXML.Address`
`"Event ID" = $event.System.EventID`
`}}`
`$FilterXPath = '<QueryList><Query Id="0"><Select>*[System[EventID=21]]</Select></Query></QueryList>'` \
`$RDPAuths = Get-WinEvent -ComputerName $srv -LogName "Microsoft-Windows-TerminalServices-LocalSessionManager/Operational" -FilterXPath $FilterXPath` \
`[xml[]]$xml = $RDPAuths | Foreach {$_.ToXml()}` \
`$EventData = Foreach ($event in $xml.Event) {` \
`New-Object PSObject -Property @{` \
`"Connection Time" = (Get-Date ($event.System.TimeCreated.SystemTime) -Format 'yyyy-MM-dd hh:mm K')` \
`"User Name" = $event.UserData.EventXML.User` \
`"User ID" = $event.UserData.EventXML.SessionID` \
`"User Address" = $event.UserData.EventXML.Address` \
`"Event ID" = $event.System.EventID` \
`}}` \
`$EventData`
# Git