Saturday, September 27, 2014

Download the InfoPath form from the Form Template Library in a Site Collection

  1. Open the Form Template Library where the InfoPath form is used and click on List Settings.
  2. Click on the InfoPath Content Type.
  3. The click on Advanced Settings for that Content Type.
  4. Then Click on Edit Template link under Document Template section and then save the InfoPath form.


Powershell scripts for the Infopath Form.

Please find the list of powershell scripts for the Infopath Form.

  1. Installs an InfoPath 2013 form template on a farm: [http://technet.microsoft.com/en-us/library/ff608053(v=office.15).aspx]


Install-SPInfoPathFormTemplate [-Path] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-EnableGradualUpgrade <SwitchParameter>] [-NoWait <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

---------------EXAMPLE--------------
è Install-SPInfoPathFormTemplate -Path c:\Form.xsn

     
è "FormTemplateFirst.xsn", "FormTemplateSecond.xsn", "FormTemplateThird.xsn" | Install-SPInfoPathFormTemplate
This example installs multiple form templates on a farm

     2.   Saves InfoPath 2013 form templates on the SharePoint Central Administration Web site and .udcx files to a .cab file. [http://technet.microsoft.com/en-us/library/ff608075(v=office.15).aspx]

Export-SPInfoPathAdministrationFiles [-Path] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Identity <SPFormsServicePipeBind>] [-WhatIf [<SwitchParameter>]]

---------------EXAMPLE--------------
è Export-SPInfoPathAdministrationFiles -path d:\file.cab

This example saves all InfoPath 2013 form templates (.xsn files) and universal data connections (.udcx files) located on the SharePoint Central Administration Web site in a compressed cabinet file named file.cab



For more information on InfoPath Services cmdlets in SharePoint Server 2013.

Yammer’s Integration with Microsoft SharePoint


Yammer’s enterprise social networking solution now integrates with Microsoft® SharePoint®. With the Yammer SharePoint Web Parts, you can see your Yammer feed directly inside SharePoint, eliminating the need to toggle between SharePoint and Yammer.

Although SharePoint Server 2013 provides basic enterprise social features, Yammer provides a richer enterprise social experience.

Yammer is a best-in-class enterprise social network that brings together employees, content, conversations, and business data in a single location.

Yammer empowers employees to be more productive by enabling them to collaborate in real time across departments, geographies, and business applications. You can add Yammer functionality to your SharePoint sites by adding Yammer to the navigation bar or by using the Yammer app to embed a Yammer feed in a site.

About Yammer

Yammer comes in two varieties: Yammer Basic and Yammer Enterprise.

Yammer Basic is free and available to all users. It provides a way for employees to collaborate with other members of their organization.

Yammer Enterprise is a premium version that extends an organization’s basic Yammer network. It’s offered both as a stand-alone product and with various SharePoint Online and Office 365 plans . 

Yammer Enterprise provides additional tools and resources to help organizations set up the best possible enterprise social network.


You can choose whether to use SharePoint’s social features or Yammer. If you want to take advantage of the power of Yammer with SharePoint, you can use any of the following methods:


You can use a toggle switch to replace the Newsfeed link with a Yammer link on the top navigation bar for SharePoint. This functionality is included in Service Pack 1 (SP1) for SharePoint Server.




To take advantage of the features provided by Yammer, it's a good idea to replace the default SharePoint Server 2013 enterprise social features with equivalent Yammer features. You can remove the SharePoint Server social web parts from My Sites and team sites, and you can hide the user interface controls that provide social functionality.





The new Yammer app for SharePoint lets you embed Yammer feeds (such as the home feed, a group feed, or comment feeds) into on-premises sites to make them more social and engaging.





For Integrating Yammer Apps to SharePoint Page:

Note: Trouble in adding Yammer App in CentralAdmin :



Check this blog:

Important Link:
Yammer integration with SharePoint 2010:
Go to SharePoint Link, Click for more information.

Configure the Secure Store Service in SharePoint 2013


Microsoft SharePoint Server 2013 provides a default feature of Secure Store Service (SSS) which has replaced the Single Sign-On (SSO) service, a feature of Microsoft office SharePoint Server 2007 for the storage and mapping of credentials for use in connecting with third-party or back-end systems. Many companies have already developed an in-house credential storage system or use a solution other than Microsoft Secure Store Service (SSS).

Sequence of events occurs as follows:
  •          A SharePoint Server 2013 user accesses a data-connected object such as an Excel Services worksheet, Visio Services diagram, or PerformancePoint Services dashboard.
  •          The Business Intelligence Service Application accesses the target application specified by the object.
  •          If the user is a Member of that target application, the credentials stored in the target application are returned and the Business Intelligence Service Application impersonates the credentials while accessing the data.
  •         The data is displayed to the user within the context of the worksheet, Visio diagram, or dashboard

A Secure Store Service (SSS) is a storage area to keep all the user ids and passwords that are used mainly in SharePoint 2013/2010 service applications. To create a SSS, we need to use the following procedure:
  1. Register a managed account to SharePoint Server 2013
  2. Start Secure Store Service
  3. Create Secure Store Application
  4. Encryption of Keys
  5. Create a target application and set the credentials for the target application
  6. Enable Audit logging for Secure Store
A. Register a managed account
  1. Navigate to "CA"-> "Security"
  2. Navigate to "General Security" -> "Configure managed accounts".
  3. Navigate to "Managed Accounts" -> "Register Managed Account".
  4. In the User name box, type the name of the account.
  5. In the Password box, type the password for the account.
  6. If you want SharePoint Server 2013 to handle changing the password for the account, select the "Enable automatic password change" box and specify the password change parameters that you want to use.
  7. Click "OK".

Power shell commands

$account = "domain\username"
$credential = Get-Credential -Credential $account
New-SPManagedAccount -Credential $credential


B. Start Secure Store Service
  1. Navigate to "CA" -> "System Settings" -> "Manage services on server".
  2. Choose the server on which the service should run by clicking the Server drop-down list, and then click "Change Server".
  3. Click "Start next to Secure Store Service".

$ServiceName = "Secure Store Service"
Get-SPServiceInstance -server $env:COMPUTERNAME | where-object {$_.TypeName -eq $ServiceName} | Start-SPServiceInstance -confirm:$false > $null

  1. Navigate to "CA" -> "Application Management" -> "Manage service applications".
  2. In the Manage Service Applications page on the ribbon click "New", then click "Secure Store Service".
  3. In the Service Application Name box, type a name for the service application.
  4. In the Database Server box, type the instance of SQL Server where you want to create the Secure Store database.
  5. Select "Create new application pool" and type a name for the application pool in the text box.
  6. Select the Configurable option, and, from the drop-down list, select the account for which you created the managed account earlier.
  7. Click "OK".

Power Shell commands

$appPool = New-SPServiceApplicationPool -Name $secureStoreServiceAppPool -Account $account
$sssApp = New-SPSecureStoreServiceApplication -Name "Secure Store Service Application" -DatabaseServer "DatabaseServer" -DatabaseName "DatabaseName" -ApplicationPool $appPool -AuditingEnabled:$false
Start-Sleep -s 15
$sssAppProxy = New-SPSecureStoreServiceApplicationProxy -Name "Secure Store Service Application Proxy" -ServiceApplication $sssApp –DefaultProxyGroup
Start-Sleep -s 15


Note: Back up the database of the Secure Store Service application before generating a new key.


  1. Navigate to "CA" -> "Application Management" -> "Manage service applications".
  2. Click on the "Secure Store Service application".
  3. In the Key Management group, click "Generate New Key".
  4. On the Generate New Key page, type a pass phrase string in the Pass Phrase box, and type the same string in the Confirm Pass Phrase box. This pass phrase is used to encrypt the Secure Store database.
  5. Click "OK".
Note: The pass phrase that is entered is not stored anywhere in SharePoint. Make sure you write this down and store it in a safe place. You must have it to refresh the key, such as when you add a new application server to the server farm.
Power Shell

Update-SPSecureStoreMasterKey -ServiceApplicationProxy $sssAppProxy -Passphrase

E. Create target application and Set credential for target application

  1. Navigate to "CA" -> "Application Management" -> "Manage service applications".
  2. Click the "Secure Store Service application".
  3. In the Manage Target Applications group, click "New".
  4. In the Target Application ID box, type a unique text string.
  5. In the Display Name box, type a text string that will be used to display the identifier of the target application in the user interface.
  6. In the Contact Email box, type the e-mail address of the primary contact for this target application.
  7. Target Application Page URL:


    • Use the default page: Any web sites that use the target application to access external data will have an individual sign-up page that was added automatically. The URL of this page will be: http:/<samplesite>/_layouts/SecureStoreSetCredentials.aspx?TargetAppId=<TargetApplicationID>
  • where "<TargetApplicationID>" is the string provided in the Target Application ID box.
  • Use custom page: You provide a custom web page that lets users provide individual credentials. Provide the URL of the custom page in this field.
  • None: There is no sign-up page. Individual credentials are added only by a Secure Store Service administrator who is using the Secure Store Service application.
  1. Target Application Type: choose the target application type: Group, for group credentials, or Individual, if each user is to be mapped to a unique set of credentials on the external data source.
  2. Click "Next".
  3. Use the Specify the credential fields for your Secure Store Target Application page to configure the various fields that may be required to provide credentials to the external data source. By default, two fields are listed: Windows User Name and Windows Password.
To add an additional field for supplying credentials to the external data source, on the Specify the credential fields for your Secure Store Target Application page, click "Add Field".
  1. By default, the type of the new field is "Generic". The following field types are available:
Field
Description
Generic
Generic Values that do not fit in any of the other categories.
User Name
A user account that identifies the user.
Password
A secret word or phrase.
PIN
A personal identification number.
Key
A parameter that determines the functional output of a cryptographic algorithm or cipher.
Windows User Name
A Windows user account that identifies the user.
Windows Password
A secret word or phrase for a Windows account.
Certificate
A certificate.
Certificate Password
The password for the certificate.
  1. Specify the membership settings: Target Application Administrators Field, list all users who have access to manage the target application settings.
  2. If the target application type is group, in the Members field, list the user groups to map to a set of credentials for this target application.
  3. Click "OK".

Power Shell
$UserNameField = new-spsecurestoreapplicationfield -name "UserName" -type WindowsUserName -masked:$false
$PasswordField = new-spsecurestoreapplicationfield -name "Password" -type WindowsPassword -masked:$true
$fields = $UserNameField, $PasswordField
$targetApp = new-spsecurestoretargetapplication -Name "IntranetFarmTargetApplication" -FriendlyName "Intranet Farm Target Application" -ContactEmail "admin@domain.com" -ApplicationType Individual
$targetAppAdminAccount = New-SPClaimsPrincipal -Identity "Domain\Account" –IdentityType WindowsSamAccountName
$defaultServiceContext = Get-SPServiceContext "http://demo.com"
$ssApp = new-spsecurestoreapplication -ServiceContext $defaultServiceContext -TargetApplication $targetApp -Administrator $targetAppAdminAccount -Fields $fields
F. Enable Audit logging for Secure Store

  1. Navigate to "CA" -> "Application Management" -> "Manage service applications".
  2. Select the "Secure Store Service application".
  3. On the ribbon, click "Properties".
  4. From the Enable Audit section, click to select the "Audit log enabled" box.
  5. To change the number of days that entries will be purged from the audit log file, specify a number in days in the "Days Until Purge" field. The default value is 30 days.
  6. Click "OK".

For more Information:
How to configure SSS in SP2013: http://technet.microsoft.com/en-us/library/ee806866(v=office.15).aspx

Login as a different user in sharepoint 2013

In SharePoint 2013, we don't have an option to login as a different user as in Sharepoint 2010. So we have to use the following link to sign in as a different user.

http://<SITE URL>/_layouts/closeConnection.aspx?loginasanotheruser=true

Upgrade Site collection using powershell script

Upgrade-SPSite -identity http://test2013 -VersionUpgrade

Update the web part property using powershell script

Sometimes you need to change the properties of a Web Part without browsing to the page itself and set it. There could be numerous reasons as to why you would want or need to do this. A while back I created a really simple redirect web part for one of my clients. It had two custom properties, EnableRedirect and Url. If EnableRedirect was true, it would redirect the user to the specified Url. Obviously, if you want to change either of these properties while the EnableRedirect is true, that's going to be a problem.
Fast forward and the redirect web parts need to be changed and/or disabled. Obviously we can't navigate to the page and just change it, because the page will redirect you. But it can be done relatively easy using PowerShell.
Start out with opening the site and getting the file we want to work on. Also note that the site I'm working on is a publishing site, which is why we need to check out, check in and publish the page we want to change the web part on.

$site = new-object Microsoft.SharePoint.SPSite("http://sharepointsite")$web = $site.OpenWeb("RandomSite/AnotherSite/")$page = $web.GetFile("Pages/default.aspx")$page.CheckOut()$wpm = $web.GetLimitedWebPartManager("Pages/default.aspx", [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)

From here we can look up and see which web parts are currently active on the page.
$wpm.WebParts | ft

There are two web parts on this page currently, and we want to change the second one. Let's finish of the script by doing this:
$wp = $wpm.WebParts[1]$wp.EnableRedirect = $false$wp.Url = "http://www.google.com"$wpm.SaveChanges($wp)$page.CheckIn("Test")$page.Publish("Test")$web.Close()$site.Close()

And that's it. The redirect is turned off, and it's been changed to point to Google. It's not a work of art, and a little cruddier than what I usually like to make my scripts, but I needed something quick and dirty to do the job. And that's what this does.