Thursday, June 2, 2011

Visual Web Parts: Tree View



<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %> 
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SasiTreeViewUserControl.ascx.cs" Inherits="May9thVisualWebParts.SasiTreeView.SasiTreeViewUserControl" %>
<asp:TreeView ID="siteStructure" runat="server">
</asp:TreeView>






using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;


namespace May9thVisualWebParts.SasiTreeView
{
    public partial class SasiTreeViewUserControl : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SPWeb thisWeb = SPContext.Current.Web;
            TreeNode node = new TreeNode(thisWeb.Title, null, null, thisWeb.Url, "_self");
            siteStructure.Nodes.Add(node);


            TreeNode ParentNode = node;


            foreach (SPList list in thisWeb.Lists)
            {
                if (!list.Hidden)
                {
                    node = new TreeNode(list.Title, null, null, list.DefaultViewUrl, "_self");
                    ParentNode.ChildNodes.Add(node);
                }
            }




            foreach (SPWeb childWeb in thisWeb.Webs)
            {
                AddWebs(childWeb, ParentNode);
                childWeb.Dispose();
            }


            siteStructure.CollapseAll();
        }


        void AddWebs(SPWeb web, TreeNode ParentNode)
        {
            TreeNode node = new TreeNode(web.Title, null, null, web.Url, "_self");
            ParentNode.ChildNodes.Add(node);
            ParentNode = node;
            foreach (SPList list in web.Lists)
            {
                node = new TreeNode(list.Title, null, null, list.DefaultViewUrl, "_self");
                ParentNode.ChildNodes.Add(node);


            }
            foreach (SPWeb childWeb in web.Webs)
            {
                AddWebs(childWeb, ParentNode);
                childWeb.Dispose();
            }
        }
    }
}


-----


using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.Data;



namespace May9thVisualWebParts.DeepakGV
{
    public partial class DeepakGVUserControl : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=WSS_Content_9997;Data Source=BALDH01-NB\\SQL2008");
            DataSet ds = new DataSet();
            SqlDataAdapter da = new SqlDataAdapter("Select top 10 * from alllists", con);
            da.Fill(ds, "allLists");
            GridView1.DataSource = ds.Tables[0].DefaultView;
            GridView1.DataBind();




        }
    }
}

Friday, May 20, 2011

SharePoint Visual How tos List

WSS 3.0 Visual How tos
http://msdn.microsoft.com/en-us/library/bb931737(v=office.12).aspx


SharePoint 2007 Visual How tos
http://msdn.microsoft.com/en-us/library/bb726436(v=office.12).aspx

SharePoint 2010 Visual How tos
http://msdn.microsoft.com/en-us/library/gg252010.aspx

Wednesday, May 18, 2011

SharePoint 2010 Feature Creation - Element.xml


Important files that we need to have an Idea:

http://msdn.microsoft.com/en-us/library/ms460194.aspx   CustomAction Element
http://msdn.microsoft.com/en-us/library/bb802730.aspx   Default Custom Action Locations and IDs
http://msdn.microsoft.com/en-us/library/ee537543.aspx CommandUIDefinition: Default Server Ribbon Customization Locations
http://msdn.microsoft.com/en-us/library/ms465980.aspx Custom Action Definition Schema
http://msdn.microsoft.com/en-us/library/ff458373.aspx Command UI Definition // Button, Tab, checkBox code ...



<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
    Id="NewUIRibbonControl"
    RegistrationType="List"
    RegistrationId="101"
    Location="CommandUI.Ribbon">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
           Location="Ribbon.Documents.New.Controls._children">
          <Button
             Id="NewUIRibbonControl.ShowHelp"
             Alt="Help"
             Sequence="1981"
             Command="ShowHelp"
             Image32by32="/_layouts/images/helpicon.gif"
             LabelText="Help"
             TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
         Command="ShowHelp"
         CommandAction="javascript:window.open('http://msdn.microsoft.com/en-us/library/ee539395%28office.14%29.aspx');" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>

