次の方法で共有


Set-HcsNtpClientServerAddress

Set-HcsNtpClientServerAddress

Sets the NTP URLs for this device.

構文

Parameter Set: Default
Set-HcsNtpClientServerAddress [-Primary <String> ] [-Secondary <String[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Set-HcsNtpClientServerAddress cmdlet sets the Network Time Protocol (NTP) URLs for this device. You can set one primary URL and several optional secondary URLs.

パラメーター

-Primary<String>

Specifies the primary NTP server address. The device uses this server unless it is not available. You can change the primary address, but you cannot remove it.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-Secondary<String[]>

Specifies an array of secondary NTP server addresses. If the primary NTP server does not respond, the device tries the secondary addresses in order.

If you specify a value for this parameter, this cmdlet replaces the entire list of secondary servers with the array that you specify. The cmdlet does not append the servers to the current array of secondary servers.

エイリアス

なし

必須?

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)。

入力

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

出力

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

  • Microsoft.HCS.Management.Powershell.Cmdlets.NtpInfo

    The NtpInfo object has the following properties:

    -- String Primary
    -- String[] Secondary

Example 1: Set primary and secondary NTP servers

This command sets the primary and secondary NTP servers for your device.

PS C:\> Set-HcsNtpClientServerAddress -Primary "time.contoso.com" -Secondary "secondary.contoso.com"

Example 2: Set primary NTP server

This command sets the primary NTP server for your device.

PS C:\> Set-HcsNtpClientServerAddress -Primary "time.contoso.com"

Example 3: Set secondary NTP server

This command sets the secondary NTP server for your device.

PS C:\> Set-HcsNtpClientServerAddress -Secondary "secondary.contoso.com"

関連トピック

Get-HcsNtpClientServerAddress