Blog Archives

SharePoint 2016 – TCP/IP Ports

Hey Everyone!!!

Today i will show you the full list of TCP/IP Ports that you must consideration on your SharePoint 2016 Farm.

Full list of ports used by SharePoint 2016:

Protocol
Port
Usage
Comment
TCP 80 http Client to SharePoint web server traffic
(SharePoint – Office Online Server/Office Web Apps communication)
TCP 443 https/ssl Encrypted client to SharePoint web server traffic
(Encrypted SharePoint – Office Online Server/Office Web Apps communication)
TCP 1433 SQL Server default communication port. May be configured to use custom port for increased security
UDP 1434 SQL Server default port used to establish connection May be configured to use custom port for increased security
TCP 445 SQL Server using named pipes When SQL Server is configured to listen for incoming client connections by using named pipes over a NetBIOS session, SQL Server communicates over TCP port 445
TCP 25 SMTP for e-mail integration Cannot in 2016 be configured (Use SMTP ports other than the default (25).)
TCP 16500-16519 Ports used by the search index component Intra-farm only
Inbound rule Added to Windows firewall by SharePoint. (GPO may override this change)
TCP 22233-22236 Ports required for the AppFabric Caching Service Used by the Distributed Cache…
TCP 808 Search – Query processing component
Windows Communication Foundation communication
Search – Query processing component
(WCF)
TCP 32843 Communication between Web servers and service applications http (default) To use custom port, see references section
Inbound rule Added to Windows firewall by SharePoint
TCP 32844 Communication between Web servers and service applications https
Inbound rule Added to Windows firewall by SharePoint
TCP 32845 net.tcp binding: TCP 32845 (only if a third party has implemented this option for a service application)  Custom Service Applications
Inbound rule Added to Windows firewall by SharePoint
TCP 32846 Microsoft SharePoint Foundation User Code Service (for sandbox solutions)  Inbound on all Web Servers
Inbound rule Added to Windows firewall by SharePoint
Outbound on all Web and App servers with service enabled.
TCP 636 User Profile Synchronization Service/Active Directory Import Synchronizing profiles between SharePoint 2016 and AD using SLDAP (Secure LDAP)
TCP 5725 User Profile Synchronization Service Synchronizing profiles between SharePoint 2016 and Active Directory Domain Services (AD DS)
TCP + UDP 389 User Profile Synchronization Service LDAP Service
TCP + UDP 88 User Profile Synchronization Service Kerberos
TCP + UDP 53 User Profile Synchronization Service DNS
UDP 464 User Profile Service Kerberos change password
TCP 809 Office Online Server/Office Web Apps Office Online Server/Office Web Apps intra-farm communication.

 

Reference Links:

Security for SharePoint Server 2016
Set-SPServiceHostConfig
TCP/IP Communications (Windows Server AppFabric Caching)

Thanks

Fábio Carvalho
SharePoint Consultant
|create|it|

Advertisements

Failed to Register SharePoint Services in PSConfig (Fix)

Unfortunately this happens on Stand Alone servers more often than you would think. Good news is that there is a really quick way to fix this.

Resultado de imagem para Failed to Register SharePoint Services in PSConfig sharepoint 2016

Open up Regedit and browse to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15\LauncherSettings 
Create the following key:Type: DWORD
Name: AcknowledgedRunningOnAppServer 
Value: 1

Then do the same thin in the following registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15\LoadBalancerSettings

No need to restart, just rerun PSConfig and you should be good to go.

Original: http://sharepoint-community.net/profiles/blogs/failed-to-register-sharepoint-services-in-psconfig

New Features in Windows Server 2016

Download Windows Server 2016

Change file Dependencies Limit in Master Page – the limit has exceeded.

If you  are getting following error:

The page ‘/_catalogs/masterpage/mymasterpage.master’ allows a limit of 11 direct dependencies, and the limit has exceeded.

You have 10 DirectFileDependencies on web.config, so you need change this value.

<SafeMode MaxControls=”200″ CallStack=”false” DirectFileDependencies=”10″ TotalFileDependencies=”50″ AllowPageLevelTrace=”false”>

Solution: 

<SafeMode MaxControls=”200″ CallStack=”false” DirectFileDependencies=”20” TotalFileDependencies=”50″ AllowPageLevelTrace=”false”>

MaxControls: This attribute limits the no of controls on the page. Default value 200.
DirectFileDependencies: This attribute limits the no of user controls added in master pages. Default value 10.
TotalFileDependencies: This attribute limits the no of controls added on the page (including Master page and page layout). Default value 50.

Actually doing changes in these value is not the best practice, but solved this issues!!!

Thanks

Script to Change Page Layout on Publishing Pages – PowerShell

If you want change pagelayouts, you can use this usefull script.

$spWeb = Get-SPWeb("http://fcsharepoint")
$pWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($spWeb)
$pSite = New-Object Microsoft.SharePoint.Publishing.PublishingSite($spWeb.Site);