<CustomAction Id="Ribbon.Library.Actions.ReplacementButton"
    Location="CommandUI.Ribbon"
    RegistrationId="101"
    RegistrationType="List"
    Title="Replace a Ribbon Button">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
          Location="Ribbon.Library.Actions.ConnectToClient">
          <Button Id="Ribbon.Library.Actions.ConnectToClient.ReplacementButton"
            Command="ReplacementButtonCommand"
            Image16by16="/_layouts/images/actionseditpage16.gif"
            Image32by32="/_layouts/images/actionssettings.gif"
            LabelText="Replaced Button"
            TemplateAlias="o2" />
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="ReplacementButtonCommand"
          CommandAction="javascript:alert('This button has been replaced.');" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>


 <CustomAction
   Id="MyCustomRibbonTab"
   Location="CommandUI.Ribbon.ListView"
   RegistrationId="101"
   RegistrationType="List">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
          Location="Ribbon.Tabs._children">
          <Tab
            Id="Ribbon.CustomTabExample"
            Title="My Custom Tab"
            Description="This holds my custom commands!"
            Sequence="501">
            <Scaling
              Id="Ribbon.CustomTabExample.Scaling">
              <MaxSize
                Id="Ribbon.CustomTabExample.MaxSize"
                GroupId="Ribbon.CustomTabExample.CustomGroupExample"
                Size="OneLargeTwoMedium"/>
              <Scale
                Id="Ribbon.CustomTabExample.Scaling.CustomTabScaling"
                GroupId="Ribbon.CustomTabExample.CustomGroupExample"
                Size="OneLargeTwoMedium" />
            </Scaling>
            <Groups Id="Ribbon.CustomTabExample.Groups">
              <Group
                Id="Ribbon.CustomTabExample.CustomGroupExample"
                Description="This is a custom group!"
                Title="Custom Group"
                Sequence="52"
                Template="Ribbon.Templates.CustomTemplateExample">
                <Controls Id="Ribbon.CustomTabExample.CustomGroupExample.Controls">
                  <Button
                    Id="Ribbon.CustomTabExample.CustomGroupExample.HelloWorld"
                    Command="CustomTabExample.HelloWorldCommand"
                    Sequence="15"
                    Description="Says hello to the World!"
                    LabelText="Hello, World!"
                    TemplateAlias="cust1"/>
                  <Button
                    Id="Ribbon.CustomTabExample.CustomGroupExample.GoodbyeWorld"
                    Command="CustomTabExample.GoodbyeWorldCommand"
                    Sequence="17"
                    Description="Says good-bye to the World!"
                    LabelText="Good-bye, World!"
                    TemplateAlias="cust2"/>
                  <Button
                    Id="Ribbon.CustomTabExample.CustomGroupExample.LoveWorld"
                    Command="CustomTabExample.LoveWorldCommand"
                    Sequence="19"
                    Description="Says I love the World!"
                    LabelText="I love you, World!"
                    TemplateAlias="cust3"/>
                </Controls>
              </Group>
            </Groups>
          </Tab>
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Ribbon.Templates.CustomTemplateExample">
            <Layout
              Title="OneLargeTwoMedium"
              LayoutTitle="OneLargeTwoMedium">
              <Section Alignment="Top" Type="OneRow">
                <Row>
                  <ControlRef DisplayMode="Large" TemplateAlias="cust1" />
                </Row>
              </Section>
              <Section Alignment="Top" Type="TwoRow">
                <Row>
                  <ControlRef DisplayMode="Medium" TemplateAlias="cust2" />
                </Row>
                <Row>
                  <ControlRef DisplayMode="Medium" TemplateAlias="cust3" />
                </Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="CustomTabExample.HelloWorldCommand"
          CommandAction="javascript:alert('Hello, world!');" />
        <CommandUIHandler
          Command="CustomTabExample.GoodbyeWorldCommand"
          CommandAction="javascript:alert('Good-bye, world!');" />
        <CommandUIHandler
          Command="CustomTabExample.LoveWorldCommand"
          CommandAction="javascript:alert('I love you, world!');" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>



</Elements>

Tuesday, May 17, 2011

How to add a user to a SharePoint Group & Feature Stapling

How to create a feature with feature stapplingin SharePoint?

1) Open a new sharepoint visual studio 2010 project

2) Make your feature as normal

3) Find the site definition id you want to staple your feature to

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML\webtemp*.xml
4) Create a new module, call it "Stapling" or something

5) Insert this into the module file, replacing the site definition template name and feature guid:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <FeatureSiteTemplateAssociation Id="FEATUREGUID" TemplateName="YOURSITETEMPLATE#0" />
</Elements>
6) A new feature should have been created for "Stapling", but if it has not, create it and the Stapling module to it

7) Set the deployment scope to "Farm"

8) You should have 2 features in your project now

9) Package and deploy


--

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Microsoft.SharePoint;

