Set-HcsNtpClientServerAddress
Set-HcsNtpClientServerAddress
Sets the NTP URLs for this device.
Syntax
Parameter Set: Default
Set-HcsNtpClientServerAddress [-Primary <String> ] [-Secondary <String[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detaillierte Beschreibung
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.
Parameter
-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.
Aliasse |
Keiner |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
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.
Aliasse |
Keiner |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-Confirm
Sie werden vor dem Ausführen des Cmdlets zur Bestätigung aufgefordert.
Erforderlich? |
false |
Position? |
named |
Standardwert |
falsch |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Erforderlich? |
false |
Position? |
named |
Standardwert |
falsch |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
<CommonParameters>
Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Eingaben
Der Eingabetyp ist der Typ der Objekte, die über die Pipeline an das Cmdlet übergeben werden können.
Ausgaben
Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.
Microsoft.HCS.Management.Powershell.Cmdlets.NtpInfo
The NtpInfo object has the following properties:
-- String Primary
-- String[] Secondary
Beispiele
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"