You can use the privileged endpoint (PEP) to update the time server for Azure Stack Hub. For information about establishing a connection to the privileged endpoint, see Access the privileged endpoint | Microsoft.
To update the time server in Azure Stack Hub, perform the following steps:
- Establish a connection to the privileged endpoint.
$pep = New-PSSession -ComputerName <IP_address_of_ERCS> -ConfigurationName PrivilegedEndpoint -Credential $cred -SessionOption (New-PSSessionOption -Culture en-US -UICulture en-US)
Enter-PSSession $pep
- To update a Windows-based time server, use the following command:
Set-AzsTimeSource -TimeServer "NEWTIMESERVERIP" -resync
- To update servers other than Windows-based time servers, use the following command:
Set-AzsTimeSource -TimeServer "NEWTIMESERVERIP,0x8" -resync