Monday, August 11, 2014

Social media buttons

<a href="//www.pinterest.com/pin/create/button/?url=http%3A%2F%2Fwww.flickr.com%2Fphotos%2Fkentbrew%2F6851755809%2F&media=http%3A%2F%2Ffarm8.staticflickr.com%2F7027%2F6851755809_df5b2051c9_z.jpg&description=Next%20stop%3A%20Pinterest" data-pin-do="buttonPin" data-pin-config="above"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a>
<!-- Please call pinit.js only once per page -->
<script type="text/javascript" async src="//assets.pinterest.com/js/pinit.js"></script>

<!-- Place this tag where you want the share button to render. -->
<div class="g-plus" data-action="share" data-annotation="none"></div>

<!-- Place this tag after the last share tag. -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/platform.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

<a href="http://www.tumblr.com/share" title="Share on Tumblr" style="display:inline-block; text-indent:-9999px; overflow:hidden; width:129px; height:20px; background:url('http://platform.tumblr.com/v1/share_3.png') top left no-repeat transparent;">Share on Tumblr</a>

<a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-like" data-href="http://sp13dev01:4444/Pages/socialtest.aspx" data-layout="button" data-action="like" data-show-faces="true" data-share="true"></div>

Sunday, June 22, 2014

SharePoint Foundation Field Types


Field Type
 Display Name
Text
 Single Line Of Text
 Note
 Multiple Lines Of Text
 Choice
 Choice
 Integer
 Integer
 Number
 Number
 Decimal
 Decimal
 Currency
 Currency
 DateTime
 Date And Time
 Lookup
 Lookup
 Boolean
 Yes/No
 User
 Person Or Group
 URL
 Hyperlink Or Picture
 Calculated
 Calculated

SharePoint Foundation List Templates

Template Name
 Template Type
 Template Type ID
Custom List
 GenericList
100
 Document Library
 DocumentLibrary
101
 Survey
 Survey
102
 Links List
 Links
103
 Announcements List
 Announcements
104
 Contacts List
 Contacts
105
 Calendar
 Events
106
 Tasks List
 Tasks
107
 Discussion Lists
 DiscussionBoard
108
 Picture Library
 PictureLibrary
109
 Form Library
 XMLForm
115
 Wiki Page Library
 WebPageLibrary
119

Useful resources on SharePoint administration

Programming custom editor part SharePoint 2013

Programming custom editor part SharePoint 2013


This example shows how to create a custom editor part.
In the editor part, a ListBox control is binded to the list of the Lists in the current web and on selecting multiple lists, all the items from all the lists aggregated are shown in the webpart as depicted below.



Below is the code for custom webpart class with properties having the [WebBrowsable(false)]
-------------------------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Collections.Generic;

namespace DemoEditorParts.DisplayMultipleItems
{
    [ToolboxItemAttribute(false)]
    public class DisplayMultipleItems : WebPart
    {

        private List<string> listIDs;

        [WebBrowsable(false)]
        [WebDescription("Multiple Lists")]
        [Personalizable(PersonalizationScope.Shared)]
        public List<string> ListIDs
        {
            get
            {
                return listIDs;
            }
            set
            {

                listIDs = value;
            }
        }

        Dictionary<string, List<string>> allItemTitles = new Dictionary<string, List<string>>();

        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            try
            {

                if (null == ListIDs)
                {
                    return;
                }
                SPWeb currentWeb = SPContext.Current.Web;

                foreach (var listId in ListIDs)
                {
                    SPList list = currentWeb.Lists[new Guid(listId)];
                    if (null == list)
                    {
                        continue;
                    }
                    if (!allItemTitles.ContainsKey(list.Title))
                    {
                        allItemTitles.Add(list.Title, new List<string>());
                    }
                    SPListItemCollection allItems = list.Items;
                    foreach (SPListItem item in allItems)
                    {
                        allItemTitles[list.Title].Add(item.Title);
                    }
                }


            }
            catch (Exception ex)
            {
                this.Controls.Add(new LiteralControl(ex.Message));
            }
        }

        protected override void RenderContents(HtmlTextWriter writer)
        {
            base.RenderContents(writer);
            foreach (var list in allItemTitles)
            {
                writer.RenderBeginTag(HtmlTextWriterTag.Ul);
                writer.Write(list.Key);
                foreach (var title in list.Value)
                {
                    writer.RenderBeginTag(HtmlTextWriterTag.Li);
                    writer.Write(title);
                    writer.RenderEndTag();
                }
                writer.RenderEndTag();
            }
        }

        public override EditorPartCollection CreateEditorParts()
        {
            List<EditorPart> editors = new List<EditorPart>();
            DisplayListsEditorPart editor = new DisplayListsEditorPart();
            editor.ID = this.ID + "_DisplayListsEditorPart";
            editor.Title = "Display Lists EditorPart";
            editors.Add(editor);

            return new EditorPartCollection(base.CreateEditorParts(), editors);
        }

    }
}
----------------------------------------------------------------------------------------
The below is the code for custom editor part
---------------------------------------------------------------------------------------

using Microsoft.SharePoint;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;


namespace DemoEditorParts
{
    public class DisplayListsEditorPart : EditorPart
    {
        private ListBox drpLists;

        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            drpLists = new ListBox();
            drpLists.SelectionMode = ListSelectionMode.Multiple;
            drpLists.ToolTip = "All Lists";

            SPWeb currentWeb = SPContext.Current.Web;
            SPListCollection allLists = currentWeb.Lists;

            foreach (SPList list in allLists)
            {
                drpLists.Items.Add(new ListItem()
                {
                    Text = list.Title,
                    Value = list.ID.ToString()
                });
            }
            this.Controls.Add(drpLists);
        }

