Set-DANetworkLocationServer

Set-DANetworkLocationServer

Configures the Network Location Server (NLS).

構文

Parameter Set: ExternalServer
Set-DANetworkLocationServer [-Url] <String> [-AsJob] [-CheckReachability] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-Force] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: OnDAServer
Set-DANetworkLocationServer -NlsOnDAServer [-AsJob] [-Certificate <X509Certificate2> ] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-Force] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Set-DANetworkLocationServer cmdlet configures the Network Location Server (NLS). The NLS can be present on the DirectAccess (DA) server or on some other highly available server

NLS configuration is applicable globally. It is either present on every DA server or when present on a separate, highly available server it acts as the NLS for all DA clients. Hence this cmdlet is not impacted by multi-site deployments.

The IIS role and IP and Domain Restrictions role service are required on the DA server if it has to be configured as the NLS. These roles get automatically installed during Remote Access installation itself.

If the NLS is already configured on the DA server and this cmdlet is used to move it to a different computer, then this cmdlet does not uninstall IIS and IP and Domain Restrictions roles.

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-Certificate<X509Certificate2>

Specifies the certificate to be used when the NLS is configured to be on the DA server.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByValue)

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

false

-CheckReachability

Performs a reachability check to the specified URL and configures the NLS on that server only if the URL is reachable.

エイリアス

なし

必須?

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 DA server computer specific tasks should be run.

エイリアス

Cn

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-Force

ユーザーの確認を求めずにコマンドを強制的に実行します。
When suppressed the cmdlet assumes user confirmation for the following conditions.
-- Creation of self-signed certificate when configuring the NLS on the DA server.
-- Moving the NLS from the DA server to an external server: The corresponding URL on the DA server is decommissioned. Clients outside corpnet will not receive the updated policies. When the clients enter corporate network, the URL will be inaccessible and the clients will be detected to be outside corporate network. As a result the client will not be able to access corporate resources.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-NlsOnDAServer

Specifies that NLS should be configured on the DA Server, that is the server on which the cmdlet is run.
In order for the DA server to act as a NLS an appropriate certificate is required to be installed on the server. By default the cmdlet looks for a certificate on the server. In case of multi-site, load balancing configuration, or multi-site and load balancing configuration the certificate has to be present on all of the servers.
If a certificate is not found, then a self-signed certificate is created for this purpose. Before creating the self-signed certificate the cmdlet asks for user confirmation. If the user wishes to specify a certificate explicitly, then the Certificate parameter can be used.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

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

false

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

false

-PassThru

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-ThrottleLimit<Int32>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-Url<String>

Specifies the URL of a website hosted on a highly available external server which is used as the NLS that provides clients with location information.

エイリアス

なし

必須?

true

位置は?

2

既定値

なし

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

True (ByPropertyName)

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

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#DANetworkLocationServer

    Microsoft.Management.Infrastructure.CimInstance オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。シャープ記号 (#) の後のパスは、基になる WMI オブジェクトの名前空間とクラス名です。
    The DANetworkLocationServer object consists of the following properties:
    -- If the NLS is configured on the DA server or on a different server.
    -- The URL used for detecting whether a remote computer is inside or outside the corporate network (if NLS is configured on a different server).
    -- The certificate used for NLS (if it is configured on the DA server).
    -- Reachability of the NLS (if on a different server).

EXAMPLE 1

This example configures the NLS on the DA server. This cmdlet first looks for an appropriate certificate on the DA computer itself. Since it is not able to find one it decides to create a self-signed certificate and prompts the user to accept before going ahead and creating one.

PS C:\> Set-DANetworkLocationServer -NlsOnDAServer -PassThru

EXAMPLE 2

This example looks for an appropriate certificate for NLS and manually uses the certificate to configure the NLS on the DA server.
All the certificates will be retrieved from local computer store. This list will be filtered on the certificate for our DA server edge1 to obtain the SSL certificate required. This certificate is then passed to this cmdlet to configure NLS. Since DA NLS configuration is global it will be created on all Client GPOs.

PS C:\> $a = Get-ChildItem –Path cert:\localmachine\my
PS C:\> $cert = $a | Where-Object -Property Subject -Value CN=edge1.corp.contoso.com -Clike
PS C:\> Set-DANetworkLocationServer -NlsOnDAServer -Certificate $cert

EXAMPLE 3

This example configures an external server as the NLS by specifying the URL https://nsl.corp.contoso.com hosted on that server. Since the NLS is configured on the DA server in the setup this cmdlet will prompt, that the users which do not receive the new policies resulting from this change will not be able to access internal resources when inside the corporate network as they will be detected to be outside the corporate network. Once the user confirms to the prompt, this cmdlet first checks whether the given URL is reachable and if it is reachable then it sets this URL in the DA configuration.

PS C:\> Set-DANetworkLocationServer -Url https://nsl.corp.contoso.com -CheckReachability -PassThru

If the NLS is moved to another computer, then clients without updated GPOs will not be able to connect to the new location. When these clients are located in the internal network they will not be able to connect to internal resources as expected.

PS C:\> 

関連トピック

Get-DANetworkLocationServer

Get-ChildItem

Where-Object