Friday, March 10, 2017

SharePoint 2013 TIP: How to create and remove a Managed Metadata Service Application

Introduction

This posting is a stub that collates ongoing notes on creating, updating and removing a Managed Metadata service application.  Removing the managed metadata service application also includes removing the managed metadata database and application pool (if one was created specifically for this service).

Creating the service using PowerShell

New-SPServiceApplicationPool -Name AppServicesAppPool -Account "DOMAIN\spFarm" New-SPMetadataServiceApplication -Name "Managed Metadata Service Application" -ApplicationPool "AppServicesAppPool" -DatabaseName "ManagedMetadata" New-SPMetadataServiceApplicationProxy -Name "Managed Metadata Service Application Proxy" -ServiceApplication "Managed Metadata Service Application"

References

  • Whenever possible, I prefer using PowerShell to administer SharePoint - particularly when creating service applications.  

SharePoint 2013: create Search service for single-server dev farm

Introduction

This procedure deploys a Search Service Application to a single-server SharePoint Server 2013 Enterprise farm primarily used by a SharePoint developer who also needs Search capability. The server has just one drive, the system drive.   It also leaves the crawl default, or the Search service account, but you can always change this later through Central Administration.

Procedure

To get started, you first need to collate the values for some standard parameters:
Parameter ValueComment
$svr devserver name
$SvcAcct DOMAIN\spSearchSearch service identity
$SSAName Search ServiceSearch service name
$DBPrefix Search_search service database name prefix
$IndexLocation C:\SSAIndexpath to the location of the index
Once you have these constants defined, open an elevated SharePoint Shell and execute the following script:
$Svr = "dev" $SvcAcct = DOMAIN\spSearch $AdminAcct = Get-SPManagedAccount -Identity $SvcAcct $QueryAcct = $AdminAcct $SSAName = "Search Service" $DBPrefix = "Search_" $IndexLocation = "C:\SSAIndex" $SSISvr = get-SPServiceInstance -server $Svr |?{$_.TypeName -eq "SharePoint Server Search"} $err = $null Start-SPEnterpriseSearchServiceInstance -Identity $SSISvr $AdminAppPool = new-SPServiceApplicationPool -name $SSAName"_AppPool" -account $AdminAcct  $QueryAppPool = $AdminAppPool $SearchApp = New-SPEnterpriseSearchServiceApplication -Name $SSAName -applicationpool $AdminAppPool -databasename $DBPrefix"_AdminDB" $SSAProxy = new-spenterprisesearchserviceapplicationproxy -name $SSAName" ApplicationProxy" -SearchApplication $SearchApp $SearchTopology = $SearchApp.ActiveTopology.Clone() New-SPEnterpriseSearchAdminComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology New-SPEnterpriseSearchContentProcessingComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology New-SPEnterpriseSearchCrawlComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology New-SPEnterpriseSearchIndexComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology -RootDirectory $IndexLocation New-SPEnterpriseSearchQueryProcessingComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology $SearchTopology.Activate()

That's it. You're done. Now you can fire up Central Administration, navigate to Farm Search Administration and see everything.

References

Notes

  • If you need to remove the Search service application, be sure to review the reference on completely removing it as it provides helpful steps to ensure you get all of it off the server before trying to re-install it again.

Wednesday, March 8, 2017

SharePoint 2013 TIP: How to implement multi-level flyouts in global navigation

The default depth for multi-level flyouts in global navigation is 2; in other words, you can configure a single dropdown list of menu options for each menu and on flyout for each of those menu options:
MENU1
  Menu11
  Menu12
    menu121
    menu122
    menu123
MENU2
  Menu21
  Menu22
MENU3
  Menu31
  Menu32
The depth of the flyouts that you can have is set by the MaximumDynamicDisplayLevels property of the SharePoint AspMenu control, which you'll find in the master page.  This property is set to "2" by default.  To be able to have a flyout on one of these flyouts, you need to increase this property from "2" to "3"; and that enables you to create global navigation menus like so:
MENU1
  Menu11
  Menu12
    menu121
    menu122
      menu1221
      menu1222
      menu1223
    menu123
MENU2
  Menu21
  Menu22
MENU3
  Menu31
  Menu32

References

  • The tag will look something like this:
    <SharePoint:AspMenu ID="TopNavigationMenu" Runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="&lt;%$Resources:wss,navigation_accesskey%&gt;" UseSimpleRendering="true" UseSeparateCss="false" Orientation="Horizontal" StaticDisplayLevels="2" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="2" SkipLinkText="" />
  • The above TIP presumes the use of Managed navigation.  See reference 4 for details.

SharePoint 2013 TIP: How to quickly deploy a State service application

The State service is one of the easiest to instantiate and requires just a few lines of PowerShell - you can even do it in one line if you want. This service application stores temporary data in the State database for use by other service applications and components, such as the Chart web part, some Search service crawl reports, and others.
$sa = New-SPStateServiceApplication -Name "State Service Application" New-SPStateServiceDatabase -Name "State" -ServiceApplication $sa New-SPStateServiceApplicationProxy -Name "State Service Application Proxy" -ServiceApplication $sa -DefaultProxyGroup

References

Notes

  • "The chart cannot be rendered.  This may be due to a misconfiguration of the Microsoft SharePoint Server State Service." You'll see this error if you try to view the Search Service Crawl Rate crawl report and don't have a State service deployed yet to your farm. Just create a new State service application and this problem goes away immediately.
  • tbd