        public override bool ApplyChanges()
        {
            EnsureChildControls();
            DisplayMultipleItems.DisplayMultipleItems webpart
                = this.WebPartToEdit as DisplayMultipleItems.DisplayMultipleItems;

            ListItemCollection drpItems = drpLists.Items;
            List<string> selectedItems = new List<string>();
            foreach (ListItem item in drpItems)
            {
                if (item.Selected)
                {
                    selectedItems.Add(item.Value);
                }
            }
            webpart.ListIDs = selectedItems;
            return true;
        }
        public override void SyncChanges()
        {
            EnsureChildControls();
            DisplayMultipleItems.DisplayMultipleItems webpart
               = this.WebPartToEdit as DisplayMultipleItems.DisplayMultipleItems;
            List<string> lists = webpart.ListIDs;
            if (null == drpLists)
            {
                return;
            }
            ListItemCollection drpItems = drpLists.Items;
            if (null == lists)
            {
                return;
            }
            foreach (var list in lists)
            {
                ListItem drpItem =
                    drpItems.FindByValue(list);
                if (null == drpItem)
                {
                    continue;
                }
                drpItem.Selected = true;
            }
        }
    }
}

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




Custom Editor Part skeleton

The below code block shows the custom editor part skeleton.

 public class CustomEditorPart : EditorPart     { 
        public CustomEditorPart()             : base()         {         } 
        protected override void CreateChildControls()         {
            base.CreateChildControls();       
   
        public override bool ApplyChanges()         {
             EnsureChildControls();            
  return true;        
 
        public override void SyncChanges()         {            
  EnsureChildControls();        
  }    
}

Webpart properties [WebBrowsable(true)]


The following controls are generated for the webpart properties OOB for each property type when [WebBrowsable(true)] attribute is used for the webpart property

Type
Control
Boolean
Checkbox
String
TextBox
Enum
DropDown
Int, Float
TextBox
DateTime
TextBox
Unit
TextBox

Webpart Zone

The following are the modes which are available for every webpart placed inside a webpart zone.

• Browse: This is default mode, showing the final page layout.
Design: In this mode, you can minimize or move Web Parts.
Edit: In this mode, you can edit the properties of the currently selected Web Part.
Catalog: This mode shows additional Web Parts that you can add to any zone.

Connect: This mode allows you to add data connections between Web Parts. 

SharePoint Webpart Life cycle events

SharePoint Webpart Life cycle events

Event
 Source
Description
OnInit
 Control
 Fired after initialization.
OnLoad
 Control
 Fired after loading is completed.
CreateChildControls
 Control
 Creates child controls.
EnsureChildControls
 Control
 Called to ensure that CreateChildControls has executed.
OnPreRender
 Control
 Fired after all internal processing and before the controls render. This is the last step you can use to modify controls.
PreRenderComplete
 Page
 Fires if the page is executed asynchronously , and shows that rendering can be completed.
Render
 Control
 Renders the Web Part,  including the outer elements and chrome. RenderContents Control Renders the Web Part inside the outer elements and with styles,  but no chrome


Page Life cycle vs Webpart Life cycle


Friday, June 20, 2014

SharePoint FAQs - Part1 - Append your answers here

1)      What is SharePoint?
2)      What is List?
3)      What is Content type?
4)      What is ListItem?
5)      Difference between listitem and content type
6)      Difference between list and library
7)      Pros and Cons of storing data in table vs list
8)      Item.update() vs item.SystemUpdate()
9)      SPSecurity.RunWithElewatedPriveleges(); code block runs with user account
10)   When do you dispose objects for SPSite? Or new SPSite() vs SPContext.Current.Site
11)   What are the different types of Event receivers?
12)   What are features and their scopes?
13)   What are master pages, page layouts?
14)   Difference between Site pages and Application pages
15)   What is Event bubbling?
16)   How to redirect to error page from Event receiver?
17)   Differences in execution of Synchronous and Asynchronous events
18)   How to cancel and event in event receiver?
19)   In which process does timer jobs execute?
20)   How to enable debugging in web.config? How to debug farm solutions?
21)   What is worker process? How to know worker process corresponding to SharePoint Web application?
22)   What are service applications?
23)   What are Custom actions in SharePoint?
24)   What are Sandboxed solutions and how to debug them?
25)   What are full trust proxies or Hybrid solutions and how to debug them?
26)   Differences between farm solutions and sandboxed solutions?
27)   What is Claims authentication?
28)   What is Forms Based Authentication? What is the difference between MOSS 2007 and SP 2010 in configuring FBA?
29)   What is the difference between classic mode and claims mode authentication?
30)   Difference between NTLM and Kerberos authentication?
31)   Can we send email in Sandboxed solutions? Limitations of Sandboxed solutions.
32)   What is client object model and its types?
33)   Difference between Load and LoadQuery in Client object model?
34)   Explain the Information Architecture?

35)   How do you deploy the SharePoint solutions?

Thursday, June 19, 2014

stsadm complete help reference

stsadm complete help reference 


stsadm.exe -o activatefeature
           {-filename <relative path to Feature.xml> |
            -name <feature folder> |
            -id <feature Id>}
           [-url <url>]
           [-force]

stsadm -o activateformtemplate
-url <URL to the site collection>
[-formid <form template ID>]
[-filename <path to form template file>]

stsadm.exe -o addalternatedomain
           -url <protocol://existing.WebApplication.URLdomain>
           -incomingurl <protocol://incoming.url.domain>
           -urlzone <default, extranet, internet, intranet, custom>

or

stsadm.exe -o addalternatedomain
           -resourcename <non-web application resource name>
           -incomingurl <protocol://incoming.url.domain>
           -urlzone <default, extranet, internet, intranet, custom>

