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

To create  a new Managed path under a web application
New-SPManagedPath "applications" -WebApplication http://contoso.com:44495


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".