Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Wednesday, January 10, 2018

SharePoint Online Site Design

If you were thinking of creating templates in Office 365 for SharePoint online, it has staring to become available in Office 365 which is still in preview.
Is this SharePoint PnP Site Provisioning?
No. This is an alternate way of creating templates and creating new instances of sites.

What is site design?
It provides you with reusable lists, pages, layouts, themes and custom actions. In another way it’s a predefined template to create new instances of their sites. The template is collection of actions specified in a JSON script. In execution of the script, each item is actioned.
Once the JSON Script is designed, it must be registered in SharePoint. Then the template is will be available to the users to create new instances.

Prerequisites
Make sure you have installed SharePoint Online Management Shell and you know how to connect to SharePoint Online using PowerShell.

JSON schema
As I mentioned earlier, site design is a set of actions where each action is specified by a verb value. Some actions do have sub actions based on the complexity. Refer to the JSON schema reference. Shown below is the base structure of the JSON script.

 {  
   "$schema": "schema.json",  
     "actions": [  
       ...  
       <your actions goes here>  
       ...  
     ],  
     "bindata": { },  
     "version": 1  
 };  

I will create one List called "Customer Tracking List". List template reference and Field type reference will be helpful to select the base types. You can see the main action "createSPList" and the sub actions "SetDescription" and "addSPField".

 $site_script = @'  
 {  
  "$schema": "schema.json",  
    "actions": [  
      {  
        "verb": "createSPList",  
        "listName": "Customer Tracking",  
        "templateType": 100,  
        "subactions": [  
          {  
            "verb": "SetDescription",  
            "description": "List of Customers and Orders"  
          },  
          {  
            "verb": "addSPField",  
            "fieldType": "Text",  
            "displayName": "Customer Name",  
            "isRequired": false,  
            "addToDefaultView": true  
          },  
          {  
            "verb": "addSPField",  
            "fieldType": "Number",  
            "displayName": "Requisition Total",  
            "addToDefaultView": true,  
            "isRequired": true  
          },  
          {  
            "verb": "addSPField",  
            "fieldType": "User",  
            "displayName": "Contact",  
            "addToDefaultView": true,  
            "isRequired": true  
          },  
          {  
            "verb": "addSPField",  
            "fieldType": "Note",  
            "displayName": "Meeting Notes",  
            "isRequired": false  
          }  
        ]  
      }  
    ],  
      "bindata": { },  
  "version": 1  
 }  
 '@  

Currently site design has a few more actions; add and remove fields and content types, set custom field formatting using JSON, add navigation links, apply a theme a site logo, joining a Hub Site and triggering a Flow. Still Site design is in preview, lets hope there will be more actions added in the future.

PowerShell
Once the JSON script is ready, we need to add the script and create a new site design which is a two step process.

Add Script
 C:\> Add-SPOSiteScript -Title "Create Project Site" -Content $site_script -Description "Creates lists for managing projects"  


Create Site design
 Add-SPOSiteDesign -Title "Contoso Project Management" -WebTemplate "64" -SiteScripts "4a2ef0f9-a1dd-48a1-8703-e73300418eb6" -Description "Peoject management template"  
You need to provide the ID returned from the Add-SPOSiteScript to the Add-SPOSiteDesign cmdlet.

Log in to your SharePoint Online tenant and go to the home page of your SharePoint site. Click "Create Site" and you will be able to see the newly added template.

Once the site is created, it will execute the script call the actions to proceed with the customization.
refer to the link for more info and updates.

Saturday, May 20, 2017

SharePoint Saturday - Colombo 2017

I'm honoured to be a part of the SharePoint Saturday - Colombo Chapter by being an organiser and a speaker. You can find more details of the sessions and the speakers in http://www.spsevents.org/city/Colombo/Colombo2017/home


Speakers and the team who was behind the seen to make it great success.

Speakers...

and that's me hosting the session; "The Serverless Nirvana"

All attendees...

and how can we forget the selfie...

thanks again for everybody who made it a great success. Till #SPSaturday #SPSColombo

Friday, April 7, 2017

Mount an Azure File Share using PowerShell

