Wednesday, August 31, 2016

SharePoint 2013 TIP: How to create a new website using PowerShell

Sometimes it is more convenient to create a new website (or "Web" in Microsoft terminology) via PowerShell rather than using browser-based methods. I don't mean a new "site", which is Microsoft terminology for "site collection."  I mean just a website that is sub to another website or maybe sub to the site collection's root website.  The commandlet for creating new websites is New-SPWeb.

Procedure

  1. Identify the following key website parameters:
    1. URL of the existing website that you want to us as a container for the new website.  Don't include the final "/" when noting down this URL.
    2. Name of the new website.
    3. Web template to be used for the new website.  These will be in the format "STS#0" or "CMSPUBLISHING#0," and so on.  For a listing of these and their descriptions, see the references below.
  2. Open an elevated SharePoint Management Shell, and then execute the following commandlet:
    New-SPWeb -Identity "[full URL of the new website]" -Template "[templateNameAndID]" -Name "[title of new website]"
  3. That's it.  It will take a minute or two to complete.  You're done.  See the Notes section below for useful additional aspects about this method.

References

  • In Microsoft terminology, this is the hierarchy of website terms:
    • Web Application
    • Site Collection
    • Web
  • Don't know the template used by an existing website?  Easy PowerShell. Get an instance of the website, and then interrogate its webtemplate property like so:
    $web=Get-SPWeb -Identity "[website core URL]"
    $web.webtemplate
    $web.webtemplateid
    Note that you need to get both the webtemplate and the webtemplateid.  Also, by "core url" I mean the URL without the web page file name or the folder it's located in.
  • If you run the above commandlet to create the new website, the website permissions will be configured to inherit from the parent website.

Wednesday, August 17, 2016

SharePoint 2013 TIP: How to quickly deploy a new term set

It's easy to build and deploy (to Managed Metadata) a new term set, and the simplest way to do this is using the sample import file available right from your farm's Term Store Management Tool.  This TIP shows you how.

Procedure


1) You'll find the link on the main page of the Term Store Management Tool:
Download this file, ImportTermSet.CSV. Open it in Excel and start to add your terms.  Each and every term must be added, including its term path.  You'll figure it out.

2) Next, create a new group in the Taxonomy Term Store.  Select the top item in the tree, hover the cursor over it, click, and then select New Group from the dropdown menu.  Call it Knowledge Base.

3) Now, select the new group you created.  Then, hover the cursor over it, click, and then select Import Term Set from the dropdown menu.  Navigate to the file you created previously, and then click OK.  After a few seconds, you will see the term set populate beneath the group you selected.  You're done.

References

  • none

Friday, August 12, 2016

SharePoint 2013: How to create and implement Wiki page categories

Introduction

This post walks through the process of creating a set of categories for a new Enterprise Wiki site and then linking that new term set to your wiki pages.  When you first create a new instance of an Enterprise Wiki website, you may not have categories created for yet.  Thus, you won't be able to enter a new term into the Categories field along the right side of the wiki page; and if you click on the Metadata tags next to this, nothing will happen. This is because the Categories Metadata field hasn't yet been linked to a term set.  You need to do this manually.  This procedure shows you how.  Note: you must be a Term Store Administrator or a Farm Administrator to be able to make changes to the Managed Metadata Service such as create term groups and sets and adding terms.  A downloadable sample term set that you can import into your Managed Metadata group is provided in the References section below.

