August 2011 - SharePoint Tips

  • Adding Content Type Fields Using PowerShell

    Niklas Goude -Expert in Residence You can use Windows PowerShell to add Content Type Fields to a Content Type in SharePoint 2010. You can start by retrieving a specific Web site: PS > $spWeb = Get-SPWeb http : // SP01.powershell.nu Next, you can store the Web site Field Collection in a variable: PS > $fields = $spWeb . Fields Now, you can add a New Content Type Field to your Web site using the Add() method. Note that when you specify the Field’s...
  • Adding Content Types using PowerShell

    Niklas Goude -Expert in Residence You can use Windows PowerShell to add Content Types to a Web site in SharePoint 2010. You can start by retrieving a specific Web site: PS > $spWeb = Get-SPWeb http : // SP01.powershell.nu You can use the Available Content Types property to see which Content Types are available on your Web site. You’ll also need to retrieve a Content Type from which the one you are creating will be derived: PS > $spWeb...
  • Adding Choice Fields to a List

    Niklas Goude -Expert in Residence You can use Windows PowerShell to add Choice Fields to a List in SharePoint 2010. When adding Choice Fields to a List in SharePoint 2010, you can start by storing the Choices you want to add in a String Collection. Next, you can use the Add() method available on a Field Collection to create a Choice Field. The example below demonstrates how to add a Choice Field to the Tasks List and set a Description. Note that a...
  • Adding Content Type Taxonomy Fields

    Niklas Goude -Expert in Residence You can use Windows PowerShell to add Content Type Taxonomy Fields to a Content Type in SharePoint 2010. You can start by retrieving a specific Web site: PS > $spWeb = Get-SPWeb http : // SP01.powershell.nu Next, you can store the Web site Field Collection in a variable: PS > $fields = $spWeb . Fields You’ll also need a Term Store ID and a Term Set ID when adding a Content Type Taxonomy Field. You can...
  • Adding a Crawl Rule using PowerShell

    Niklas Goude -Expert in Residence You can add specific rules for Crawling items using the New-SPEnterpriseSearchCrawlRule cmdlet. The cmdlet will support a couple of parameters such as: SeacrhApplication, Path, CrawlAsHttp, Type, Content Class, and more. If you want to see a complete List of the supported parameters, you can simply use Get-Help as shown below: PS > Get-Help New-SPEnterpriseSearchCrawlRule – full The following example demonstrates...
  • Publish Content Types using PowerShell

    Niklas Goude -Expert in Residence You use Windows PowerShell to add Publish Content Types. First, you can retrieve a specific Web site: PS > $url = “ http : // SP01.powershell.nu ” PS > $spWeb = Get-SPWeb $url Next, you can get the Content Type: PS > $contentType = $spWeb . ContentTypes [ "Standard Documents" ] To Publish or Unpublish a Content Type, you can use the Content Type Publisher Class: PS > $publisher =...
  • Adding Term Store Groups Using PowerShell

    Niklas Goude -Expert in Residence You can use Windows PowerShell when adding Term Store Groups. You can start by using the Get-SP Taxonomy Session cmdlet to get a Taxonomy Session object. A Taxonomy Session object will contains the set of metadata term stores for a taxonomy session: PS > $session = Get-SPTaxonomySession -Site http : // SP01.powershell.nu Next, you will get a specific Term Store: PS > $termStore = $session . TermStores [ “...
  • Install PDF Filter Using PowerShell

    Niklas Goude -Expert in Residence SharePoint 2010 doesn’t support PDF files by default. You can solve this by installing Adobe PDF iFilter 9 for 64-bit platforms and following the steps described below. First, you can download PDFFilter64installer.msi: http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025 You’ll also need an icon that will be used in SharePoint 2010 for PDF files: http://www.mossgurus.com/adnan/Documents/pdf16.gif...
  • Modify the Title Column

    Niklas Goude -Expert in Residence You can use Windows PowerShell to modify the title column on a list. First, store the field in a variable: PS > $spWeb = Get-SPWeb http : // SP01.powershell.nu PS > $spList = $spWeb . Lists [ "Tasks" ] PS > $spField = $spList . Fields [ "Title" ] Then, you can change a field’s title by setting the title property: PS > $spField . Title = “ New Title ” You can change...
  • Adding Date Time Fields to a List

    Niklas Goude -Expert in Residence You can use Windows PowerShell to add Date Time fields to a List in SharePoint 2010. Simply use the Add() method available on a Field Collection. The example below demonstrates how you can add a Date Time Field to the Tasks List and set a Description. Note that the Add() method will allow you to specify the Field’s Name, the Type of Field, and a Boolean value that determines if the field should be required:...
  • Adding Custom Event Receivers to a List

    Niklas Goude -Expert in Residence You can add Custom Event Receivers to a List in SharePoint 2010 using Windows PowerShell. Event Receivers can be used to execute code before or after an Item is created, updated, or deleted. It’s possible to run the code either Synchronous or Asynchronous. The example below demonstrates how you can add a Custom Event Receiver to a List in SharePoint 2010: PS > $spWeb = Get-SPWeb http : // SP01.powershell...
  • Adding URL Fields to a List

    Niklas Goude -Expert in Residence You can use Windows PowerShell to add URL fields to a List in SharePoint 2010. Simply use the Add() method available on a Field Collection. The example below demonstrates how you can add a URL field to the Tasks List and set a Description. Note that the Add() method will allows you to specify the Field’s Name, the Type of Field, and a Boolean value that will determine if the field should be required: PS >...
  • Adding Content Type Field Links Using PowerShell

    Niklas Goude -Expert in Residence You can add Content Type Field Links using Windows PowerShell. First, you can retrieve a specific Web site: PS > $spWeb = Get-SPWeb http : // SP01.powershell.nu Next, you can store the Web site Field Collection in a variable: PS > $fields = $spWeb . Fields Next, you can get the Content Type: PS > $contentType = $spWeb . ContentTypes [ "Standard Documents" ] Next, you can get the Field that you want...
  • Adding Terms Using PowerShell

    Niklas Goude -Expert in Residence You can use Windows PowerShell when adding Terms to a Term Set. Start by using the Get-SP Taxonomy Session cmdlet to get a Taxonomy Session object. A Taxonomy Session object will contain the set of metadata term stores for a taxonomy session: PS > $session = Get-SPTaxonomySession -Site http : // SP01.powershell.nu Next, you can get a specific Term Store: PS > $termStore = $session . TermStores [ “ Metadata...
  • Adding Term Sets Using PowerShell

    Niklas Goude -Expert in Residence You can use Windows PowerShell when adding Term Sets. You can start by using the Get-SP Taxonomy Session cmdlet to get a Taxonomy Session object. A Taxonomy Session object will contain the set of metadata term stores for a taxonomy session: PS > $session = Get-SPTaxonomySession -Site http : // SP01.powershell.nu Next, you can get a specific Term Store: PS > $termStore = $session . TermStores [ “ Metadata...
1 2 Next >
Idera SharePoint Reviews SMBology, Inc. Rackspace Hosting Sponsored by Idera and SharePoint Reviews and SMBology and EPCGroup.net
Copyright 2011 SecretsOfSharePoint.com. All rights reserved.