namespace AddUsers
{
class AddUserClass
{
static void Main(string[] args)
{

SPSite siteCollection = new SPSite(“Site URL”);
SPWeb site = siteCollection.OpenWeb();

SPGroup AddUserGroup = site.Groups["Group Name"];
AddUserGroup.AddUser(“domain/alias”, “email address”, “Name”, “Description”);

OR

SPRoleAssignment MyRoleAssign = new SPRoleAssignment(“domain/alias”, “email address”, “Name”, “Description”);

SPRoleDefinition MyRoleDef = newSubWeb.RoleDefinitions["Contribute"];
MyRoleAssign.RoleDefinitionBindings.Add(MyRoleDef);
site.RoleAssignments.Add(MyRoleAssign);

site.Dispose();
siteCollection.Dispose();
}
}
}

Monday, May 9, 2011

Moving Content Database from One Site to Other Site / One Env to Other Environment


In our source server, let us do the following steps: 


1. In the Command Prompt, let us change to the directory where the STSADM command-line tool is located. By default, it is on C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN. 


2. The next step is to prepare our content database before moving it by setting up the profile and membership synchronization service. It prevents the synchronization service from failing and losing related settings. To do this, let us type the following command, and then press Enter: 


STSADM –o preparetomove –contentdb <content database name>

stsadm -o preparetomove -ContentDB Usildb218-qa:WSS_Content_sales_Prod


3. Now, let us detach our content database by executing the command below. We have to take note, however, that removing the content database simply removes the association of the database with our SharePoint Web application and does not exactly delete the database. 


STSADM -o deletecontentdb –url <URL name> -databasename <database name> -databaseserver <database server name> 


stsadm -o deletecontentdb -url "https://kmqa.ca.com/sales" -databasename WSS_Content_sales_Prod -databaseserver usildb218-qa


4. Let us open our Microsoft SQL Server 2008 Management Studio, and detach the content database. Finally, we will copy the corresponding .mdf and .ldf files to our destination server. 


In our destination server, let us do the following steps: 


NOTE: It is assumed that you have created a corresponding Web site in you destination server and deleted its content database – like what we have did in steps 2 and 3. With this, we are now ready to restore/move the content database of our source server to the destination server. Thanks Amlan for the comment. 


5. Let us open our Microsoft SQL Server 2008 Management Studio, and attach the content database that we transferred in the previous step. 


6. In the Command Prompt, let us change to the directory where the STSADM command-line tool is located. By default, it is on C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN. 


7. Now, to add the content database to our destination server, let us type the following command, and then press Enter: 


STSADM –o addcontentdb –url <URL name> -databasename <database name> -databaseserver <database server name> 






stsadm -o addcontentdb -url "http://kmdev.ca.com/sales" -databasename "WSS_Content_sales_Prod" -databaseserver "usildb218-qa"


8. And finally let us start a full crawl. We must be aware, moreover, that a full crawl will occur the first time even if the next crawling scheduled is set to incremental mode in the content database we have restored.




Wednesday, April 6, 2011

STSADM Equivalent Commands in Powershell

This article lists Stsadm operations and their equivalent Windows PowerShell cmdlets. Where there is no one-to-one mapping between the operations and cmdlets, the table lists the specific Windows PowerShell parameters you must use to get the same functionality.

 

 

