Thursday, January 8, 2015

Save site as template -SharePoint 2013

A small script to save as template for SharePoint 2013 sites. This script also handle publishing feature enabled sites. I wrote this script to save some time. Instead of click few places , just run the script. :)


param(
    [string] $url = $(throw "No URL! Usage: Save-SP13Template.ps1 [webURL] [FileName]"),
[string] $templateName = $(throw "No Template Name! Usage: Save-SP13Template.ps1 [webURL] [TemplateName]")
)

#-------------------------------------------------------------


Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
function Save-SiteTemplate {

$Web=Get-SPWeb $url
$Web.SaveSiteAsTemplateEnabled = $true
$Web.Update()
$fileName =$templateName +".wsp"
$Web.SaveAsTemplate($fileName,$templateName,"Template Description",1)
}

Save-SiteTemplate

Office Integration with SharePoint 2010 in a virtualized environment




1 Office Integration required settings.

Office integration with SharePoint in a virtualized environment required few settings in the client computer. The settings natively configured by the office product such as MS word and excel. However, in a virtualized environment it may not exactly configured as in a normal client computer. Following settings can be verified if any issue with your office integration.

1.1 MS Office Trusted location

In office products such as word and excel, add the trusted locations.

http://*.yourcompany.com
https://*.yourcompany.com

1.2 AuthForwardServerList.

Set the SharePoint URLs to AuthForwardServerList.

1. Using RegEdit, navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
2. Add a New Multi-String Vlaue (Edit > New).
3. Name it AuthForwardServerList and press Enter.
4. Set the value (Edit > Modify) to your FQDN. Or you can do something more comprehensive like http://*.yourcompany.com
https://*.yourcompany.com

1.3 Portal URL
This may change depend on the office version/Windows Client you are using. Pls translate to equivalent for the client windows OS and office suite.
HKEY_CURRENT_USER\Software\AppDataLow\Microsoft\Office\14.0\Common\Portal


1.4 SharePoint Shortcuts
SharePoint Shortcuts store in following location.
C:\Users\%user% \SharePoint Sites
Ex: C:\Users\sutha.thavaratnaraja\SharePoint Sites
If you use a virtualized (ex citirx) the profile location similar to this except “C:\users”
1.5 Outlook .pst File locaiton
Sharepoint .pst files store in following location.
C:\Users\%user% \AppData\Local\Microsoft\Outlook
Example:
C:\Users\myFirstName.LastName \AppData\Local\Microsoft\Outlook


We may need to configure the virtual environment to giving similar mechanism to store this file, so that outlook can connect SharePoint.