Tuesday, October 3, 2017

Powershell Commands



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

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.