.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Disable Feature Across Site Collections using Powershell

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#

Hello all,

I am trying to disable a feature across multiple site collections. Is there anyway to scope this so it hits all site collections in a Web Application? I am currently using the following:

Disable-SPFeature –identity "MyFeature" -URL https://mywebapp

View Complete Post

More Related Resource Links

Disable site templates via powershell?

I'm looking to disable certain site templates available to users via the "create site" menu and would like to just do it for one entire web application, but not the whole farm. Is there a way to do this via powershell? (It honestly baffles me that this still isn't a UI control via central admin)

Automating Site Creation and Feature Activation with PowerShell


I am trying to create a blank site and then loop through the available features for that site and activate them. The problem I am facing is the list of features scoped to "web" that are returned in powershell are not the same list of web features that are visible through the site settings in the SharePoint UI or through the SharePoint 2010 Manager UI.

What I get returned from Powershell is:

DisplayName Id

----------- --

WebPageLibrary 00bfea71-c796-4402-9f2f-0eb9a6e71b18

IssuesList 00bfea71-5932-4f9c-ad71-1557e5751100

WorkflowHistoryList 00bfea71-4ea5-48d4-a4ad-305cf7030140

NoCodeWorkflowLibrary 00bfea71-f600-43f6-a895-40c0de7b0117

SurveysList 00bfea71-eb8a-40b1-80c7-506be7590102

GridList 00bfea71-3a1d-41d3-a0ee-651d11570120

GanttTasksList 00bfea71-513d-4ca0-96c2-6a47775c0119

LinksList 00bfea71-2062-426c-90bf-714c59600103

MobilityRedirect f41cc668-37e5-4743-b4a8-74d1db3fd8a4

workflowProcessList 00bfea71-2d77-4a75-9fca-76516689e21a

TasksList 00bfea71-a83e-497e-9ba0-7a5c597d0107

TeamCollab 00bfea71-4ea5-48d4-a4ad-7ea5c011abe5

AnnouncementsList 00bfea71-d1ce-42de-9c63-a44004ce0104

ObaSimpleSolution d250636f-0a26-4019-8425-a5232d592c01

PictureLibrary 00bfea71-52d4-45b3-b544-b1c71b620109

ContactsList 00bfea71-7e6d-4186-9ba8-c047ac750105

Why do the aks master pages not get applied if the feature is not activated on the top site collecti


I installed AKS 2.0 and activated AKS feature. The problem I found was the aks master pages do not get applied if the feature is not activated on the top site collection. why is so?

example: If i activate the feature on http://<servername>/sites/<sitename> and apply the master page, I dont see any changes.

              But if i activate the same aks feature on http://<servername/ then everything started working on all sites.

              The reason i found is the CSS reference in the aks master pages.

              It reference should be given as follows:

                 for http://<servername>/sites/<sitename> ->  <link rel="stylesheet" type="text/css" href="../../Style%20Library/AKS/Aks_Band_Blueband.css"/>

                 for http://<servername>/ -><link rel="stylesheet" type="text/css" href="/Style%20Library/AKS/Aks_Band_Blueband.css"/>

So my question is, am i missing anything? am i supposed to activate the AKS feature on top level site collection at any cost? if yes, why is so? 

And after applying aks master pages, i see differnece in font sizes. Why the font size is getting changed?


How to create a single entry page for site collections in MOSS 2007



I have  7 site collections containing a few hundred team collaboration sites. Some users are internal (intranet) but most are external (extranet). Extranet users are experiencing problems with losing links to their sites and forgetting which URLs to use. So I would like to create a single entry page that all users can enter after the logon process, which shows a list of sites they have permission to access, and other user-specific information. Perhaps relevant documents, tasks, recently modified documents etc.

I know this sounds like a 'My Site' but we want to use use a general welcome page instead. We use Windows authentication.
What is the best way of doing this and is it something that can be done in SharePoing Designer or does it need to be done in Visual Studio?

Many thanks in advance.

Why feature with event receiver doesn't activate properly after site provisioning?



I have defined feature with event receivers for my document library and for users List .

I try to activate my feature in onet.xml in section <WebFeatures>. After provisioning a new site from onet.xml  all work fine and my feature is shown as activated, but event receivers doesn't fire. It fires only after reactivating my feature (deactivate, then activate it again). But I need my feature works immediately after site provisioning without deactivating and activating it again. Who knows how to solve this problem?

part of ONET.xml



        <Feature ID="00BFEA71-4EA5-48D4-A4AD-7EA5C011ABE5"/>

        <!-- TeamCollab Feature -->

        <Feature ID="F41CC668-37E5-4743-B4A8-74D1DB3FD8A4"/>

        <!-- MobilityRedirect -->

        <!--My EventReceivers Feature-->

        <Feature ID ="41178843-A6A4-47c7-9EF9-B8A432E02B88"></Feature>





Video: SharePoint 2010 Web Applications, Site Collections, and Sites

This demonstration shows how to work with Web Applications, Site Collections and Sites programmatically. (Length: 4:02)

Global Navigation across Site Collections

