Set-RemoteAccessAccounting

Set-RemoteAccessAccounting

Sets the enabled state for inbox and RADIUS accounting for both external RADIUS and Windows accounting and configures the settings when enabled.

Sintaxis

Parameter Set: EnableAccounting
Set-RemoteAccessAccounting [-EnableAccountingType] <String> [-AccountingOnOffMsg <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-PassThru] [-RadiusPort <UInt16> ] [-RadiusScore <Byte> ] [-RadiusServer <String> ] [-RadiusTimeout <UInt32> ] [-SharedSecret <String> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: DisableAccounting
Set-RemoteAccessAccounting -DisableAccountingType <String> [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The Set-RemoteAccessAccounting cmdlet sets the enabled state for inbox and RADIUS accounting for both external RADIUS and Windows accounting and configures the settings when enabled.

The accounting configuration is globally applicable, such as if a particular kind of accounting is Enabled or Disabled, then that particular kind of accounting is Enabled or Disabled on all Remote Access (RA) servers in the corporate network. The associated configuration is also applicable for all of the corporate network.
-- All RA servers have the same configured accounting RADIUS servers.
-- The default limit set for the inbox accounting store size is the same on all RA servers.

Therefore, this cmdlet is not impacted by a multi-site deployment.

Both inbox accounting and RADIUS accounting can be active at the same time. RADIUS accounting includes Windows accounting, external RADIUS accounting and accounting on the local Network Policy Server (NPS), but only one type of accounting can be active at any time. The RadiusServer, SharedSecret, RadiusPort, RadiusScore, RadiusTimeout, and AccountingOnOffMsg parameters are applicable only when RADIUS accounting is Enabled and cannot be specified when inbox accounting is Enabled.

The following is the behavior associated with enabling External RADIUS accounting.
-- If there is a VPN deployment with accounting enabled and if DirectAccess (DA) is installed on the same RA server then accounting is automatically enabled for DA also and the configuration remains unchanged. Note: If Windows Accounting is enabled for VPN, then it will not work for DA as this is not a supported configuration for DA. For accounting to work for DA in this scenario either NPS needs to be installed locally or an external RADIUS server needs to be configured for accounting. The external radius server can be added using the Add-RemoteAccessRadius cmdlet.
-- If user does not specify a RADIUS server then this cmdlet automatically configures Windows accounting: Note: In this scenario, for accounting to work for DA, NPS needs to be installed on the RA server.

Switching from Windows Accounting to external RADIUS accounting and switching from external RADIUS accounting to Windows Accounting.
-- If the current configuration is Windows accounting a user can switch to external RADIUS accounting by doing one of the following:
---- Run the same cmdlet to enable RADIUS accounting and specify an external RADIUS server
---- Add an external RADIUS server using the Add-RemoteAccessRadius cmdlet. This enables RADIUS accounting without running this cmdlet.
-- A user can switch back to Windows accounting by deleting all the configured external RADIUS servers.

Parámetros

-AccountingOnOffMsg<String>

Specifies the enabled state for the sending of accounting on and off messages. Los valores aceptables para este parámetro son los siguientes:
-- Enabled.
-- Disabled.
The default value is Disabled.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

Disable

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-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 RA 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

-DisableAccountingType<String>

Indicates the accounting type that has to be disabled. Los valores aceptables para este parámetro son los siguientes:
-- Inbox.
-- ExternalRadius.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-EnableAccountingType<String>

Indicates the accounting type that needs to be enabled. Los valores aceptables para este parámetro son los siguientes:
-- Inbox: The store size is set to 12 months automatically. The Set-RemoteAccessInboxAccountingStore cmdlet is used to change the store size on individual RA servers.
-- ExternalRadius: Can also be used to enable Windows Accounting or Accounting on the NPS installed locally on the same computer.

Alias

ninguno

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PassThru

Devuelve un objeto que representa el elemento con el que está trabajando. De forma predeterminada, este cmdlet no genera ningún resultado.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-RadiusPort<UInt16>

Specifies the port number on which the RADIUS server is accepting authentication requests.
The default value is 1813.
This parameter can be configured only if the EnableAccountingType parameter is specified to be ExternalRadius.

Alias

Port

¿Requerido?

false

¿Posición?

named

Valor predeterminado

1813

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-RadiusScore<Byte>

Specifies the initial score.
The default value is 30.
This parameter can be configured only if the EnableAccountingType parameter is specified to be ExternalRadius.

Alias

Score

¿Requerido?

false

¿Posición?

named

Valor predeterminado

30

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-RadiusServer<String>

Specifies the IPv4 or IPv6 address, or host name, of the external RADIUS server that is used for accounting. This parameter can be configured only if the EnableAccountingType parameter is specified to be ExternalRadius.

Alias

ServerName

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-RadiusTimeout<UInt32>

Specifies the time in seconds that the RA server waits for a response from the RADIUS server before the RA server tries to connect to the next RADIUS server. The default value is 5. Specify this parameter only if you specify ExternalRadius for the EnableAccountingType parameter.

Alias

Timeout

¿Requerido?

false

¿Posición?

named

Valor predeterminado

5

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-SharedSecret<String>

Specifies the shared secret between the RA server and the specified external RADIUS server which is required for successful communication between the two servers.
Note: The secret is specified in clear text. This parameter can be configured only if the EnableAccountingType parameter is specified to be ExternalRadius.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿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

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿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#RemoteAccessAccounting

    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.
    The RemoteAccessAccounting object consists of the following properties:
    -- The status of RADIUS accounting (Disabled, Windows, or ExternalRadius) and the list of RADIUS servers in the case of ExternalRadius accounting. If there is no external radius accounting enabled, then the list of Radius servers is empty.
    -- The status of inbox accounting (Enabled or Disabled) and the associated properties.
    -- Time span of the store.
    -- Number of used bytes.
    -- Percentage of used bytes.
    -- Number of free bytes.
    -- Percentage of free bytes.
    -- Time stamp of the first record in the database.
    -- Time stamp of the last record in the database.

Ejemplos

EXAMPLE 1

This example enables inbox accounting for this deployment. The RA server on which this cmdlet is run is specified using the ComputerName parameter.

PS C:\> Set-RemoteAccessAccounting –EnableAccountingType Inbox -ComputerName edge2 –PassThru

The accounting store is configured to retain data for up to 2 years.

PS C:\> Set-RemoteAccessInboxAccountingStore –StoreLimit 2y

EXAMPLE 2

This example configures RA to use RADIUS accounting with configuration parameters.

PS C:\> Set-RemoteAccessAccounting –EnableAccountingType ExternalRadius –RadiusServer radius1.corp.contoso.com –RadiusTimeout 5 –SharedSecret s3cr3t –RadiusPort 1813 –RadiusScore 30

EXAMPLE 3

This example disables RADIUS accounting while still retaining inbox accounting.

PS C:\> Set-RemoteAccessAccounting –DisableAccountingType ExternalRadius

Temas relacionados

Add-RemoteAccessRadius

Get-RemoteAccessAccounting

Set-RemoteAccessInboxAccountingStore