Thursday, 11 August 2016

Deprecated or removed features from SharePoint Server 2016

The following information provides a summary of the deprecated or removed features from SharePoint Server 2016 release.


STSADM.exe:

The Stsadm command-line tool has been deprecated and users are recommended to use Windows PowerShell for performing administrative command-line tasks. But it is still included to support compatibility with previous product versions.

Support for SQL Express:

SQL Express is not supported for SharePoint 2016. When you install SharePoint 2013 on a single server that has built-in database by using default settings, it will install MS Sql Server 2008 R2 SP1 Express edition and SharePoint product.

SharePoint Foundation:

SharePoint Foundation is free for on-premises deployments.It is no longer available in the SharePoint Server 2016 release.

Standalone Install Mode:

SharePoint Server 2016 doesn't support the standalone install option and it is no longer available in the setup. During installation you can use MinRole to choose the server role. The Single Server Farm option where everything is installed on the same computer and you must install SQL Server yourself before running the SharePoint Server 2016 farm configuration wizard.

Excel Services in SharePoint:

Excel Services and its associated business intelligence capabilities are no longer hosted on SharePoint Server 2016. Excel Services functionality is now part of Excel Online in Office Online Server (this is the next version of Office Web Apps Server), and SharePoint users can use the services from there(OOS). 

Trusted data providers, file locations, data connection libraries, Unattended service account are some of the removed features.

Tags and Notes:

The Tags and Notes feature is deprecated in SharePoint Server 2016 and users cannot create new tags and notes or access existing ones. The SharePoint Administrator can archive all existing tags and notes by using the Export-SPTagsAndNotesData cmdlet.

ForeFront Identity Manager client (FIM):

Earlier versions of SharePoint used ForeFront Identity Manager client (FIM) to synchronize between Active Directory and SharePoint. SharePoint Server 2016 no longer uses FIM as the synchronization client. The default process is Active Directory Import. You can also use any synchronization tool such as Microsoft Identity Manager 2016,

SharePoint BI capabilities:

SharePoint 2016 requires updated versions. The SQL Server 2014 Power Pivot and Power View add-ins for SharePoint 2016 cannot be deployed or used in SharePoint Server 2016. Business Intelligence features like Power Pivot Gallery, Scheduled Data Refresh, Power View reports, Power Pivot Management Dashboard are avaialbe with SharePoint server 2016 if you use SQL Server 2016 CTP 3.1.

New version will not be released for SharePoint Designer,InfoPath. Older version(2013) will be there and supported.

Thursday, 4 August 2016

SharePoint Server 2016 Hardware and Software Requirements

SharePoint 2016 has been released on 14 March 2016 with new features and updates to existing features.

I have completed a Single-Server installation of SharePoint Server 2016 with Database server on a separate machine. Below are the hardware & software requirements and Installation prerequisites.


Hardware Requirements:

Scenario
Deployment type
Processor
RAM
Hard disk
Database server running a single SQL instance
Development
64-bit, 4 cores
12-16 GB
80GB for system drive
100GB for second drive
Database server running a single SQL instance
UAT/Production
64-bit, 4 cores
16-24 GB
80GB for system drive
100GB for second drive
Web server or application server in a three-tier farm
Development
64-bit, 4 cores
8-12 GB
80GB for system drive
100GB for second drive
Web server or application server in a three-tier farm
UAT/Production
64-bit, 4 cores
16-24 GB
80GB for system drive
100GB for second drive

Software Requirements:

Server
OS
Installation media
Download
Operating System
Windows Server 2012 R2 – with latest updates
   Link
Database Server
Windows Server 2012 R2 – with latest updates
SQL Server 2014 SP1 – x64
Note: SQL Server Express is not supported.
   Link
SharePoint Server
Windows Server 2012 R2 – with latest updates
SharePoint Server 2016 Preview
   Link


Prerequisites for SharePoint 2016:

  • Web Server (IIS) role
  • Application Server role
  • Microsoft SQL Server 2012 Native Client
  • Microsoft ODBC Driver 11 for SQL Server
  • Microsoft Sync Framework Runtime v1.0 SP1 (x64)
  • Windows Server AppFabric
  • Microsoft Identity Extension
  • Active Directory Rights Management Services Client 2.1
  • Microsoft WCF Data Services 5.6
  • Microsoft .NET Framework version 4.6
  • Cumulative Update Package 7 for Microsoft AppFabric 1.1 for Windows Server (KB 3092423)
  • Visual C++ Redistributable Package for Visual Studio 2012
  • Visual C++ Redistributable Package for Visual Studio 2015

