August 2011 - SharePoint Tips

  • Set Max Size on a Site Collection Using PowerShell

    Niklas Goude -Expert in Residence You can use Windows PowerShell to set the maximum storage size of the site collection using a simple one-liner as demonstrated below. Set the Value of MaxSize to 0 for unlimited storage size: Set-SPSiteAdministration -Identity http : // SP01.powershell.nu ` >> -MaxSize 1000 ReTweet this Tip!
  • 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 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 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 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 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...
  • 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 [ “...
  • Add Metadata Navigation to a List

    Niklas Goude -Expert in Residence You can use Windows PowerShell to add Metadata Navigation on a List in SharePoint. You can configure Navigation Hierarchies where you can use fields as navigation hierarchies for a List or you can configure Key Filters, using fields as key filters for a spec ific list. In the example below we will Configure the metadata navigation on a Document Library and add the field “Metadata Field” as a Navigation...
  • 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...
  • Display a List’s Event Receivers

    Niklas Goude -Expert in Residence You can use Windows PowerShell to display the Event Receivers connected to a List in SharePoint 2010. You can simply connect to the List and use the Event Receivers Property: PS > $spWeb = Get-SPWeb http : // SP01.powershell.nu PS > $spList = $spWeb . Lists [ "Tasks" ] PS > $spList . EventReceivers PS > $spWeb . Dispose () ReTweet this Tip!
  • 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...
  • Install SharePoint 2010 Using an XML File

    Niklas Goude -Expert in Residence When installing SharePoint 2010 on a server, it’s possible to automate each step of the installation. The first part is getting the binaries on the server. The example below shows how you can create a simple XML file and use it as input to setup.exe: < Configuration > < Package Id = "sts" > < Setting Id = "LAUNCHEDFROMSETUPSTS" Value = "Yes" / > < / Package...
  • 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...
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.