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 "http://tailspin.com:21332/"
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:
$taxSession.TermStores
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



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


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 201

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 http://contoso.sharepoint.com -Zone Default


To change the ContentType Hub URL in "Managed Metadata Service" Application

Set-SPMetadataServiceApplication -Identity "NYCEDC MMS Application" -HubUri "http://contoso.com:45518/sites/ContentTypeHub/"


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


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.


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


Correct
<appSettings configSource="AppSettings.config">
</appSettings>