Thursday, 24 March 2016

Intermittent email failure in SharePoint 2010 Workflow

Recently I had a production Workflow issue. Everything works in Dev, QA & UAT but not in production.

In our case, for the site content type we have enabled the retention from information management policy settings. And declared record to start the custom workflow to manage the retention on records.

Problem:
The problem we are having is that we use Information Management Policy timerjob to start the workflow asynchronously and its working for some time and suddenly emails are missing for new file uploads, also not creating the workflow history.

Root Cause:
I was reviewing and comparing the configuration of all the individual SharePoint servers (We have 4 web servers and 4 application servers in this landscape) and I found one inconsistency. One of the component, SharePoint Foundation Workflow Timer Service (SFTS) is enabled on 6 servers and it is disabled on the other two servers. 

Based on my research(see below) this component should be disabled on application servers. When we had 2 web servers and 2 app servers, this service is disabled on application servers correctly. After some time as part of new application Go live, we added 2 additional web servers and 2 application servers to this farm and this service was not disabled on these two additional application servers. To my knowledge the first notification failure happened after we added additional capacity. After stopping this service in newly added 2 APP servers ,the workflow works perfectly.

We have observed workflow behavior for couple of weeks and we haven't seen any issue so far due to stopping the Microsoft SharePoint Foundation Workflow Timer service on app Servers.

There is no error message in the log files that indicates that this is the root cause, but based on various technical forums this is the root cause for intermittent workflow issues.

Summary of the solution:

Analysis:
During processing of delay activity by workflow, Information management policy timer job is scheduled on the servers where the SharePoint Foundation Workflow Timer Service(SFTS) is running. To execute the SFTS job, server(WFE/APP) will try to process the workflow execution and this requires workflow assembly to be available on the server.

So workflow assembly is missing from the server, HOW ?

This service(SFTS) is automatically configured to run on all Web servers in the farm and it is recommended to run on the Web server according to the Topologies for SharePoint Server 2010.

When we deploy the WSP solution, workflow assemblies will be copied to those servers which has WFE role(SharePoint foundation web applicant service=True) see below link.

In my case SFTS service is running on 2 Application servers where WFE role is not running. So to fix the issue I have stopped the SFTS service on App servers.

Tuesday, 15 March 2016

Retrieve Credentials from Secure Store Service

What is Secure Store Service ?

The Secure Store Service Application (SSS) was added in SharePoint 2010 as a replacement for 2007’s Single Sign On feature.

Secure Store Service is a shared service that provides storage and mapping of credentials such as account names and passwords. It enables you to securely store data that provides credentials required for connecting to external systems and associating those credentials to a specific identity or group of identities.

It is commonly used for access to data for Business Connectivity Services, Excel Service Applications and Visio Service Applications.

For example, if a user named JOHN has one account on the SharePoint server and another in a CRM application, the Secure Store mechanism enables his CRM credentials to be stored with his user profile in SharePoint Server. As a result, if he uses a Microsoft Business Connectivity Services (BCS) solution in SharePoint Server to obtain data from the CRM application, SharePoint Server looks up the Secure Store Service database on the server and provides his credentials to CRM. In in this manner, JOHN will automatically logs on to the CRM application without having to log onto the CRM application separately.

Don't remember Credentials ?
There is no way to retrieve the credentials from Central Admin that you set up in one of your Secure Store Application entries.

Just run the script below on your SharePoint server and this will list all Secure Store User Names and Passwords.

$serviceCntx = Get-SPServiceContext -Site http://SiteURL

$sssProvider = New-Object Microsoft.Office.SecureStoreService.Server.SecureStoreProvider
$sssProvider.Context = $serviceCntx

$marshal = [System.Runtime.InteropServices.Marshal]

try
{
    $applications = $sssProvider.GetTargetApplications()
    foreach ($application in $applications)
    {
       Write-Output "`n$($application.Name)"
        Write-Output "$('-'*80)"
        try
        {
            $sssCreds = $sssProvider.GetCredentials($application.Name)
            foreach ($sssCred in $sssCreds)
            {
                $ptr = $marshal::SecureStringToBSTR($sssCred.Credential)
                $str = $marshal::PtrToStringBSTR($ptr)

                Write-Output "$($sssCred.CredentialType): $($str)"
            }
        }
        catch
        {
            Write-Output "Error getting credentials!"
        }
        Write-Output "$('-'*80)"
    }
}
catch
{
    Write-Output "Error getting Target Applications."
}