$siteLayouts = $pSite.GetPageLayouts($false)
$myLayout = $siteLayouts["/_catalogs/masterpage/fcPageLayout.aspx"]
$query = New-Object Microsoft.SharePoint.SPQuery
$query.ViewAttributes = "Scope='RecursiveAll'"

$pages = $pWeb.GetPublishingPages($query)

foreach ($page in $pages)
{
     if ($page.ContentType.Name -eq "Folder")
     {
         continue
     } 
     $page.Layout = $myLayout
     $page.update()
     $page.ListItem.File.Publish("")
     $page.ListItem.File.Approve("")
}
$spWeb.Dispose()

Enable STS Session Cookie & LogonTokenCacheExpirationWindow in SharePoint

Enable STS Session Cookie

$sts = Get-SPSecurityTokenServiceConfig
$sts.UseSessionCookies = $true
$sts.Update()

LogonTokenCacheExpirationWindow for the SharePoint STS is 10 minutes. The relying party by default it sets the token lifetime in ADFS to be 2 minutes.

LogonTokenCacheExpirationWindow in SharePoint

$sts = Get-SPSecurityTokenServiceConfig
$sts.LogonTokenCacheExpirationWindow = (New-TimeSpan minutes 1)
$sts.Update()

Then do an IISRESET

Add a Custom Actions on Site Settings Menu – SharePoint

If you want to add a custom Action on Site Settings menu, you just need follow the steps bellow.

On your solution, add an Empty Element -> (Add > New Item > Empty Element)

When you add an Empty Element, a xml file was created too, you just need copy-past the following code to Elements.xml file and save:

(green letters represents what you need to change)

Code Example:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomActionGroup
  Id="MyConfigurationGroup"
  Location="Microsoft.SharePoint.SiteSettings"
  Title="Menu of Actions - FcSharePoint" 
  Sequence="10"
  ImageUrl="/_layouts/Images/STSICON.GIF"/>

<CustomAction
  Id="MyConfigPage1"
  GroupId="MyConfigurationGroup"
  Location="Microsoft.SharePoint.SiteSettings"
  Title="Action FcSharePoint"    
  Rights="MangeWeb"
  ImageUrl="/_layouts/Images/STSICON.GIF">
<UrlAction Url="~site/_layouts/Pages/Test.aspx"/> 
</CustomAction>
</Elements>

CustomAction Element

<CustomAction
  ContentTypeId = "Text"
  ControlAssembly = "Text"
  ControlClass = "Text"
  ControlSrc = "Text"
  Description = "Text"
  GroupId = "Text"
  Id = "Text"
  ImageUrl = "Text"
  Location = "Text"
  RegistrationId = "Text"
  RegistrationType = "Text"
  RequireSiteAdministrator = "TRUE" | "FALSE"
  Rights = "Text"
  Sequence = "Integer"
  ShowInLists = "TRUE" | "FALSE"
  ShowInReadOnlyContentTypes = "TRUE" | "FALSE"
  ShowInSealedContentTypes = "TRUE" | "FALSE"
  Title = "Text">
</CustomAction>

Add users to SharePoint Group using PowerShell

You can Add user on SharePoint’s Group using Powershell, to do that you just need to know two things:

  • User domain name -> domain\User
  • Group’s name – you can check this on the following post – http://wp.me/p4Hadm-45

Then you can run the following powershell script:

$site=get-spsite http://fcsharepoint

$web=$site.RootWeb

$web.SiteGroups |select name

$user=$web.EnsureUser("LOCALDOMAIN\FCShareUser")

$group=$web.SiteGroups["FCSharepoint Members"]

$group.AddUser($user)

List all Groups and all Users SharePoint – PowerShell

The scrit below list all Groups and all Users at sitecollection of SharePoint.

$site = Get-SPSite http://fcsharepoint

$groups = $site.RootWeb.sitegroups

foreach ($grp in $groups)
{
    "Group: " + $grp.name;
     foreach ($user in $grp.users)
     {
         " User: " + $user.name
     }
}
$site.Dispose()

Listing / Installing / Uninstalling / Enabling / Disabling Features on Farm, Site Collection and Site – Sharepoint Powershell

Listing Features

Show all the features on the farm:

 Get-SPFeature | Sort -Property DisplayName

Show all the features on the Farm grouped by scope in a table use:

 Get-SPFeature | Sort -Property DisplayName, Scope | FT -GroupBy Scope DisplayName

Show all features for a Web Application:

 Get-SPFeature -WebApplication http://webapplication

Show all features for a Site Collection:

 Get-SPFeature -Site http://sitecollection

Show all features for a Site:

 Get-SPFeature -Web http://siteurl

Enabling and Disabling Features

To disable and enable features:

Disable-SPFeature

 Disable-SPFeature -Identity "NameOfFeature" -URL http://url

Enable-SPFeature

 Enable-SPFeature -Identity "NameOfFeature" -URL http://url

Installing and Uninstalling Features

To install and uninstalling a feature you need to specify the name of the folder that your feature contains:

Install-SPFeature
 Install-SPFeature "FeatureFolderName"
Uninstall-SPFeature
Uninstall-SPFeature "FeatureFolderName"