Get-RemoteAccessUserActivity

Get-RemoteAccessUserActivity

Displays the resources accessed over the active DirectAccess (DA) and VPN connections and the resources accessed over historical DA and VPN connections.

Sintaxis

Parameter Set: UserName
Get-RemoteAccessUserActivity [-UserName] <String> [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-EndDateTime <DateTime> ] [-StartDateTime <DateTime> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: HostIP
Get-RemoteAccessUserActivity -HostIPAddress <String> [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-EndDateTime <DateTime> ] [-StartDateTime <DateTime> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: SessionId
Get-RemoteAccessUserActivity -SessionId <UInt64> [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Descripción detallada

The Get-RemoteAccessUserActivity cmdlet displays the resources accessed over the active DirectAccess (DA) and VPN connections and the resources accessed over historical DA and VPN connections.

The resources accessed over active and historical connections starting or ending on a Remote Access server are stored in the inbox accounting store on that server. This cmdlet retrieves the resources accessed for a specific server. The cmdlet is not impacted by multi-site deployment.
-- If a start date nor an end date is specified, then the resources accessed over active connections are retrieved
-- In order to retrieve the list of resources accessed over historical connections, a time duration needs to be specified such as a start date, an end date, or both. If only one of them is specified, then the time stamp on the first or last record in the accounting database is used to fill the missing information and create a duration.

The statistics of active connections can be explicitly filtered by the user name of the user who originated the Remote Access connection and the tunnel IP address of the client computer such as the IP address assigned by the server, from which the connection originated. However, only one of these filters can be used at a time.

Parámetros

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ComputerName<String>

Specifies the IPv4 or IPv6 address, or host name, of the computer on which the remote access server computer specific tasks should be run.

Alias

Cn

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-EndDateTime<DateTime>

Specifies the time duration for which the user activity needs to be retrieved and indicates the end date.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue)

¿Aceptar caracteres comodín?

false

-HostIPAddress<String>

Specifies the tunnel IP address of the connection. This can be an IPv4 or IPv6 address.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-SessionId<UInt64>

Specifies an ID for a session for which to retrieve user activity data.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-StartDateTime<DateTime>

Specifies the time duration for which the user activity needs to be retrieved and indicates the start date.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue)

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-UserName<String>

Specifies the user whose activity needs to be retrieved. This parameter uses the DOMAIN\USERNAME format.

Alias

ninguno

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

  • None

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.Management.Infrastructure.CimInstance#RemoteAccessUserActivity[]

    El objeto Microsoft.Management.Infrastructure.CimInstance es una clase contenedora que muestra objetos de Instrumental de administración de Windows (WMI). La ruta de acceso después del signo de número (#) proporciona el espacio de nombres y el nombre de clase del objeto WMI subyacente.
    For both real-time and accounting cases, the RemoteAccessUserActivity object consists of the following properties. A separate instance of the RemoteAccessUserActivity object is output for every corporate network resource that is accessed over the connection.
    -- The IP address of the server in the corporate network.
    -- The identity of the protocol used to access the server.
    -- The port number used to access the server.

Ejemplos

EXAMPLE 1

This example shows historic access details for a particular user. Query the accounting store for user activity details for User1 between the start date and end date.

PS C:\> $startdate = Get-Date –Date "12/16/2011"
PS C:\> $startdate
PS C:\> $enddate = Get-Date –Date "12/23/2011"
PS C:\> $enddate
PS C:\> Get-RemoteAccessUserActivity -StartDateTime $startdate -EndDateTime $enddate -UserName "corp.contoso.com\User1"

EXAMPLE 2

This example shows the resources currently being accessed by the user named User1. If the user is not active currently, then the cmdlet will not return any rows.

PS C:\> Get-RemoteAccessUserActivity -UserName "contoso\User1" -ComputerName edge1.corp.contoso.com

Temas relacionados

Get-Date