July 2017
Intermediate to advanced
648 pages
31h 9m
English
To create more advanced and customizable reports, we can create a PowerShell function that returns a custom object with only the information we're interested in. Add the following function to your Shell session:
function Get-ActiveUsers { [CmdletBinding()] param( [Parameter(Position=0, ValueFromPipelineByPropertyName=$true, Mandatory=$true)] [string[]] $Name ) process { $Name | %{ $RPC = Get-Counter "\MSExchange RpcClientAccess\User Count"` -ComputerName $_ $MAPI = Get-Counter "\MSExchange MapiHttp Emsmdb\User ` Count" -ComputerName $_ $OWA = Get-Counter "\ASP.NET Apps v4.0.30319(_LM_W3SVC_1_ROOT_OWA)\Requests Executing" ` -ComputerName $_ New-Object PSObject -Property @{ Server = $_ 'MAPI users' = $MAPI.CounterSamples[0].CookedValue ...Read now
Unlock full access