Community
  • 23.8K Members
  • 3,113 Online
  • 3,905 Conversations
Collaborate, share and learn from experts
Microsoft Tech Community
Session presentations, recordings, and conversations with the experts at Microsoft Ignite. All in one place.
Atlanta, GA Sept 26-30, 2016
Join Now

Recent Conversations

  • 10-07-2016

    For our customers we are provisioning SharePoint sites using the Office Dev PnP materials. For our solutions we prefer provisioning using the Provisioning Schema above using the Office Dev PnP PowerShell commands, therefor we are transferring as much PowerShell code into our provisioning templates. At the moment I am trying to transfer our site collection creation meganism from PowerShell to the provisioning schema, but run into errors.

     

    In the past I was creating Site Collections using the Office Dev PnP New-SPOTenantSite command. On the documentation of the Office Dev PnP Provisioning Schema, located at https://github.com/OfficeDev/PnP-Provisioning-Schema/blob/master/ProvisioningSchema-2016-05.md#sitecollection, I found that also an element regarding Site Collections do exist. Based on the information I've created this small provisioning template:

     

    <?xml version="1.0"?>
    <pnpSmiley Tonguerovisioning xmlnsSmiley Tonguenp="http://schemas.dev.office.com/PnP/2016/05/ProvisioningSchema">
      <pnpSmiley Tonguereferences Generator="OfficeDevPnP.Core, Version=2.5.1606.1, Culture=neutral, PublicKeyToken=3751622786b357c2" />
      <pnpSmiley Frustratedequence SequenceType="Synchronous" ID="PROJECT-SEQUENCE">
        <pnpSmiley FrustratediteCollection Language="1043"
                            SiteTemplate="STS#0"
                            PrimarySiteCollectionAdmin="[email protected]"
                            MembersCanShare="true"
                            TimeZone="4"
                            Title="Test Site from PnP provisioning schema"
                            Url="https://MyTentant.sharepoint.com/sites/testSiteFromProvisioningSchema">
      </pnpSmiley FrustratediteCollection>
      </pnpSmiley Frustratedequence>
    </pnpSmiley Tonguerovisioning>

     

     

     

    When I execute the following command, I'm presented with a NullReferenceException

     

     

    $O365Cred = Get-Credential "[email protected]"
    Connect-SPOnline -Url "https://MyTentant-admin.sharepoint.com" -Credentials $O365Cred
    Apply-SPOProvisioningTemplate -Path .\SiteCollectionTemplate.xml

     

    Apply-SPOProvisioningTemplate : Object reference not set to an instance of an object.
    At line:1 char:1
    + Apply-SPOProvisioningTemplate -Path .\SiteCollectionTemplate ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : WriteError: (Smiley Happy [Apply-SPOProvisioningTemplate], NullReferenceException
        + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Branding.ApplyProvisioningTemplate

    Any idea why this happens?

    Is creating site collections also supported using the Office Dev PnP Provisioning Engine?

     

    24
    2

    Pieter is right it seems your site collection is not created yet. did you add code to provision the site collection?

  • 10-09-2016

    I am using SharePointPnPCore2013 Nuget Package to create a template xml using the method explained at the video below.

    https://channel9.msdn.com/blogs/OfficeDevPnP/Getting-Started-with-PnP-Provisioning-Engine

     

    However, i get an error "Field or property "Audit" does not exist" at  GetProvisioningTemplate method. Can you please suggest me a way to get rid of this error?

     

    9
    1

    Hi Prasad,

     

    It seems the custom column does not yet exist. But just a questoin did you first get a export of a site or did you start from scratch? and are you provisioning a subsite or a site. Do you use content types?

     

    so a bit more info would be helpfull.

     

  • 10-09-2016

    I recently posted an article that discussed various deployment methods for SharePoint Online.  In this article, I’ll share what worked for me in the past when creating entire sites from the ground up.  You could leverage parts of it as needed to develop your process.  Most of the process leverages PowerShell and the OfficeDev PnP PowerShell library.  My process is broken down into the following three steps

     

    BuildProcess.JPG

     

     1. Gather Requirements

    I always begin with identifying the needs of the users.  Those include both configurations as well as information architecture.  When I work with the users to define the information architecture, I prefer tools that are simple and efficient at gathering this data.  For any information that is tabular in nature, I use Excel, while either Excel or an XML editor work well for hierarchical information.  Excel is great because most business users have a basic understanding of how to fill in the sheets and use drop-down choices. 

    The information architecture components I gather are:

    1. Taxonomy (Managed Metadata)
    2. Site Columns
    3. Content Types
    4. Lists & Libraries
    5. Views

    I like, to begin by defining the site taxonomy.  SharePoint saves me some trouble here by providing me with an Excel structure that can be used to pass the information into the term store. As a first cut, all I need to do is select the worksheet and, if there are no errors, my term groups and term sets are created.  You can get the template by navigating to https://<you rtenant>.sharepoint.com/sites/portal/_layouts/15/termstoremanager.aspx and selecting View a sample import file.

     

    taxonomy.png

     

     I work with the users to fill in one of these files for each term group.

     

    taxonomy2.png

     

    Once I’ve defined the taxonomy, I move onto gathering information about the site columns and taxonomy columns.  For the columns, I ask my users the following questions

    • What should the name of the column be?
    • How are the columns grouped?
    • Is the column required?
    • What type of data will the column hold?
    • Is it a multiple choice column, and if yes, what are the choices for the column?

    For taxonomy columns, instead of asking for the type and options, I request the association of columns and term sets (based on what they’ve provided me earlier on).

    To reduce errors, I present the Required, Type and Multivalue columns as drop-downs for the user.  I calculate the InternalName column by removing all spaces and special characters.  I then add the GUID for each column.  By providing the GUID, I make sure that for each deployment, the column can be referenced by any part of the site using the same ID.

     

    Site Columns.png

     

    Next, I collect the Content Type data.  Similar to the columns, I use an Excel document to capture the name, group, Field names, and whether they are required.

     

    CT1.png

     

    However, because it’s hierarchical structure, I prefer to convert the content types to XML to simplify the code in PowerShell.

     

    CT2.png

    After the content types are defined, I gather the lists, libraries, and views specifications.  I’m capturing only specific settings about the lists, such as whether versioning and check-in/check-out should be enabled.  However, it’s relatively easy to use PowerShell to modify additional information architecture settings.  Just make sure that you capture the information in Excel and alter your import code to apply these changes.

    Capturing information about the configurations is a bit more involved as the available options for the configurations vary significantly.

     

    2. Build Master Site

    Now that I’ve gathered all the necessary information from the users, I begin to build my master site.  As the first step, I create the empty site and then apply to it all the configurations using specific PowerShell scripts that will match my requirements.  The settings will include

    • Turn features on/off
    • Set the global and site navigation parameters
    • Modify regional settings
    • Configure search settings

    There are a lot more configurations available, but those are the usual suspects.  Next, I tackle the information architecture by leveraging the Excel and XML files.  Using a combination of OfficeDev PnP PowerShell functions and simple loops, I iterate through these files and build the site in the following sequence:

    1. Taxonomy
    2. Site columns and Taxonomy Columns
    3. Content Types
    4. Subsites
    5. Lists and libraries
    6. Views

    Once finished, I deploy a minimum amount of data for each site and taxonomy column for the search indexing.  The sample data is utilized by SharePoint during its scheduled crawls and will enable the site to leverage search-driven configurations and customizations.At this point, my master site is ready to be exported into an OfficeDev PnP provisioning template. 

     

    3. Build Template Sites

    I can now take these templates and deploy them over and over to create new sites with the same configurations and content.  Typically, I’ll use the template to create the QA and production environments.  If I haven’t introduced any crazy customizations, then I could even apply the same templates in an on-premises environment.  Finally, I deploy the content to the sites.

     

    NOTE:  It is possible to create the provisioning templates manually, as they are simple XML files.  However, I find it a bit risky as any errors could cause the entire template deployment process to fail.

     

    Benefits of using this approach

    I’m sure many readers can weigh into this article and provide their perspective and experiences on deploying sites.  That’s great!  By no means am I trying to imply that this method is better than others – it just works well for me.  A few benefits that I’ve seen using this approach are:

    • Gathering user requirements is easy. Depending on the comfort level of my users, they can even provide a lot of the information without my direct involvement.
    • It’s very easy to make changes to the information architecture and redeploy a new master site
    • By building the master site and using its template to create the QA and production environment, I’m in essence, testing the deployment process
    11
    1

    Nice to read thanks for shareing!

  • 10-07-2016

    We are a first release customer yet we are still waiting on the new Office 365 Groups Experience.

     

    Does anyone know how this is being rolled out and when?

     

    Thanks

     

    Craig

    39
    2
    i think he means the new page lay-outs not sure... but no date is given on that one only Q4...
  • 10-06-2016

    Hello community,

     

    So i was opening my document library from my custom web app with passing column filters in URL (query string). Now i need to use metadata navigation heirarchy but problem with this is that once you navigate from one node to another (in metadata navigation) my URL filters are lost since SharePoint creates a new URL on each click and overwrite my custom URL. 

     

    Now SharePoint does maintain column filters if you use key filters, I can not use key filters so is there a way i can construct a URL using some javascript that maintains both metadata navigation and my column filters at the same time if i navigate from node to another in metadata navigation?

     

    @Juan Carlos González Martín@Paul Keijzers@Pieter Veenstra

     

    41
    3

    Hi Bilal,

     

    But would it not be possible to use different views or is you MM so big?

    Have not been testing with MM on a column changing the query string.