That's called a "Calculated property". It's a way to add a property in your selected object with the name specified by n=
and having the value resulting from expression e=
.
What does this Powershell command mean in English?
-
01-10-2022 - |
Вопрос
In Exchange Management Shell, you can write a query to display administrator activities.
Search-AdminAuditLog -Startdate ((get-date).AddDays(-5)) -EndDate (get-date) | where{$_.caller -ne "NT AUTHORITY\SYSTEM (MSExchangeHMWorker)"} |select Caller, Rundate, ObjectModified, CmdLetName, @{n="Parameters"; e={$e=$null;$_.CmdLetParameters|%{$e += ( " -" + $_.name.tostring() + " '" + $_.value + "'")};$e}} | ft -autosize
Most of the commands make sense but can anyone explain the @... part in English? Specifically this part:
@{n="Parameters"; e={$e=$null; $_.CmdLetParameters | %{$e += ( " -" + $_.name.tostring() + " '" + $_.value + "'")};$e}}
Решение
Не связан с StackOverflow