I'll start this blog post with the exact use-case I went through. I was deploying a SharePoint environment in the Cloud. The requirement was to deploy a staging environment and the production environment where each environment has 7 servers deployed with SharePoint. To make the deployments process easier, I had to download all the necessary binaries in to one location which can be accessible from all servers. This includes all the other supporting tools. So basically a shared drive for all machines.

The good thing with Azure file Share is, its not limited to Cloud when sharing or accessing. Once the storage account is created which includes a file share, it can be accessed from machines/VMs in cloud as well as machines in on-premises.

I named my file share as fscommon. Well, as a practice I used to as a prefix for all the resources I create.
Prior mounting the file share, you need to make sure you copy your storage account key.

You can select one of the keys given by azure. You can replace the existing keys by regenerating new keys. Below PowerShell script can be used to attached your Azure File Share to your machine. Make sure to replace the storage account key, storage account name, Drive letter and the share name with your own values.

 $acctKey = ConvertTo-SecureString -String "<storage-account-key>" -AsPlainText -Force  
 $credential = New-Object System.Management.Automation.PSCredential -ArgumentList "Azure\<storage-account-name>", $acctKey  
 New-PSDrive -Name <desired-drive-letter> -PSProvider FileSystem -Root "\\<storage-account-name>.file.core.windows.net\<share-name>" -Credential $credential  


But shared drive will be mounted till you restart your machine. If you need to mount the drive permanently (till you unmount), use the -persist parameter with the New-SPDrive cmdlet.

Happy days :)

Tuesday, January 17, 2017

File upload failed to SharePoint Online Style Library

I was changing the look and feel of a SharePoint online Team Site. So I needed to upload a few CSS, JS and ASPX files. I tried through the browser and got the below error. “The documents cannot be uploaded because different permissions are needed. Request the necessary permissions.” At the same time I was trying through SPD as well. But the same result with a different error message “Access Denied”. These errors have nothing to do with the Site Collection / Site level permissions.

2

Well, Googling, I figured that enabling custom scripts in admin center will do the job. In your Office 365 admin center, go to SharePoint Admin Center and select Settings. There you will see the “Custom Script”, where you can enable it for personal sites and self-service created sites. But the catch is, it’s gonna take 24 hours to take effect.

1

The Custom Script feature enables or disables scripting capabilities on SharePoint Online personal sites and self-service sites. Because self-service site creation points to your tenant’s root site collection by default – you’re actually applying the scripting capability to your tenant’s root site collection. If you don’t want this and instead want to enable or disable scripting on another site collection, you can point the self-service site creation root to another valid site collection in Office 365.

To enable scripting on a particular site collection immediately, use the following PowerShell command
Set-SPOsite <SiteURL> -DenyAddAndCustomizePages 0

There’s a lot more info about it in the below url.
https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1F2C515F-5D7E-448A-9FD7-835DA935584F?ui=en-US&rs=en-US&ad=US&fromAR=1

Tuesday, September 27, 2016

Feature pack 1 for SharePoint Server 2016

What is a feature pack?
As Microsoft says “Unlike previous versions of SharePoint, release-to-manufacture (RTM) did not define the end of innovation, but the beginning. As we continue to develop SharePoint Server 2016, we’ve paid close attention to customer feedback, trends in content management, team collaboration, user experiences across devices, and how the cloud can be blended into existing on-premises scenarios in new and compelling ways. Feature Packs allow us to accelerate delivery of cloud-first features to our Software Assurance customers (where noted) of SharePoint Server 2016 outside of the traditional 2- to 3-year release cadence.”

Microsoft has SharePoint Online the cloud version and SharePoint Server the on-premises version. Keeping on-premises version up to date with the online version is a real challenge. Bringing the demanding features of online version to the on-premises version on time is a tough job. But today Microsoft announced the Feature Pack 1 for SharePoint Server 2016. It brings the enhancements including,

  • Logging of administrative actions performed in Central Administration and with Windows PowerShell.
  • Enhancements to MinRole to support small environments.
  • A new OneDrive for Business user experience.
  • Custom tiles in the SharePoint app launcher.
  • Unified auditing across site collections on-premises and in Office 365.
  • Unified taxonomy across on-premises and Office 365.
  • OneDrive API 2.0.

This will be available in November 2016. For more information please read link.

