Posts

Showing posts from 2017

Office 365 and PnP-PowerShell 2013 : Fields

Image
Now the time to learn about the Fields or so called SharePoint “List” and “Content Type” Columns.  The below mentioned cmdlets lets you create and remove the Fields to content type and directly to the SharePoint List.  Cmdlet Description Add‑PnPField Adds a field to a list or as a site column Get‑PnPField Returns a field from a list or site Remove‑PnPField Removes a field from a list or a site Add‑PnPFieldFromXml Adds a field to a list or as a site column based upon a CAML/XML field definition Add‑PnPTaxonomyField Adds a taxonomy field to a list or as a site column. If you want to take a better control over to the list columns better way to design and developed via “ Add‑PnPFieldFromXml ” method. As this method you only need to work on the XML part for this you need to invest your time to check CAML Documentation. So I am going use “ Add‑PnPFieldFromXml ” cmdlets to create the utility to create the columns and configuration done via CSV file. So before go

Office 365 and PnP-PowerShell 2013 : ContentType

Image
In this content type section is most important section. You can use these methods to create, delete and update the existing content type. So the cmdlets are piety straight. The following are the command lets that we are going to use in this section. You can check the github documentation and example as well.  With the help of these cmdlets I will create the Utility same as we did for in before blog post.  Add‑PnPContentType Get‑PnPContentType Remove‑PnPContentType Remove‑PnPContentTypeFromList Get‑PnPContentTypePublishingHubUrl Add‑PnPContentTypeToList Set‑PnPDefaultContentTypeToList Remove‑PnPFieldFromContentType Add‑PnPFieldToContentType        Lets start the end of my goal is the build some kind of meaning utility that you can quickly use in your project and get some benefit.  Same create the multiple content type and attach columns to content type. For configure the content type, I am using the same CSV approach to read every prop

Office 365 & PNP PowerShell 2013 : Branding Part1

Image
Last post we have learned about the other branding topics as mentioned below.  1. Create the bulk custom Actions using CSV files.  2. Set the Home page URL using CSV file.  3. Add and remove the script blocks and script links.  Now this post we will learn how we can create the bulk links using " Add‑PnPNavigationNode " method. So in this example I am going to create the utility that help you to create the multiple links in the single go. For this we will be using the csv files for configure every thing. As you know using this method you can add the links to following locations.  1. TopNavigatoin  2.  QuickLunch  3. SearchNav So here is the solution without taking your much of time.  Remove the Navigation using " Remove‑PnPNavigationNode " We have learned how to add the navigation, now the question come if we need to delete the same above created structured.  So friends, I am facing very  taught time to make this possible. So I am

Office 365 & PNP PowerShell 2013 : Branding

Image
The PNP branding section you can create custom action like link in the ribbon and other locations as well. For that you need to understand the Ribbon XML. You can check the following links to know about the ribbon xml.  Adding a Button to the Server Ribbon ` Add a custom ribbon to your sharepoint site Now let’s do some practical work. To create the ribbon with PNP powershell, I am going to use the Add‑PnPCustomAction . To get the all custom actions you need to use the Get‑PnPCustomAction command. And to remove the custom action we get use the above method to get the all the custom action and delete all the custom action just loop over the collection use the Remove‑PnPCustomAction .  In this example, I am going to use the CSV file to read the information and create the Ribbon based on the configuration. Here is the CSV files for both operation are identical only one different in Action column ‘Del’ and ‘Add’ for distinguish the operation. The code for c

Office 365 With PNP PowerShell 2013: Base Cmdlets

Image
This is my third blog post on the topic PnP-PowerShell 2013. In this post I am going to give clear understanding, how to make the connection and close the connection using PnP Base Cmdlets section.  In the background the “Microsoft.SharePoint.Client.dll” is responsible for get the all results from the SharePoint.  The value also increase of learning if you already have experience on client object Model. Basic tip from my side please read some information about the client side object model.   As you may be know the client site object model you can’t get all the data from the server in single request. You need to identify which property you need and just use the load method to load that type of property also you can use the Get-PnpProperties Cmdlet.  Implementation The command that I am going to cover as mentioned below.  These are the most common rest of others not much important in terms of PNP 2013 on premise. The numbers of command are 6. Sr. No