$marshal::ZeroFreeBSTR($ptr)

Refer the below link to Create, Configure, Consume SharePoint 2010 Secure Store in Business Connectivity Services

Monday, 14 March 2016

PowerShell Script for Password encrypt, decrypt using secure key

Create/generate a key beforehand in separate script:

Advanced Encryption Standard(AES) encryption only supports 128-bit (16 bytes), 192-bit (24 bytes) or 256-bit key (32 bytes) lengths, so we’ll need to create or generate an appropriate key. Let’s create a byte array of ascending numbers. We will use a 192-bit key, so we’ll need a 24-byte array. 

Generate Secure Key :

generate_securekey.ps1
param
(
 [parameter(Mandatory=$true, Position=0)]
 [string] $File = $null,
 [parameter(Mandatory=$false, Position=1)]
 [string] $length = 24
)
$Key = New-Object Byte[] $length
[Security.Cryptography.RNGCryptoServiceProvider]::Create().GetBytes($Key)
$Key | out-file $File
Once you generate the secure key, you will be able to use the key file to encrypt or decrypt the password from any machine.

Encrypt Password using key:

encrypt_password.ps1
param
(
 [parameter(Mandatory=$true, Position=0)]
 [string] $PW = $null,
 [parameter(Mandatory=$true, Position=1)]
 [string] $SecureKeyFile = $null
)
$Key = Get-Content $SecureKeyFile
$Encrypted_PW = $PW | ConvertTo-SecureString -AsPlainText -Force
Write-Host "Encrypted password with $SecureKeyFile" -ForegroundColor "Cyan"
Write-Host "******************************************" -Foregroundcolor "Yellow"
$Encrypted_PW | ConvertFrom-SecureString -key $Key | Write-Output
Write-Host "******************************************" -Foregroundcolor "Yellow"
Decrypt Password using key:

decrypt_password.ps1
param
(
 [parameter(Mandatory=$true, Position=0)]
 [string] $EncryptedPW = $null,
 [parameter(Mandatory=$true, Position=1)]
 [string] $SecureKeyFile = $null
)
$Key = Get-Content $SecureKeyFile
$account = $env:userdomain + "\" + $env:username
$clearpw = (New-Object -TypeName System.Management.Automation.PSCredential -Argumentlist $account, (ConvertTo-SecureString -String $encryptedPW -key $key)).GetNetworkCredential().Password;
Write-Host "Password decrypted with $SecureKeyFile" -ForegroundColor "Cyan"
Write-Host "******************************************" -Foregroundcolor "Yellow"
$clearpw | write-Output
Write-Host "******************************************" -Foregroundcolor "Yellow"

Thursday, 5 December 2013

Update the "Created By" "Modified By" and "Created" Columns in ShrePoint list using PowerShell

As a developer or administrator working with SharePoint, sometimes it is necessary to modify the 'Created' 'Created By' 'Modified' 'Modified By' columns where we can not modify in UI.

But using PowerShell easily you can modify these columns.
// Add only if you use windows PowerShell. 
Add-PSSnapin Microsoft.SharePoint.Powershell 

//Get a new object called $web to pick site 
$web=Get-SPWeb "URL" 

//Get a new object called $list to pick list
$list=$web.Lists["List Name"] 
Now you need to get the particular List Item ID, where you want to modify the columns.
//Get a new object called $item to pick Item
$item = $list.GetItemById("3214")
Now you need to get the columns names which you want to update. You can get the user ID of the user using the "EnsureUser()" method of "web" in PowerShell command.
$replacedUser =$web.EnsureUser("domainName\Account")
Note: The Author and Editor fields, these are the 'Created by' and 'Modified by' fields.
Author = Created by
Editor = Modified by

// Add only if you use windows PowerShell. 
Add-PSSnapin Microsoft.SharePoint.Powershell 
//Get a new object called $web to pick site 
$web=Get-SPWeb "URL" 
//Get a new object called $list to pick list
$list=$web.Lists["List Name"]
//Get a new object called $item to pick Item
$item = $list.GetItemById(3214)
$replacedUser =$web.EnsureUser("domainName\Account")
$item["Created"] = "25/2/2013 00:00:00"
$item["Modified"] = "25/8/2013 00:00:00"
$item["Author"] = $replacedUser
$item["Editor"] = $replacedUser
$item.Update();