stsadm.exe -o addcontentdb
           -url <url>
           -databasename <database name>
           [-databaseserver <database server name>]        
           [-databaseuser <database username>]
           [-databasepassword <database password>]
           [-sitewarning <site warning count>]
           [-sitemax <site max count>]
           [-assignnewdatabaseid]
           [-clearchangelog]
           [-forcedeletelock]
           [-preserveolduserexperience <true|false>]

stsadm -o adddataconnectionfile
-filename <path to file to add>
[-webaccessible <bool>]
[-overwrite <bool>]
[-category <bool>]

stsadm -o add-ecsfiletrustedlocation

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o add-ecssafedataprovider

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o add-ecstrusteddataconnectionlibrary

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o add-ecsuserdefinedfunction

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o addexemptuseragent
-name <user-agent to receive InfoPath files instead of a Web page>

stsadm.exe -o addpath
           -url <url>
           -type <explicitinclusion/wildcardinclusion>

stsadm.exe -o addpermissionpolicy
           -url <url>
           -userlogin <login name>
           -permissionlevel <permission policy level>
           [-zone <URL zone>]
           [-username <display name>]

stsadm.exe -o addsolution
            -filename <Solution filename>
            [-lcid <language>]

stsadm.exe -o addtemplate
           -filename <template filename>
           -title <template title>
           [-description <template description>]

stsadm.exe -o adduser
           -url <url>
           -userlogin <DOMAIN\user>
           -useremail <someone@example.com>
           -role <role name> / -group <group name>
           -username <display name>
           [-siteadmin]

stsadm.exe -o addwppack
                   -filename <Web Part Package filename>
                   [-lcid <language>]
                   [-url <url>]
                   [-allowfulltrustbindlls]
                   [-globalinstall]
                   [-force]
                   [-nodeploy]
     
        stsadm.exe -o addwppack
                   -name <name of Web Part Package>
                   [-lcid <language>]
                   [-url <url>]
                   [-allowfulltrustbindlls]
                   [-globalinstall]
                   [-force]