MOSS 2007 Global Navigation across Site Collections I have couple of questions. a) Is there an easy way to share a global navigation between site collections? b) Portal has the navigation tabs (tab1..n). User doesn't have access to all the tabs, may have access to one or more tabs. Each tab represents a site collection. Is there a way to display the only tabs to which the users have access? If we can develop using SDK, please provide some hints.   Thanks,

How to deploy dashboards made in dashboard designer to diferent site collections?

Hi I just migrated from sharepoint 2007 to 2010. We used to have performance point dashboards spread across libraries in subsites all across our primary site collection "Http://server:x" after I migrated I understand that I must migrate all performance point content to a new site or site collection made with the business intellingence template. I created a new site collection with this template (Http://server:x/sites/pps) and succesfully migrated all performance point content. Now I want to redeploy all the dashboards to their respective subsites in the  "Http://server:x" site collection so that everything looks exactly as it did when we where using SharePoint 2007. But when I try to deploy to a site I only get the option to deploy it to the ("Http://server:x/sites/pps") site collection and its respective libraries. I wish to manage all dashboard content centralized in (Http://server:x/sites/pps) but I want to deploy dashboards to libraries across  "Http://server:x" is this posible or how is Performance Point services supossed to work?   I also having trouble with DashBoard designer. I have everthing running on a Virtual Machine test enviroment. With windows server 2008 r2, 4 gb ram. Everything installed in one machine. And Suddently DashBoard Designer Crashes In the event log I get the error Dashboa

How to debug feature activation by PowerShell

Hello, I got a bunch of wsp files with double the number features from my visual studio 2010 solution. So now I'm using PowerShell to add and install the wsp files to my server and to activate the features for the target site. In Visual Studio 2010 rightlicking and hitting "deploy" works perfectly fine while the PowerShellscript fails with a NullReferenceException. Is there a way to locate the error? I've tried to debug the PowerShell process but when VS2010 opens up to debug the process I get an empty window without any code. I'm using a Windows Server 2008 R2, SharePoint 2010 RTM and Visual Studio 2010 RTM.

How to get the list of all Site Collections that a user has access to

Hi All, Whats the best way to get the list of all Site Collections that a user has access to, under a particular Web Application? I have about 20-30 site collectiosn under the same WebApplication, and iterating through all of them for checking if the user has permissions is a bit performance expensive. Is there any other way of doing it?  Manesh K

Sharepoint site collections accessible only by system account

I I have setup a VM to start palying with SP development, everything running under administrator (sql, sharepoint services....). After succefully creating the root on port 80 and a couple of site collections, whenever I shoot IE http://mymoss or any othe site collection, I go right away to the web site without the usual authentification dialog box. On the right jand side, I see I am logged in as "System account". When I try to "sign in as a different user", enter domain\administrator, who is owner, the dialog box just keeps coming back and I can not log. . Thanks in advance

How to all the Subsites and Site Collections under a top level site collection using client object m

Hello Everyone, I need to know how to get all the subsites and the site collections under a top level site collection using client object model in SilverLight. When I use WebCollection webcoll= ctx.Web.Webs I'm getting the getting subites but i'm not getting the RootWeb and Othe SiteCollections created under the Top Level site collelction.

Linking to a document across site collections

Is it possible to create a link to a document in a document library in one site collection so that it appears as a document (not a link) in another document library in another site collection?

feature stapling done against site definition breaks when saving site as a template?

Hi, we have a bunch of feature stapling done against some of our site definitions on a solution we are working on. This feature staple has a bunch of feature dependancies which all work in a variety of ways. One of these dependancies then uses a feature receiver class to do some post provisioning setting up of web part connections and the like. This all works very well when creating a new site from a site definition etc etc. The problem arises when a user opts to provision a site in this way, and then uses the 'save as template' function within sharepoint. (BTW this is WSS 3.0 / MOSS). The site template saves correctly, but now the feature receiver never runs. I'm assuming this is because the associated feature staple doesnt run either? I've looked around and seen some reference to feature stapling not working against templates. Is this true? 

Top Global Navigation across site collections(?)

Hi, My understanding at the conference was that SharePoint 2010 closed the gap in navigation in that 2010 could see across site collections thus allowing for you to have visibility of those site collections in your global navigation.  However, I can't seem to locate this feature. Does anyone know how you can configure your global navigation to span across site collections? Thank you for your comments, Tim

Retract custom master page feature and all site pages stop working

There is a requirement to apply custom branding on personal sites in a SP 2010 project. For this I have created a feature which uploads and applies the custom master page on creation of any new personal sites.   I have stapled this feature (using feature stapling concept) to the “SPSPERS” (personal site) site definition. The custom master page is displayed on the creation of new personal sites. On feature deactivation, I am looping through all the personal sites (as the feature is deployed on a team site) and pointing the master URL back to v4.master. But when I retract the solution and browse to the personal site, I am getting a “404 File not found” error.  But am able to view the settings page by typing the URL.   I activated the publishing features and looked at the master page applied to the personal site. It was pointing to v4.master.   Any help on this is appreciated. Regards, Neha

how to disable creation of security groups as part of site provisioning for out of the box

I have requirements that I would like to create the sites with no security groups. Add users with specific permissions levels. Is there a way to disable the step in the default site provisioning process for out of box templates, that not to ask for creating of the security groups..net Architect
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend