Loading...

QuickApps and PowerShell Commands

QuickApps and PowerShell Commands

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #5841
      Anonymous
      Anonymous
      Participant

      Hi Bill, thanks for the very detailed response.

      One last question: in Central Admin we can control which individual Web Part/s are available in a Site Collection and or Web App. Can we use PowerShell Scripts to work at this level?

      Reagrds

    • #5385
      Anonymous
      Anonymous
      Participant

      Hi John,

      To deploy QuickApps from the SharePoint Management Shell you would do the following:

       

      1. Run Add-SPSolution to upload the .wsp package to the farm.

       

           e.g. Add-SPSolution "C:\Downloads\Quick.Apps.wsp"

       

      2. Run Install-SPSolution to schedule deployment of the package to one or more Web Applications. Make sure that the SharePoint Administration service is running before executing this cmdlet.

       

           e.g. Install-SPSolution -Identity Quick.Apps.wsp -GACDeployment -AllWebApplications

       

         When this cmdlet finishes, it does not mean that the deployment has completed. You can use Get-SPSolution to check the status of the deployment job.

       

      This next step is not absolutely necessary, but it is recommended. Each Web Application has a QuestConfiguration feature that will add the essential entries to the web.config file for the web application. You can do this manually with the Configuration Editor, but the QuestConfiguration feature automates this process (mostly). Run the following cmdlet to activate this feature:

           e.g. Enable-SPFeature -Identity QuestConfiguration -Url http://mywebapplication

       

      Next you should activate the remaining features as required using the Enable-SPFeature cmdlet. The features to be activated are listed here:

       

                – QuestLists – Site Feature

                – QuestWebParts – Site Collection Feature

                – QuestMyFirstApp – Site Feature in version 6.0 (Moved to the Site Collection in version 6.1)

      For example:

           Enable-SPFeature -Identity QuestWebParts -Url http://mywebapplication/mysitecollection

      Version 6.0 of QuickApps had a dependency between QuestMyFirstApp and QuestWebParts. If you are going to activate QuestMyFirstApp, make sure you activate the QuestWebParts feature first.

      If you are going to put it into a script, there are numerous enhancements that you can make. For example, you can use the following cmdlets to iterate through the WebApplications, Site Collections and SubSites to simplify the activation of features:

           Get-SPWebApplication

           Get-SPSite

           Get-SPWeb

       

      After running the PowerShell cmdlets, you should run the Configuration Editor to add any remaining settings to the web.config file. These remaining settings are not essential to the core functionality of the Web Parts, but they are necessary for the proper functioning of some advanced features.

      Let me know if you have any questions.

      Bill Armstrong

    • #5840
      Anonymous
      Anonymous
      Participant

      Hi John,

      As far as I know there are no PowerShell cmdlets available for managing the web part gallery, but it is possible to write a PowerShell script to access the .Net SharePoint Server Object Model. Here is a blog post that describes how this can be done (there may be better blog posts, this is just one of the first ones that I got on a Google search).

      http://troubleshooterms.blogspot.ca/2010/01/deleting-webpart-from-webpart-gallery.html

      Now for my big disclaimer:

      I have not validated the script on this blog post. Manipulating the gallery in this manner is not something that we recommend or support. Do this at your own risk!

      I would definitely validate any scripts that you create in a lab environment before trying it in a production environment.

      Good luck.

      Bill

    • #4396
      Anonymous
      Anonymous
      Participant

      Hi, can we use Powershell commands to control the deployment of Web Parts by Site Collection? We can do this from the UI in Central Admin. I have infrastructure customers that would prefer to do this from PowerShell if possible. Thank you.

    • #5839
      Anonymous
      Anonymous
      Participant

      Thanks Bill. Great information.

Viewing 4 reply threads

You must be logged in to reply to this topic.