strcat() / tolower() / toupper()
strcat(a, b, ...) joins its arguments into one string. It takes any number of arguments, from
columns or literals:
| extend Endpoint = strcat(RemoteIP, ":", tostring(RemotePort))
Arguments that are not strings are converted to text, but converting explicitly with tostring() makes
your intent clear. On this site, strcat() accepts strings, whole numbers and booleans.
tolower(x) and toupper(x) return the string in lower or upper case.
Why change case?
Grouping, distinct, join keys and == all compare text with exact
case. If the same user appears as Tomas.Kral and tomas.kral, they count as two values. Normalising
first fixes that:
| extend Account = tolower(Account)
| summarize Logons = count() by Account
For a simple filter you don’t need to change case: use =~, in~, has or
startswith, which ignore case already.
Things to know
Examples
AuditLogs
| where OperationName == "Reset user password"
| project TimeGenerated, Summary = strcat(toupper(Result), ": ", Identity, " reset a password")DeviceProcessEvents
| summarize Runs = count() by Name = tolower(FileName)
| top 2 by RunsSecurityEvent
| where EventID == 4624 and Computer == "SRV-FILE01.kestrelbay.example"
| extend Who = strcat(TargetDomainName, @"\", TargetUserName)
| summarize Logons = count() by WhoPractice it
None of the free exercises needs this one yet.
+ 1 in the full SC-200 set · all exercises