Stsadm operation Windows PowerShell cmdlet
Activatefeature Enable-SPFeature
Activateformtemplate Enable-SPInfoPathFormTemplate
Addalternatedomain New-SPAlternateUrl
Addcontentdb Mount-SPContentDatabase
New-SPContentDatabase
Adddataconnectionfile Install-SPDataConnectionFile
Add-ecsfiletrustedlocation New-SPExcelFileLocation
Add-ecssafedataprovider New-SPExcelDataProvider
Add-ecstrusteddataconnectionlibrary New-SPExcelDataConnectionLibrary
Add-ecsuserdefinedfunction New-SPExcelUserDefinedFunction
Addexemptuseragent Add-SPInfoPathUserAgent
Addpath New-SPManagedPath
Addpermissionpolicy None
Addsolution Add-SPSolution
Addtemplate Install-SPWebTemplate
Adduser New-SPUser
Addwppack Install-SPWebPartPack
Addzoneurl New-SPAlternateUrl
Allowuserformwebserviceproxy Set-SPInfoPathWebServiceProxy
Use the AllowForUserForms and Identity parameters.
Allowwebserviceproxy Set-SPInfoPathWebServiceProxy
Use the AllowWebServiceProxy and Identity parameters.
Authentication Set-SPWebApplication
Use the AuthenticationMethod or AuthenticationProvider parameters.
Backup Backup-SPConfigurationDatabase
Backup-SPFarm
Backup-SPSite
Backuphistory Get-SPBackupHistory
Binddrservice None
Blockedfilelist None
Canceldeployment None
Changepermissionpolicy None
Copyappbincontent None
Createadminvs New-SPCentralAdministration
Creategroup None
Createsite New-SPSite
Createsiteinnewdb New-SPSite Use the ContentDatabase parameter.
New-SPContentDatabase
Createweb New-SPWeb
Databaserepair None
Deactivatefeature Disable-SPFeature
Deactivateformtemplate Disable-SPInfoPathFormTemplate
Deleteadminvs None
Deletealternatedomain Remove-SPAlternateUrl
Deleteconfigdb Remove-SPConfigurationDatabase
Deletecontentdb Dismount-SPContentDatabase
Deletegroup None
Deletepath Remove-SPManagedPath
Deletepermissionpolicy None
Deletesite Remove-SPSite
Deletesolution Remove-SPSolution
Deletetemplate Uninstall-SPWebTemplate
Deleteuser Remove-SPUser
Deleteweb Remove-SPWeb
Deletewppack Uninstall-SPWebPartPack
Deletezoneurl Remove-SPAlternateUrl
Deploysolution Install-SPSolution
Deploywppack Install-SPWebPartPack
Disablessc None
Displaysolution Get-SPSolution
Editcontentdeploymentpath Set-SPContentDeploymentPath
Email None
Enablessc None
Enumalternatedomains Get-SPAlternateURL
Enumcontentdbs Get-SPContentDatabase
Enumdataconnectionfiledependants Get-SPDataConnectionFileDependent
Enumdataconnectionfiles Get-SPDataConnectionFile
Enumdeployments None
Enumexemptuseragents Get-SPInfoPathUserAgent
Enumformtemplates Get-SPInfoPathFormTemplate
Enumgroups None
Enumroles None
Enumservices Get-SPServiceInstance
Enumsites Get-SPSiteAdministration (To run this cmdlet, you must be a member of the Farm Administrators group.)
Get-SPSite (To run this cmdlet, you must be a local administrator on the computer where SharePoint 2010 Products is installed.)
Enumsolutions Get-SPSolution
Enumsubwebs Get-SPWeb
Enumtemplates Get-SPWebTemplate
Enumusers Get-SPUser
Enumwppacks Get-SPWebPartPack
Enumzoneurls Get-SPAlternateURL
Execadmsvcjobs Start-SPAdminJob
Export Export-SPWeb
Extendvs New-SPWebApplication
Extendvsinwebfarm New-SPWebApplicationExtension
Forcedeletelist None
Getadminport Get-SPWebApplication
Use the following syntax:
  • Get-SPWebApplication -IncludeCentralAdministration | ? {$_.IsAdministrationWebApplication -eq $true}
Getdataconnectionfileproperty propertyGet-SPDataConnectionFile
Use the following syntax:
  • Get-SPDataConnectionFile | where {$_.Name -eq "dataConFileName"} | format-list
Getformtemplateproperty propertyGet-SPInfoPathFormTemplate
Use the following syntax:
  • Get-SPInfoPathFormTemplate | where {$_.DisplayName -eq "formTemplateName"} | format-list
