To change the sharepoint CA port

Set-SPCentralAdministration -Port <port number>

to fix the error:

Got this error: Failed to register SharePoint services.  An exception of type System.UriFormatException was thrown.  Additional exception information: Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed.
System.UriFormatException: Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at System.Uri.CreateUri(Uri baseUri, String relativeUri, Boolean dontEscape)
   at Microsoft.SharePoint.Administration.SPSiteCollection.get_Item(String strSiteName)
   at 
原文地址:https://www.cnblogs.com/zyip/p/3927601.html