stsadm.exe -o addzoneurl
           -url <protocol://existing.WebApplication.URLdomain>
           -urlzone <default, extranet, internet, intranet, custom>
           -zonemappedurl <protocol://outgoing.url.domain>
           [-redirectionurl <protocol://redirect.url.domain> ]

or

stsadm.exe -o addzoneurl
           -resourcename <non-web application resource name>
           -urlzone <default, extranet, internet, intranet, custom>
           -zonemappedurl <protocol://outgoing.url.domain>
           [-redirectionurl <protocol://redirect.url.domain> ]

stsadm -o allowuserformwebserviceproxy
-url <Url of the web application>
-enable <true to enable, false to disable>

stsadm -o allowwebserviceproxy
-url <Url of the web application>
-enable <true to enable, false to disable>

stsadm.exe -o authentication
           -url <url>
           -type <windows/forms/websso>
           [-usebasic (valid only in windows authentication mode)]
           [-usewindowsintegrated (valid only in windows authentication mode)]
           [-exclusivelyusentlm (valid only in windows authentication mode)]
           [-membershipprovider <membership provider name>]
           [-rolemanager <role manager name>]
           [-enableclientintegration]
           [-allowanonymous]

For site collection backup:
    stsadm.exe -o backup
           -url <url>
           -filename <filename>
           [-overwrite]
           [-nositelock]
           [-usesqlsnapshot]

For catastrophic backup:
    stsadm.exe -o backup
           -directory <UNC path>
           -backupmethod <full | differential>
           [-item <created path from tree>]
           [-percentage <integer between 1 and 100>]
           [-backupthreads <integer between 1 and 10>]
           [-showtree]
           [-configurationonly]
           [-quiet]
           [-force]

stsadm.exe -o backuphistory
           -directory <UNC path>
           [-backup]
           [-restore]

stsadm.exe -o binddrservice
           -servicename <data retrieval service name>
           -setting <data retrieval services setting>

stsadm.exe -o blockedfilelist
           -extension <extension>
           -add
           [-url <url>]    

stsadm.exe -o blockedfilelist
         -extension <extension>
         -delete
         [-url <url>]

stsadm.exe -o canceldeployment
            -id <id>

stsadm.exe -o changepermissionpolicy
           -url <url>
           -userlogin <DOMAIN\name>
           [-zone <URL zone>]
           [-username <display name>]
           [{ -add | -delete }
                 -permissionlevel <permission policy level>]

stsadm.exe -o copyappbincontent

stsadm.exe -o createadminvs
           [-admapidname <app pool name>]
           [-admapidtype <configurableid/NetworkService>]
           [-admapidlogin <DOMAIN\name>]
           [-admapidpwd <app pool password>]

stsadm.exe -o creategroup
           -url <url>
           -name <group name>
           -description <description>
           -ownerlogin <DOMAIN\name or group name>
           [-type member|visitor|owner]

stsadm.exe -o createsite
           -url <url>
           -owneremail <someone@example.com>
           [-ownerlogin <DOMAIN\name>]
           [-ownername <display name>]
           [-secondaryemail <someone@example.com>]
           [-secondarylogin <DOMAIN\name>]
           [-secondaryname <display name>]
           [-lcid <language>]
           [-sitetemplate <site template>]
           [-title <site title>]
           [-description <site description>]
           [-hostheaderwebapplicationurl <web application url>]
           [-quota <quota template>]

stsadm.exe -o createsiteinnewdb
           -url <url>
           -owneremail <someone@example.com>
           [-ownerlogin <DOMAIN\name>]
           [-ownername <display name>]
           [-secondaryemail <someone@example.com>]          
           [-secondarylogin <DOMAIN\name>]
           [-secondaryname <display name>]
           [-lcid <language>]
           [-sitetemplate <site template>]
           [-title <site title>]
           [-description <site description>]
           [-hostheaderwebapplicationurl <web application url>]
           [-quota <quota template>]
           [-databaseuser <database username>]
           [-databasepassword <database password>]
           [-databaseserver <database server name>]
           [-databasename <database name>]

stsadm.exe -o createweb
           -url <url>
           [-lcid <language>]
           [-sitetemplate <site template>]
           [-title <site title>]
           [-description <site description>]
           [-convert]
           [-unique]

stsadm.exe -o databaserepair
           -url <url>
           -databasename <database name>
           [-deletecorruption]

stsadm.exe -o deactivatefeature
           {-filename <relative path to Feature.xml> |
            -name <feature folder> |
            -id <feature Id>}
           [-url <url>]
           [-force]

stsadm -o deactivateformtemplate
-url <URL to the site collection>
[-formid <form template ID>]
[-filename <path to form template file>]

stsadm.exe -o deleteadminvs

stsadm.exe -o deletealternatedomain
           -url <ignored>
           -incomingurl <protocol://incoming.url.domain>

stsadm.exe -o deleteconfigdb

stsadm.exe -o deletecontentdb
           -url <url>
           -databasename <database name>
           [-databaseserver <database server name>]

stsadm.exe -o deletegroup
           -url <url>
           -name <group name>

stsadm.exe -o deletepath
           -url <url>

stsadm.exe -o deletepermissionpolicy
           -url <url>
           -userlogin <login name>
           [-zone <URL zone>]

stsadm.exe -o deletesite
          [-url <url>
           -deleteadaccounts <true/false>]
          [-force
           -siteid <site id>
           -databasename <database name>
           -databaseserver <database server name>]
          [-gradualdelete]
          [-deleteformigration]

stsadm.exe -o deletesolution
            -name <Solution name>
            [-override]
            [-lcid <language>]

stsadm.exe -o deletetemplate
           -title <template title>
           [-lcid <language>]

stsadm.exe -o deleteuser
           -url <url>
           -userlogin <DOMAIN\name>
           [-group <group>]

stsadm.exe -o deleteweb
           [-url <url>]
           [-recycle
           [-force
            -webid <web id>
            -databasename <database name>
            -databaseserver <database server name>]

stsadm.exe -o deletewppack
           -name <name of Web Part Package>
           [-lcid <language>]
           [-url <url>]

stsadm.exe -o deletezoneurl
           -url <protocol://existing.WebApplication.URLdomain>
           -urlzone <default, extranet, internet, intranet, custom>

or

stsadm.exe -o deletezoneurl
           -resourcename <non-web application resource name>
           -urlzone <default, extranet, internet, intranet, custom>


stsadm.exe -o deploysolution
            -name <Solution name>
           [-url <virtual server url>]
           [-allcontenturls]
           [-time <time to deploy at>]
           [-immediate]
           [-local]
           [-allowgacdeployment]
           [-allowfulltrustbindlls]
           [-allowcaspolicies]
           [-lcid <language>]
           [-force]

stsadm.exe -o deploywppack
            -name <Web Part Package name>
           [-url <virtual server url>]
           [-time <time to deploy at>]
           [-immediate]
           [-local]
           [-lcid <language>]
           [-allowfulltrustbindlls]
           [-globalinstall]
           [-force]

stsadm.exe -o disablessc
           -url <url>

stsadm.exe -o displaysolution
            -name <Solution name>

stsadm -o editcontentdeploymentpath
 -pathname <path name>
  [-keeptemporaryfiles Never|Always|Failure]
  [-enableeventreceivers yes|no]
  [-enablecompression yes|no]


stsadm.exe -o email
           -outsmtpserver <SMTP server>
           -fromaddress <someone@example.com>
           -replytoaddress <someone@example.com>
           -codepage <codepage>
           [-url <url>]

stsadm.exe -o enablessc
           -url <url>
           [-requiresecondarycontact]

stsadm.exe -o enumallwebs
           [ -databasename <database name>]
           [ -databaseserver <database server name>]
           [ -includefeatures ]
           [ -includesetupfiles ]
           [ -includewebparts ]
           [ -includeeventreceivers ]
           [ -includecustomlistview ]

stsadm.exe -o enumalternatedomains
           [ -url <protocol://existing.WebApplication.URLdomain> |        
             -resourcename <non-web application resource name>]

stsadm.exe -o enumcontentdbs
           -url <url>

stsadm -o enumdataconnectionfiledependants
-filename <filename for which to enumerate dependants>

stsadm -o enumdataconnectionfiles
[-mode <a | u | all | unreferenced>]

stsadm.exe -o enumdeployments

stsadm -o enumexemptuseragents


stsadm -o enumformtemplates


stsadm.exe -o enumgroups
           -url <url>

stsadm.exe -o enumroles
           -url <url>

stsadm.exe -o enumservices

stsadm.exe -o enumsites
           -url <virtual server url>
           [-showlocks]
           [-databasename <database name>]

stsadm.exe -o enumsolutions

stsadm.exe -o enumsubwebs
           -url <url>

stsadm.exe -o enumtemplates
           [-lcid <language>]

stsadm.exe -o enumusers
           -url <url>

stsadm.exe -o enumwppacks
           [-name <name of Web Part Package>]
           [-url <virtual server url>]
           [-farm]

stsadm.exe -o enumzoneurls
           -url <protocol://existing.WebApplication.URLdomain>
           -resourcename <non-web application resource name>

stsadm.exe -o execadmsvcjobs

stsadm.exe -o export
           -url <URL to be exported>
           -filename <export file name>
               [-overwrite]
           [-includeusersecurity]
           [-haltonwarning]
           [-haltonfatalerror]
           [-nologfile]
           [-versions <1-4>
               1 - Last major version for files and list items (default)
               2 - The current version, either the last major or the last minor
               3 - Last major and last minor version for files and list items
               4 - All versions for files and list items]
           [-cabsize <integer from 1-1024 megabytes> (default: 24)]
           [-nofilecompression]
           [-quiet]
           [-usesqlsnapshot]

stsadm -o exportipfsadminobjects
-filename <path to file>

stsadm.exe -o extendvs
           -url <url>
           -ownerlogin <domain\name>
           -owneremail <someone@example.com>
           -apidname <app pool name>
           -apidtype <configurableid/NetworkService>
           -apidlogin <DOMAIN\name>
           -apidpwd <app pool password>
           [-exclusivelyusentlm]
           [-ownername <display name>]
           [-databaseuser <database user>]
           [-databaseserver <database server>]
           [-databasename <database name>]
           [-databasepassword <database user password>]
           [-lcid <language>]
           [-sitetemplate <site template>]
           [-donotcreatesite]
           [-description <iis web site name>]
           [-sethostheader]
           [-allowanonymous]

stsadm.exe -o extendvsinwebfarm
           -url <url>
           -vsname <web application name>
           [-exclusivelyusentlm]
           [-apidname <app pool name>]
           [-apidtype <configurableid/NetworkService>]
           [-apidlogin <DOMAIN\name>]
           [-apidpwd <app pool password>]
           [-allowanonymous]

stsadm.exe -o forcedeletelist
           -url <url>

stsadm -o formtemplatequiescestatus
[-formid <form template ID>]
[-filename <path to form template file>]

stsadm.exe -o getadminport

stsadm -o getdataconnectionfileproperty
-filename <filename of the data connection file>
-pn <property name>

stsadm -o getformsserviceproperty
-pn <option name>

stsadm -o getformtemplateproperty
[-formid <form template ID>]
[-filename <path to form template file>]
-pn <property name>

stsadm.exe -o getproperty
           -propertyname <property name>
           [-url <url>]

SharePoint cluster properties:
avallowdownload
avcleaningenabled
avdownloadscanenabled
avnumberofthreads
avtimeout
avuploadscanenabled
database-command-timeout
database-connection-timeout
data-retrieval-services-enabled
data-retrieval-services-oledb-providers
data-retrieval-services-response-size
data-retrieval-services-timeout
data-retrieval-services-update
data-source-controls-enabled
dead-site-auto-delete
dead-site-notify-after
dead-site-num-notifications
delete-web-send-email
irmaddinsenabled
irmrmscertserver
irmrmsenabled
irmrmsusead
job-ceip-datacollection
job-config-refresh
job-dead-site-delete
large-file-chunk-size
token-timeout
workflow-cpu-throttle
workflow-eventdelivery-batchsize
workflow-eventdelivery-throttle
workflow-eventdelivery-timeout
workflow-timerjob-cpu-throttle
workitem-eventdelivery-batchsize
workitem-eventdelivery-throttle

SharePoint virtual server properties:
alerts-enabled
alerts-limited
alerts-maximum
change-log-expiration-enabled
change-log-retention-period
clientcallablesettings-enablestacktrace
clientcallablesettings-maxobjectpaths
clientcallablesettings-maxresourceperrequest
data-retrieval-services-enabled
data-retrieval-services-inherit
data-retrieval-services-oledb-providers
data-retrieval-services-response-size
data-retrieval-services-timeout
data-retrieval-services-update
data-source-controls-enabled
days-to-show-new-icon
dead-site-auto-delete
dead-site-notify-after
dead-site-num-notifications
defaultquotatemplate
defaulttimezone
delete-web-send-email
event-log-retention-period
job-audit-log-trimming
job-change-log-expiration
job-dead-site-delete
job-diskquota-warning
job-immediate-alerts
job-recycle-bin-cleanup
job-solution-daily-resource-usage
job-solution-resource-usage-log
job-spapp-statequery
job-storage-metrics-processing
job-upgrade-workitems
job-workflow
job-workflow-autoclean
job-workflow-failover
max-file-post-size
peoplepicker-activedirectorysearchtimeout
peoplepicker-distributionlistsearchdomains
peoplepicker-nowindowsaccountsfornonwindowsauthenticationmode
peoplepicker-onlysearchwithinsitecollection
peoplepicker-peopleeditoronlyresolvewithinsitecollection
peoplepicker-searchadcustomfilter
peoplepicker-searchadcustomquery
peoplepicker-searchadforests
peoplepicker-serviceaccountdirectorypaths
presenceenabled
query-maximumresult
recycle-bin-cleanup-enabled
recycle-bin-enabled
recycle-bin-retention-period
second-stage-recycle-bin-quota
send-ad-email


stsadm -o getsitedirectoryscanschedule


stsadm.exe -o getsitelock
           -url <url>

stsadm.exe -o getsiteuseraccountdirectorypath
           -url <url>

stsadm.exe -o geturlzone
           -url <protocol://incoming.url.domain>

stsadm.exe -o import
           -url <URL to import to>
           -filename <import file name>
           [-includeusersecurity]
           [-haltonwarning]
           [-haltonfatalerror]
           [-activatesolutions]
           [-nologfile]
           [-updateversions <1-3>
               1 - Add new versions to the current file (default)
               2 - Overwrite the file and all its versions (delete then insert)
               3 - Ignore the file if it exists on the destination]
           [-includeusercustomaction <1-2>
               1 - Ignore user custom actions
               2 - Include user custom actions (default)]
           [-nofilecompression]
           [-quiet]

stsadm.exe -o installfeature
           {-filename <relative path to Feature.xml from system feature directory> |
            -name <feature folder>}
           [-force]

stsadm.exe -o listlogginglevels
           [-showhidden]

stsadm -o listregisteredsecuritytrimmers

    -ssp <search application name>

This command displays a hierarchy and the upgrade status of objects in this farm in the order by which they will be upgraded.

stsadm.exe -o managepermissionpolicylevel
           -url <url>
           -name <permission policy level name>
           [{ -add | -delete }]
           [-description <description>]
           [-siteadmin <true | false>]
           [-siteauditor <true | false>]
           [-grantpermissions <comma-separated list of permissions>]
           [-denypermissions <comma-separated list of permissions>]

stsadm.exe -o mergecontentdbs
           -url <url>
           -sourcedatabasename <source database name>
           -destinationdatabasename <destination datbabase name>
           [-operation <1-3>
                1 - Analyze (default)
                2 - Full Database Merge
                3 - Read from file]
           [-filename <file generated from stsadm -o enumsites>]

See also:
     stsadm -o enumcontentdbs -url <url>
     stsadm -o enumsites -url <url> -databasename <database>


stsadm.exe -o mergejsstrings -lcid <lcid>
stsadm.exe -o mergejsstrings -alllcids
stsadm.exe -o mergejsstrings

stsadm.exe -o migrategroup
           -oldlogin <DOMAIN\name>
           -newlogin <DOMAIN\name>

stsadm.exe -o migrateuser
           -oldlogin <DOMAIN\name>
           -newlogin <DOMAIN\name>
           [-ignoresidhistory]

stsadm.exe -o monitordb -url <url> [-operation enable/disable]

stsadm -o osearch

    [-action <list|start|stop>] required parameters for 'start' (if not
              already set): farmcontactemail, service credentials
    [-f (suppress prompts)]
    [-farmcontactemail <email>]
    [-farmperformancelevel <Reduced|PartlyReduced|Maximum>]
    [-farmserviceaccount <DOMAIN\name> (service credentials)]
    [-farmservicepassword <password>]
    [-defaultindexlocation <directory>]
    [-propagationlocation <directory>]

stsadm -o osearchdiacriticsensitive
   -searchapp <search application name>
            [-setstatus <True|False>]
            [-noreset]
            [-force]

stsadm.exe -o patchpostaction

stsadm -o profilechangelog
-userprofileapplication <UserProfileApplication Name> -daysofhistory <number of days> -generateanniversaries

stsadm -o profiledeletehandler
-type <Full Assembly Path>

stsadm.exe -o provisionservice
           -action <start/stop>
           -servicetype <servicetype (namespace or assembly qualified name if not SharePoint service)>
           [-servicename <servicename>]

stsadm -o quiescefarm
-maxduration <duration in minutes>

stsadm -o quiescefarmstatus


stsadm -o quiesceformtemplate
[-formid <form template ID>]
[-filename <path to form template file>]
-maxduration <time in minutes>

stsadm -o reconvertallformtemplates


stsadm.exe -o refreshdms
           -url <url>

stsadm.exe -o refreshsitedms
           -url <url>

stsadm.exe -o refreshsitemap
           -url <url>
           -databasename <database name>
           [-databaseserver <database server name>]

stsadm -o registersecuritytrimmer

    -ssp <search application name>
    -id <0 - 2147483647>
    -typename <assembly qualified TypeName of ISecurityTrimmer2 implementation>
    -rulepath <crawl rule URL>
    [-configprops <name value pairs delimited by '~'>]

    Example:
        stsadm -o registersecuritytrimmer -ssp "Search Service Application" -id 0 -typeName "CustomSecurityTrimmerSample.CustomSecurityTrimmer, CustomSecurityTrimmerSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fb5ca871112471c7" -rulepath file://* -configprops name1~value1~name2~value2

stsadm.exe -o registerwsswriter

stsadm -o removedataconnectionfile
-filename <filename to remove>

stsadm.exe -o removedrservice
           -servicename <data retrieval service name>
           -setting <data retrieval services setting>

stsadm -o remove-ecsfiletrustedlocation

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o remove-ecssafedataprovider

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o remove-ecstrusteddataconnectionlibrary

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o remove-ecsuserdefinedfunction

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o removeexemptuseragent
-name <user-agent to receive InfoPath files instead of a Web page>

stsadm -o removeformtemplate
[-formid <form template ID>]
[-filename <path to form template file>]

stsadm.exe -o removesolutiondeploymentlock
            [-server <server>
            [-allservers]

stsadm.exe -o renameserver
           -oldservername <oldServerName>
           -newservername <newServerName>

stsadm.exe -o renamesite
           -oldurl <oldUrl>
           -newurl <newUrl>

stsadm.exe -o renameweb
           -url <url>
           -newname <new subsite name>

For site collection restore:
    stsadm.exe -o restore
           -url <url>
           -filename <filename>
           [-hostheaderwebapplicationurl <web application url>]
           [-overwrite]
           [-gradualdelete]

For catastrophic restore:
    stsadm.exe -o restore
           -directory <UNC path>
           -restoremethod <overwrite | new>
           [-backupid <Id from backuphistory, see stsadm -help backuphistory>]
           [-item <created path from tree>]
           [-percentage <integer between 1 and 100>]
           [-restorethreads <integer between 1 and 10>]
           [-showtree]
           [-suppressprompt]
           [-username <username>]
           [-password <password>]
           [-newdatabaseserver <new database server name>]
           [-configurationonly]
           [-quiet]

stsadm.exe -o retractsolution
            -name <Solution name>
           [-url <virtual server url>]
           [-allcontenturls]
           [-time <time to remove at>]
           [-immediate]
           [-local]
           [-lcid <language>]

stsadm.exe -o retractwppack
            -name <Web Part Package name>
           [-url <virtual server url>]
           [-time <time to retract at>]
           [-immediate]
           [-local]
           [-lcid <language>]

stsadm -o runcontentdeploymentjob
 -jobname <name>
  [-wait yes|no]
  [-deploysincetime <datetime>]

  The <datetime> parameter should be in the format "MM/DD/YY HH:MM:SS"

stsadm.exe -o scanforfeatures
           [-solutionid <Id of Solution>]
           [-displayonly]

stsadm.exe -o setadminport
           -port <port>
           [-ssl]
           [-admapcreatenew]
           [-admapidname <app pool name>]

stsadm.exe -o setapppassword
           -password <password>

stsadm -o setbulkworkflowtaskprocessingschedule
-schedule <recurrence string>

stsadm.exe -o setconfigdb
           [-connect]
           -databaseserver <database server>
           [-databaseuser <database user>]
           [-databasepassword <database user password>]
           [-databasename <database name>]
           [-exclusivelyusentlm]
           [-farmuser]
           [-farmpassword]
           [-passphrase]
           [-adcreation]
           [-addomain <Active Directory domain>]
           [-adou <Active Directory OU>]

stsadm -o setcontentdeploymentjobschedule
 -jobname <name>
  -schedule <schedule>

    Schedule Parameter Examples:

     "every 5 minutes between 0 and 59"
     "hourly between 0 and 59"
     "daily at 15:00:00"
     "weekly between Fri 22:00:00 and Sun 06:00:00"
     "monthly at 15 15:00:00"
     "yearly at Jan 1 15:00:00"


stsadm -o setdataconnectionfileproperty
-filename <filename of the data connection file>
-pn <property name>
-pv <property value>

stsadm -o set-ecsexternaldata

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o set-ecsloadbalancing

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o set-ecsmemoryutilization

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o set-ecssecurity

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o set-ecssessionmanagement

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o set-ecsworkbookcache

Error. This stsadm command is no longer supported. Use PowerShell to modify Excel Services Application settings from the command line.

stsadm -o setformsserviceproperty
-pn <option name>
-pv <option value>

stsadm -o setformtemplateproperty
[-formid <form template ID>]
[-filename <path to form template file>]
-pn <property name>
-pv <property value>

stsadm -o setholdschedule
-schedule <recurrence string>

stsadm.exe -o setlogginglevel
  [-category < [CategoryName | Manager:CategoryName [;...]] >]
  {-default |
   -tracelevel
        < None;
        Unexpected;
        Monitorable;
        High;
        Medium;
        Verbose;
        VerboseEx;
        >
  [-windowslogginglevel
        < None;
        ErrorServiceUnavailable;
        ErrorSecurityBreach;
        ErrorCritical;
        Error;
        Warning;
        FailureAudit;
        SuccessAudit;
        Information;
        Success;
        Verbose;
        >]
  }

stsadm -o setpolicyschedule
-schedule <recurrence string>

stsadm.exe -o setproperty
           -propertyname <property name>
           -propertyvalue <property value>
           [-url <url>]

SharePoint cluster properties:
avallowdownload
avcleaningenabled
avdownloadscanenabled
avnumberofthreads
avtimeout
avuploadscanenabled
database-command-timeout
database-connection-timeout
data-retrieval-services-enabled
data-retrieval-services-oledb-providers
data-retrieval-services-response-size
data-retrieval-services-timeout
data-retrieval-services-update
data-source-controls-enabled
dead-site-auto-delete
dead-site-notify-after
dead-site-num-notifications
delete-web-send-email
irmaddinsenabled
irmrmscertserver
irmrmsenabled
irmrmsusead
job-ceip-datacollection
job-config-refresh
job-dead-site-delete
large-file-chunk-size
token-timeout
workflow-cpu-throttle
workflow-eventdelivery-batchsize
workflow-eventdelivery-throttle
workflow-eventdelivery-timeout
workflow-timerjob-cpu-throttle
workitem-eventdelivery-batchsize
workitem-eventdelivery-throttle

SharePoint virtual server properties:
alerts-enabled
alerts-limited
alerts-maximum
change-log-expiration-enabled
change-log-retention-period
clientcallablesettings-enablestacktrace
clientcallablesettings-maxobjectpaths
clientcallablesettings-maxresourceperrequest
data-retrieval-services-enabled
data-retrieval-services-inherit
data-retrieval-services-oledb-providers
data-retrieval-services-response-size
data-retrieval-services-timeout
data-retrieval-services-update
data-source-controls-enabled
days-to-show-new-icon
dead-site-auto-delete
dead-site-notify-after
dead-site-num-notifications
defaultquotatemplate
defaulttimezone
delete-web-send-email
event-log-retention-period
job-audit-log-trimming
job-change-log-expiration
job-dead-site-delete
job-diskquota-warning
job-immediate-alerts
job-recycle-bin-cleanup
job-solution-daily-resource-usage
job-solution-resource-usage-log
job-spapp-statequery
job-storage-metrics-processing
job-upgrade-workitems
job-workflow
job-workflow-autoclean
job-workflow-failover
max-file-post-size
peoplepicker-activedirectorysearchtimeout
peoplepicker-distributionlistsearchdomains
peoplepicker-nowindowsaccountsfornonwindowsauthenticationmode
peoplepicker-onlysearchwithinsitecollection
peoplepicker-peopleeditoronlyresolvewithinsitecollection
peoplepicker-searchadcustomfilter
peoplepicker-searchadcustomquery
peoplepicker-searchadforests
peoplepicker-serviceaccountdirectorypaths
presenceenabled
query-maximumresult
recycle-bin-cleanup-enabled
recycle-bin-enabled
recycle-bin-retention-period
second-stage-recycle-bin-quota
send-ad-email


stsadm -o setrecordsrepositoryschedule
-schedule <recurrence string>

stsadm -o setsearchandprocessschedule
-schedule <recurrence string>

stsadm -o setsitedirectoryscanschedule
-schedule <recurrence string>

Schedule parameter examples:
"every 5 minutes between 0 and 59"
"hourly between 0 and 59"
"daily at 15:00:00"
"weekly between Fri 22:00:00 and Sun 06:00:00"
"monthly at 15 15:00:00"
"yearly at Jan 1 15:00:00"


stsadm.exe -o setsitelock
           -url <url>
           -lock <none | noadditions | readonly | noaccess>

stsadm.exe -o setsiteuseraccountdirectorypath
           -url <url>
           [-path <path>]

stsadm.exe -o setworkflowconfig
           -url <url>
           {-emailtonopermissionparticipants <enable|disable> |
            -externalparticipants <enable|disable> |
            -userdefinedworkflows <enable|disable>}

stsadm.exe -o siteowner
           -url <url>
           [-ownerlogin <DOMAIN\name>]
           [-secondarylogin <DOMAIN\name>]

stsadm -o spsearch

    [-action <list|start|stop|attachcontentdatabase|detachcontentdatabase|fullcrawlstart|fullcrawlstop>]
    [-f (suppress prompts)]
    [-farmperformancelevel <Reduced|PartlyReduced|Maximum>]
    [-farmserviceaccount <DOMAIN\name> (service credentials)]
    [-farmservicepassword <password>]
    [-farmcontentaccessaccount <DOMAIN\name>]
    [-farmcontentaccesspassword <password>]
    [-indexlocation <new index location>]
    [-databaseserver <server\instance> (default: SNISQL2012)]
    [-databasename <database name> (default: WSS_Search_SP13DEV01)]
    [-sqlauthlogin <SQL authenticated database user>]
    [-sqlauthpassword <password>]

    -action list

    -action stop
       [-f (suppress prompts)]

    -action start
       -farmserviceaccount <DOMAIN\name> (service credentials)
       [-farmservicepassword <password>]

    -action attachcontentdatabase
       [-databaseserver <server\instance> (default: SNISQL2012)]
       -databasename <content database name>
       [-searchserver <search server name> (default: SP13DEV01)]

    -action detachcontentdatabase
       [-databaseserver <server\instance> (default: SNISQL2012)]
       -databasename <content database name>
       [-f (suppress prompts)]
     
    -action fullcrawlstart
     
    -action fullcrawlstop

stsadm -o spsearchdiacriticsensitive
   [-setstatus <True|False>]
            [-noreset]
            [-force]

stsadm -o sync
  {-ExcludeWebApps <web applications> |
            -SyncTiming <schedule(M/H/D:value)> |
            -SweepTiming <schedule(M/H/D:value)> |
            -ListOldDatabases <days> |
            -DeleteOldDatabases <days> |
            -IgnoreIsActive <0 or 1>}

stsadm.exe -o syncsolution
            -name <Solution name>]
            [-lcid <language>]
            [-alllcids]
         
stsadm.exe -o syncsolution
            -allsolutions

stsadm.exe -o unextendvs
           -url <url>
           [-deletecontent]
           [-deleteiissites]

stsadm.exe -o uninstallfeature
           {-filename <relative path to Feature.xml> |
            -name <feature folder> |
            -id <feature Id>}
           [-force]

stsadm -o unquiescefarm


stsadm -o unquiesceformtemplate
[-formid <form template ID>]
[-filename <path to form template file>]

stsadm -o unregistersecuritytrimmer

    -ssp <search application name>
    -id <0 - 2147483647>

stsadm.exe -o unregisterwsswriter

stsadm.exe -o updateaccountpassword
           -userlogin <DOMAIN\name>
           -password <password>
           [-noadmin]

stsadm.exe -o updatealerttemplates
           -url <url>
           [-filename <filename>]
           [-lcid <language>

stsadm.exe -o updatefarmcredentials
           [-identitytype <configurableid/NetworkService>]
           [-userlogin <DOMAIN\name>]
           [-password <password>]
           [-local [-keyonly]]

stsadm.exe -o updatesqlpassword
            [-databaseserver <database server\instance>]
                [-userlogin <SQL user name>]
                [-password <new password>]
                [-local]


            stsadm -o upgrade command has been replaced by psconfig.exe -cmd upgrade

stsadm -o upgradeformtemplate
-filename <path to form template file>
[-upgradetype <upgrade type>]

stsadm.exe -o upgradesolution
            -name <Solution name>
            [-filename <upgrade filename>]
            [-time <time to upgrade at>]
            [-immediate]
            [-local]
            [-allowgacdeployment]
            [-allowfulltrustbindlls]
            [-allowcaspolicies]
            [-lcid <language>]


            stsadm.exe -o upgradetargetwebapplication has been deprecated since gradual upgrade is no longer supported in the current version.

stsadm -o uploadformtemplate
-filename <path to form template file>

stsadm.exe -o userrole
           -url <url>
           -userlogin <DOMAIN\name>
           -role <role name>
           [-add]
           [-delete]

stsadm -o variationsfixuptool
 -url <absolute web URL>
  [-recurse]
  [-label <label to fix or spawn>]
  [-fix]
  [-scan]
  [-spawn]
  [-showrunningjobs]


stsadm -o verifyformtemplate
-filename <path to form template file>