Getosearchsetting None
Getproperty Get-SPFarmConfig
Get-SPTimerJob
Disable-SPTimerJob
Enable-SPTimerJob
Set-SPTimerJob
Start-SPTimerJob
Getsitelock Get-SPSiteAdministration
Getsiteuseraccountdirectorypath None
Geturlzone Get-SPAlternateURL
Import Import-SPWeb
Installfeature Install-SPFeature
Listlogginglevels Get-SPLogLevel
Listqueryprocessoroptions None
Listregisteredsecuritytrimmers Get-SPEnterpriseSearchSecurityTrimmer
Localupgradestatus None
Managepermissionpolicylevel None
Mergecontentdbs Move-SPSite
Migrateuser Move-SPUser
Osearch
For the Osearch parameters farmcontactemail, farmperformancelevel, farmserviceaccount, and farmservicepassword, use the Get-SPEnterpriseSearchService and Set-SPEnterpriseSearchService cmdlets.
For the Osearch parameters start and stop, use the Start-SPEnterpriseSearchServiceInstance and Stop-SPEnterpriseSearchServiceInstance cmdlets, respectively.
For the Osearch parameter defaultindexlocation, use the Get-SPEnterpriseSearchServiceInstance and Set-SPEnterpriseSearchServiceInstance cmdlets.
Osearchdiacriticsensitive
Use the Get-SPEnterpriseSearchServiceApplication cmdlet to retrieve the specific Search service application, and then use DiacriticSensitive parameter from the Set-SPEnterpriseSearchServiceApplication cmdlet.
Provisionservice Start-SPServiceInstance
Quiescefarm None
Quiescefarmstatus None
Quiesceformtemplate Stop-SPInfoPathFormTemplate
Reconvertallformtemplates Update-SPInfoPathFormTemplate
Refreshdms None
Refreshsitedms None
Registersecuritytrimmer New-SPEnterpriseSearchSecurityTrimmer
Registerwsswriter None
Removedataconnectionfile Uninstall-SPDataConnectionFile
Remove-ecsfiletrustedlocation Remove-SPExcelFileLocation
Remove-ecssafedataprovider Remove-SPExcelDataProvider
Remove-ecstrusteddataconnectionlibrary Remove-SPExcelDataConnectionLibrary
Remove-ecsuserdefinedfunction Remove-SPExcelFileLocation
Removedrservice None
Removeexemptuseragent Remove-SPInfoPathUserAgent
Removeformtemplate Uninstall-SPInfoPathFormTemplate
Removesolutiondeploymentlock None
Renameserver Rename-SPServer
Renamesite Set-SPSite
Use the Url parameter.
Renameweb Set-SPWeb
Use the RelativeUrl parameter.
Restore Restore-SPFarm
Restore-SPSite
Retractsolution Uninstall-SPSolution
Retractwppack None
Runcontentdeploymentjob

Start-SPContentDeploymentJob
Scanforfeatures Install-SPFeature
Use the Scanforfeatures parameter.
Setadminport Set-SPCentralAdministration
Setapppassword None
Setconfigdb Connect-SPConfigurationDatabase
Setcontentdeploymentjobschedule Set-SPContentDeploymentJob
Setdataconnectionfileproperty Set-SPDataConnectionFile
Set-ecsexternaldata Set-SPExcelFileLocation
Set-ecsloadbalancing Set-SPExcelServiceApplication
Use the LoadBalancingScheme parameter.
Set-ecsmemoryutilization Set-SPExcelServiceApplication
Use the MemoryCacheThreshold and PrivateBytesMax parameters.
Set-ecssecurity Set-SPExcelServiceApplication
Use the CrossDomainAccessAllowed, EncryptedUserConnectionRequired, and FileAccessMethod parameters.
Set-ecssessionmanagement Set-SPExcelServiceApplication
Use the SessionsPerUserMax and SiteCollectionAnonymousSessionsMax parameters.
Set-ecsworkbookcache Set-SPExcelServiceApplication
Use the Workbookcache and WorkbookCacheSizeMax parameters.
Setformtemplateproperty Set-SPInfoPathFormTemplate
Setlogginglevel Set-SPLogLevel
Setosearchsetting None
Setproperty Set-SPFarmConfig
Get-SPTimerJob
Disable-SPTimerJob
Enable-SPTimerJob
Set-SPTimerJob
Start-SPTimerJob
Setqueryprocessoroptions None
Setsitelock Set-SPSiteAdministration
Use the LockState parameter.
Setsiteuseraccountdirectorypath Get-SPSiteSubscription
New-SPSiteSubscription
Remove-SPSiteSubscription
Setworkflowconfig Set-SPWorkflowConfig
Siteowner Set-SPSiteAdministration
Syncsolution Install-SPSolution
Use the Synchronize parameter.
Unextendvs Remove-SPWebApplication
Uninstallfeature Uninstall-SPFeature
Unquiescefarm None
Unquiesceformtemplate Start-SPInfoPathFormTemplate
Unregistersecuritytrimmer Remove-SPEnterpriseSearchSecurityTrimmer
Unregisterwsswriter None
Updateaccountpassword Set-SPManagedAccount
Updatealerttemplates None
Updatefarmcredentials None
Upgrade None
Upgradeformtemplate Install-SPInfoPathFormTemplate
Upgradesolution Update-SPSolution
Upgradetargetwebapplication None
Uploadformtemplate Install-SPInfoPathFormTemplate
Userrole Get-SPUser
Move-SPUser
New-SPUser
Remove-SPUser
Set-SPUser
Verifyformtemplate Test-SPInfoPathFormTemplate