Procedure

  1. Login to the farm's Central Administration website.
  2. Navigate to the Term Store Management Tool (Application Management > Manage Service Applications > Managed Metadata Service).
  3. In the TERM STORE, select the top most item - for default Metadata Service deployments, this will be called Managed Metadata Service. This item has a dropdown. Open it up and then select New Group. A new group will open below it.
  4. Enter a name for this group, such as Knowledge Base. Then click to the left of it to save it.  If you click anywhere else, you will get a prompt to exit without saving.
    If you see this prompt, click its Cancel button, and then, on the results panel at right, click the Save button to save the new group.  If you don't do this, your new group will be removed and you will need to start over again.
  5. Now select the Knowledge Base term group.  This item also has a dropdown. Open this up, and then select New Term Set. A new term set item will open below it.
  6. Enter a name for this term set, such as Wiki Categories.  Then click to the left of it to save it.
  7. Now select the term set name, and then click its dropdown, selecting Create Term.  Use this process to create as many terms as you need.  You can also create subterms by clicking the dropdown arrow for a term.  And so on.  Once you are done creating terms, you can leave the TERM STORE tool, since your new term group is made available immediately.  Now let's return to the wiki website to finish.  In the next series of steps, you will configure the Wiki Page library's Categories column and link it to the new term set you created.
  8. At the new wiki website, go: Settings (gear icon) > Site contents.
  9. Look for the Pages application, and then hover the cursor over it.  See the ellipsis "..." that appears?  Click on it.  A popup will appear.
  10. On the popup, click the SETTINGS link.  This is a new way of navigating to the Library Settings page.
  11. On the Library Settings page, look for the Columns section, scroll down to the bottom, and look for the Wiki categories column.  Click on this column.
  12. Scroll down to the Term Set Settings section, and then expand the Managed Metadata Service item in the box.  Look for Knowledge Base (or whatever name you gave it), and then expand it too.  The select Wiki categories (or whatever you called it).  That's it.
  13. Click OK.  The term set is now linked, and you can select terms when editing and configuring Wiki pages at this website.

References

  • The downloadable term set sample is properly configured for importing into a Managed Metadata group.  This sample provides typical categories and subcategories for an IT department knowledge base article library.

Friday, August 5, 2016

Tips and Tricks with SharePoint and the Chart web part

Add an Annotation

  1. Get to the chart's Advanced Settings.
  2. At left, in the Select an Element panel, click Annotations.  Above the settings panel, you'll see Annotation Menu.  The dropdown will be empty if you haven't configured an annotation yet.   The settings panel will also be empty, since there is no annotation to configure yet. Look to the right of this dropdown for the little "+" symbol.
  3. Click this "+" symbol.  This will create a new generic annotation.  It will appear above left of your chart, "Annotation1".  The Settings panel will also be refresh and now display a number of settings that you can configure.  You'll be working with the Anchor and Position groups of settings.
    Note on positioning: the coordinates here are always relative, from 0 - 100, starting from the top left corner of the chart. In other words, positive Y is down and positive X is to the right.
  4. Scroll down to the Position group.  Notice that the X and Y settings are both 0.  These coordinates are associated with the top left corner of the annotation box.  Change Y to be 50, and then click somewhere else.  The change is implemented immediately.  The annotation box has been moved down vertically to the center of the Y axis.
  5. Now adjust the X and Y settings as desired.  The next thing you can add is a pointer.  This pointer will start at the annotation box and reach to any point on the graph you want.  To configure pointer settings, you need to scroll back up to the Anchor group.
  6. In the AnchorX and AnchorY settings, enter the X and Y values of where you would like the pointer to stop.  It will start at the annotation box and end where you want it to end.  The start of the pointer will automatically adjust depending on whether the end value is to the right, left, above or below the annotation box.  Adjust the settings as desired.  The next value to adjust is the Text value, which is the actual text you want displayed in the annotation box.
  7. Scroll down to the Appearance group, and then a bit more until you see the Text setting.  It will appear just above the MapArea group.  By default, this setting will be "Annotation1" if this is the first annotation you are adding.  If your message is long, it will stretch out the annotation box.  You can adjust the width and height of this box, and text will automatically wrap as necessary.
  8. Scroll down to the Position group.  Edit the Height and Width settings as desired.  Lastly, you can adjust the way in which the text is presented in the annotation box - left,right justified, centered, etc.  By default, it will be centered.  Let's change this to left-justified.
  9. Scroll to the top, look for the Alignment settings, and change it to TopLeft.  At present, the annotation box has the pointer coming from the bottom middle.  I would like it to come from the right side.  To do this, I need to move the annotation to the left enough, and that requires further adjustment of the X and Y settings in the Position group.
  10. When you are done, click the Finish button at the bottom of the page.  At any time, to return to this annotation, get to the Advanced Settings dialog, select Annotations from the Select and Element panel, and then select the appropriate annotation from the dropdown.

References