Monday, May 2, 2016

Azure Roadshow 2016

Another busy day for the MVPs and the techies. It’s the Azure Roadshow time for the year 2016. A day full of technical sessions. This is in parallel to to the Global Azure Boot Camp.

group-photo

dsc_0999

dsc_0893

dsc_0824

dsc_0834

dsc_0948

It’s always a pleasure to engage in community activities and share the knowledge with the techies. Smile

Saturday, April 23, 2016

SharePoint Development and DevOps Practices with VSTS

This is an interview I came across in Channel 9. Just thought of sharing it with the community as it shows the real world usage of DevOps in SharePoint Development. Thanks to Vincent Biret and Julien Stroheker for the great insight.



Thursday, March 31, 2016

Reporting portal in Office 365 Admin Center

Office 365 provides a very rich product suite. Especially for organizations which will help & ease their day-to-day tasks. But what’s missing? The reporting, insights on how the services are used, specially the detailed reports on individual user activities. Few days back, Office 365 team released the new reporting portal for Office 365. This is a part of the new admin center.

1

New portal and the reports allow the drill down facility; Service level, file level, user level etc. Within the new admin center > Reports > Usage is where you get access to all the currently  released reports. Rollout will start from US, Australia and Canada.

Check below for a few sample reports.

image

image

image

Tuesday, March 15, 2016

SharePoint 2016 RTM

Another great day for SharePoint lovers, a day to celebrate. SharePoint Server 2016 is Released to manufacturing (RTM). As a SharePoint user since year 2006, I’m very clear where Microsoft is heading with their billion dollar product. SharePoint 2016 is built for Cloud and full of rich Hybrid features. There were few releases prior to the RTM. There are a lot of new features for the IT Pros, Admins and the new set of API brings a tremendous opportunities for the developers as well.

Use the reviewer's guide to learn more about SharePoint Server 2016. Also you can download the RTM. With SharePoint 2016 comes Project Server 2016. From now on, Project Server is a part of SharePoint Server.

The Future of SharePoint
You can join the live online event on 4th of May to learn the vision of the product and the roadmap. “See Jeff Teper, CVP for OneDrive and SharePoint, outline our vision and future plans for SharePoint and OneDrive for Business—both on-premises and in the cloud with Office 365. Following the keynote will be a number of sessions detailing the new innovations along with sneak peek demos of what’s coming. Whether you are an executive, IT pro, developer or SharePoint user, we have a lot to share and hope you’ll be part of this historic moment and register today.”

Thursday, January 21, 2016

Embed Office 365 Video

I still remember in year 2012, building our own Video portal in on-premises when Microsoft Media services was on beta, when Microsoft allowed it to be used to build your own video steaming service. Later Microsoft released Office 365 Video, but it had its own limitation at the release. User voice was helpful enough to make it a better product for an enterprise (still not a fully fledged product though).

Embedding video published to Office 365 video portal on other sites and pages was a limitation till today. With the release of new features, you can embed videos in your SharePoint Online and also in your SharePoint On-Premises environment.

Edit an existing (or new) page, go to the insert tab and click on Office 365 Video.1

Select the video from the Office 365 Video portal.
2

Once added, you can still change the look & feel by amending the html. Select the Edit snippet and do the necessary changes.
4

Apart from the above method, if you want to add a video from Office 365 portal in to a page in your on-premises environment, you add the code to embed. Go to your video portal and below the video you can find the embed button to get the html.
5 

Selecting the embed code will allow you to add the code.
7

Simple as that. Smile

Saturday, August 9, 2014

A career in SharePoint – University of Moratuwa

I was invited by 2nd year degree students of University of Moratuwa, IT faculty to conduct a session on pursuing a career in SharePoint. Though I have done the same session previously, I’m honored to conduct a session at UOM.

Sunday, July 20, 2014

A career in SharePoint – ESoft Metro Campus

I was invited by Microsoft Sri Lanka to conduct a session for degree students at ESoft Metro Campus Colombo on pursing a career in SharePoint. Session was scheduled on 18th July 2014.

Friday, February 7, 2014

SharePoint Sri Lanka User Group – Workflow for SharePoint 2013

