Activate "Team Collaboration Lists" feature by power shell script - Error RRS feed

  • Question

  • Hello,

     I have written the following script to activate "Team Collaboration List" feature , But I get the following Error :

       The string is missing the terminator: ".
        + CategoryInfo          : ParserError: (:) [], ParseException
        + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString


     The Script :

    $siteUrl = "http://serverName:2020"
    if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
        Add-PSSnapin "Microsoft.SharePoint.PowerShell"
    Enable-SPFeature -identity "00bfea71-4ea5-48d4-a4ad-7ea5c011abe5" –URL $subSiteURL

       How Can I solve it?


    Thursday, April 3, 2014 9:27 AM


  • Hi,

    The dash in front of the “URL” seems a bit different from the normal dash.

    Please try the script below in your environment:

    Enable-SPFeature -identity "00bfea71-4ea5-48d4-a4ad-7ea5c011abe5" -URL $subSiteURL

    Feel free to reply with the test result if the issue still exists.

    Best regards

    Patrick Liang
    TechNet Community Support

    Friday, April 4, 2014 7:06 AM