Thursday, November 16, 2017

How to get Managed Meta Data Service Information using PowerShell in SharePoint 2013/2016

If you want to get details about the managed meta data service application, there is only onw thing which you must have.

1. Central Adin URL
2. Access to Run "Windows PowerShell ISE"

There are 3 steps.

Step 1:
$site = Get-SPSite ""
Pass Central Admin Application URL as a parameter here to get site object.

Step 2:
$taxSession = new-object Microsoft.SharePoint.Taxonomy.TaxonomySession($site, $true)
To get the taxonomy Session for the Central Admin Site. Pass on Site object here.

Step 3:
This step would give you all the information about "Managed Metadata  Service" Applications which are configured on this farm as of now.

Tuesday, October 3, 2017

Useful Powershell Commands in SharePoint 2013/2016

To Get the default search index location
 $ssi = Get-SPEnterpriseSearchServiceInstance

It would show  the similar output in which the "Index Location" is the location of search indexes.

Id            : b16c2902-7546-4580-aac8-49ddc822eef5
ServerName    :
IndexLocation : C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server\Applications
State         : Ready
DesiredState  : Ready

Clearing all indexes from Search Service Application
 $ssa=Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"
Where,$True parameter denotes: Disable Alerts & Ignore Timeout error. 

Setting Global Search Center URL in Search Service Application
$ssa=Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"
$ssa.SearchCenterUrl = ""

Changing the master page on SharePoint sites with PowerShell
web = Get-SPWeb http://portal/sites/collaboration
$web.MasterUrl = "/sites/collaboration/_catalogs/masterpage/custom.master"

Start the upgrade process on a site collection
Upgrade-SPSite http://<site name>/sites/testsite -VersionUpgrade

Exports a site, list, or library.
Export-SPWeb http://site -Path "site export.cmp"

Import a site, list, or document library in SharePoint 2013
Import-SPWeb -Identity  <SiteURL>  -Path <ImportFileName>

To Convert the authentication mode of a web application
 Convert-SPWebApplication -Identity "https://<webappurl>" -To Claims -RetainPermissions [-Force]

Upgrades a deployed SharePoint Solution
 Update-SPSolution -Identity contoso_solution.wsp -LiteralPath c:\contoso_solution_v2.wsp -GACDeployment

To Install a SharePoint Hosted App in a site
$spapp=  Import-SPAppPackage -Path Path to app -Site URL -Source Source
Install-SPApp -Web URL -Identity $spapp

To Change the visual Elements of Site collection from SharePoint 2010 to SharePoint 2013
Upgrade-SPSite http://<site name>/sites/testsite

Setting up a new URL for existing site collection in web app
Set-SPSiteURL -Identity $site -Url -Zone Default

To change the ContentType Hub URL in "Managed Metadata Service" Application
Set-SPMetadataServiceApplication -Identity "NYCEDC MMS Application" -HubUri ""

To set the interval for creating ULS Log File
PS C:\Users\contoso> Set-SPDiagnosticConfig -LogCutInterval 60

To set the days interval for keeping the ULS log Files.
PS C:\Users\contoso> Set-SPDiagnosticConfig -DaysToKeepLogs 5

To create  a new Managed path under a web application
New-SPManagedPath "applications" -WebApplication

Friday, September 22, 2017

Verification Failed: URL is not a valid routing destination

Configure Send to Connections :  Error-Verification Failed: URL is not a valid routing destination

The Document Center URL is this.
http://<<Server Name>>:45518/sites/DocumentCenter

Added "/_vti_bin/officialfile.asmx" into the above URL to make "Send to URL" which need to input while configuring "Send to Connections".

Now While configuring a "Send to connections" in "general Application Settings" on Central Admin of SharePoint 2013, 

 To remove this error you have to go to "DocumentCenter" Web Application mentioned in above URL Choose "Site Actions" | "Site Settings" | "Manage Site Features".

Activate "Content Organizer" Feature. After activating verify that the feature was really enabled. Under "Site Administration" there would be "Content Organizer Settings" menu entry should be there.

 Now Again click "Click Here to Test" in "Send to URL". Now It would show "Verification Successful".

Tuesday, May 2, 2017

Getting i:0#.w| as a prefix in emails In Nintex Workflow for sharePoint 2013

Getting i:0#.w| as a prefix in emails In Nintex Workflow for SharePoint 2013

I am using SharePoint 2013 and Nintex workflow.  When any email is received through Nintex workflow, the People names are displaying like this : i:0#.w|domain\name..

1. To fix this issue, you would need to create a "Workflow variable" of  type "Single Line of text".

2. After that add a new action of "Regular Expression" from "Insert Action" > "Operations" > "Regular Expression" before any " Send notification" Step.

3. Now Configure this "Regular Expression" Action.

The pattern which you have to use is : i:0#.w[|]

You need to specify name of "workflow variable" in "Store Result In" Section  which you created in step 1.

After that you can use the same variable in "Email Notification" Configuration Section.

 Now the full Name would be displayed of the Person.

Friday, March 17, 2017

Configuration Error : web.config ConfiSource

Everything on my end was working fine and suddenly I faced this issue while hitting my SharePoint Application. This was the below error which I was getting while hitting the app.

After going through some of the forums I got to know that one extra line has been added somehow in <appSettings> for key. When I removed this line, I was able to hit my application without any issue.

<appSettings configSource="AppSettings.config">
<add key="aspnet:UseStrictParserRegex" value="true" />

<appSettings configSource="AppSettings.config">