Set-HcsNtpClientServerAddress
Set-HcsNtpClientServerAddress
Sets the NTP URLs for this device.
Sintaxis
Parameter Set: Default
Set-HcsNtpClientServerAddress [-Primary <String> ] [-Secondary <String[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Descripción detallada
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.
Parámetros
-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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
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.
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.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Microsoft.HCS.Management.Powershell.Cmdlets.NtpInfo
The NtpInfo object has the following properties:
-- String Primary
-- String[] Secondary
Ejemplos
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"