I’ll be speaking at SharePoint Sri Lanka User Group on Wednesday the 12th February 2014.

The session title is “Workflow for SharePoint 2013”. This is NOT a just another session on how to create simple workflows :) .Agenda is given below.

• History of Workflows
• Overview
• New Workflow Architecture
• Workflow Manager 1.0
• Visio 2013 & SharePoint Designer 2013
• Visual Studio Workflow
• Workflow Types
• Workflow Manager 1.0 in Depth

SharePoint Forum Event

All are welcome. https://www.facebook.com/events/274981052658717/

Tuesday, September 10, 2013

Unable to open office files in Office client stored in SharePoint

One of my clients who is heavily using SharePoint Workspace 2010 faced an issue recently where some of the employees were unable to open the Microsoft Office files (word, excel, powerpoint files) in Office client applications. Files are stored in SharePoint and once they try to open the files in client application they get the below error.

 "could not open 'https://servername/Documents/CA_Project001.xlsx'"

So finally figured that this happens due to SharePoint Workspace temp files stored in the below location which are used for synchronising.

"c:\Users\login_user_name\AppData\Local\Microsoft\Office\14.0\OfficeFileCache"

Terminating the workspace process and cleaning the temp files sorted the issue. :)

Monday, February 4, 2013

Installing and configuring Workflow for SharePoint Server 2013

When you open SharePoint Designer 2013 connected to a site to build a workflow, you will notice a new option called platform type. If it’s only “SharePoint 2010 Workflow” that you see, you need to install and configure “workflow manager”.

As MSDN recommends, you need to consider the following two key factors before configuring Workflow Manager to work with SharePoint Server 2013.

  • Is Workflow Manager installed on a server that is part of the SharePoint farm?
  • Will communication between Workflow Manager and SharePoint Server 2013 use HTTP or HTTPS?

These factors translate into four scenarios. Each scenario configures a SharePoint Server 2013 farm to communicate and function with the Workflow Manager farm. Follow the scenario that matches your circumstance.

  1. Workflow Manager is installed on a server that is part of the SharePoint 2013 farm. Communication takes place by using HTTP.
  2. Workflow Manager is installed on a server that is part of the SharePoint 2013 farm. Communication takes place by using HTTPS.
  3. Workflow Manager is installed on a server that is NOT part of the SharePoint 2013 farm. Communication takes place by using HTTP.
  4. Workflow Manager is installed on a server that is NOT part of the SharePoint 2013 farm. Communication takes place by using HTTPS.

Mine is the 1st scenario. Workflow Manager can be downloaded from here. Workflow Manager installation uses Web Platform Installer as shown in the below screen.
image
image 
Then you need to install the prerequisites. 
image
image
image
Clicking continue will bring the configuration options.
image 
I prefer to go with the custom setting as I can get to know what’s going on behind scene. If you select the “Configure Workflow Manager with Default Settings (Recommended)”, it will install a Workflow Manager farm. So let’s move with custom :)
In the below screen you need to specify the database server, where it will create the DBs needed for WM(Workflow Manager).
image
Make sure you remember or keep safe the Certificate Generation Key, as it’s needed when you want to add more servers to the WM farm.
image
Service account will be used to run the Application pool of the WM Website.
image 
Below screen looks nice so added that too :D
image
image
image
image
Three screens below show the full configuration summary.
image
image
image
You can even see the full PowerShell script for the configuration.
image
image
image
image
Great!! You are done with the installation and the configuration of Workflow Manager. Yet one more step left for the Workflows to work in 2013 Platform. Open IIS Manager to see the WM Site and the port you configured.
image
Open SharePoint Management Shell with Admin rights and execute the below cmdlet (replacing the site and the Workflow Manager host site).

Register-SPWorkflowService –SPSite "http://www.whiteknight.com/Hr" –WorkflowHostUri "http://workflow.whiteknight.com:12291" –AllowOAuthHttp

Finally to check whether everything works fine… Open the above site (registered with workflow host uri) in SharePoint Designer 2013 and check the Platform type in workflow.
Workflow Manager 1.0
When you install Workflow Manager on a WFE it automatically installs the Workflow Manager Client on that WFE. You will still need to install the Workflow Manager Client on any additional WFE servers.