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.

構文

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

詳細説明

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.

パラメーター

-AccountingOnOffMsg<String>

Specifies the enabled state for the sending of accounting on and off messages. このパラメーターに対して使用できる値:
-- Enabled.
-- Disabled.
The default value is Disabled.

エイリアス

なし

必須?

false

位置は?

named

既定値

Disable

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

Cn

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DisableAccountingType<String>

Indicates the accounting type that has to be disabled. このパラメーターに対して使用できる値:
-- Inbox.
-- ExternalRadius.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-EnableAccountingType<String>

Indicates the accounting type that needs to be enabled. このパラメーターに対して使用できる値:
-- 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.

エイリアス

なし

必須?

true

位置は?

2

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-PassThru

作業中の項目を表すオブジェクトを返します。既定では、このコマンドレットによる出力はありません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

Port

必須?

false

位置は?

named

既定値

1813

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

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.

エイリアス

Score

必須?

false

位置は?

named

既定値

30

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

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.

エイリアス

ServerName

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

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.

エイリアス

Timeout

必須?

false

位置は?

named

既定値

5

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ThrottleLimit<Int32>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • None

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Microsoft.Management.Infrastructure.CimInstance#RemoteAccessAccounting

    Microsoft.Management.Infrastructure.CimInstance オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。シャープ記号 (#) の後のパスは、基になる WMI オブジェクトの名前空間とクラス名です。
    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.

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

関連トピック

Add-RemoteAccessRadius

Get-RemoteAccessAccounting

Set-RemoteAccessInboxAccountingStore