Monday, April 27, 2015

SharePoint 12013 Workflow Error: Method 'StartWorkflowOnListItem' in type



Microsoft has released an update for SharePoint 2013 on 12th August 2014 (KB2880998). Once you install this update on your SharePoint 2013 farm or on a single server, your SharePoint 2013 workflow manager component generates the below error:

Method 'StartWorkflowOnListItem' in type 'Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider' from assembly 'Microsoft.SharePoint.WorkflowServices, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' does not have an implementation.





Microsoft has released a patch update for this fix which is available at: http://support.microsoft.com/kb/2880963
Note: You need to install the patch on the entire SharePoint farm if you are working on a farm environment.  You need not to restart any service or servers on the farm.


Happy Configuration!!!
Gireesh 

Wednesday, April 15, 2015

SharePoint 2013 Workflow starts and then immediately cancels

SharePoint 2013 workflow cancels

There are different scenarios related to auto cancellation of workflow in SharePoint 2013. There are some investigations I have done to fix this issue. It may differ in your case but you can check the following issues to investigate the workflow auto cancellation:

è  Validate the workflow account: The account which runs the workflow should not be the Service, Portal Administrator and farm administrator account.  This account should be a domain account with minimum permission like contributor permission on the site. If you run the workflow with system account it will automatically cancel the workflow after some time.

è  Verify the Email server: If your workflow has email notification and the SMTP server is not configured or unable to send email then it cancels the workflow automatically. It generates an error next to the cancel text on workflow page which is not easy to identify. So verify the email server notification by using the telnet on App or web server in SharePoint environment.

è  User Profile Service Configuration: You need to configure and start the user profile service prior to running workflow.  This is a very important service which helps workflow to identify user from Active Directory to execute in SharePoint environment. After configuring user profile service , User profile Synchronization service needs to be started to synchronize all the AD users to SharePoint portal.

è  Access to Workflow manager Application pool DB: If you are executing code based workflow then the accounts which creates workflow task needs to have access to the mentioned database.

Happy Coding!!!
Gireesh 

Monday, April 13, 2015

The best practice for SharePoint account selection while Installing and configuring farm environment

This blog focus on planning and understanding the configuration of SharePoint service accounts while SharePoint installation and configuration.  I have been working in farm deployment architecture from couple of months. I observed miss configuration of accounts lead you tons of critical errors in the Event log of all the servers in the farm. It’s a best practice to understand use of each account before configuring the SharePoint server farm. Here is the brief information about the account and configuration. The number of accounts may vary based on complexity of the farm and services. 
To Install SharePoint 2013 on a Server farm following accounts needs to be created and configured:
1.       SQL Service Account:
Account
Purpose
Requirements
SQL Service Account (SP_SQLService)
The SQL Server service account is used to run SQL Server. It is the service account for the following SQL Server services:
·         MSSQLSERVER
·         SQLSERVERAGENT

This account is mostly used to install SQL for SharePoint
Setup account (SP_Setup)
This is a domain account which is used to run following:
·         Install SharePoint
·         Run configuration wizard
·         Domain user account.
·         Member of the local Administrators group on each server on which Setup is run.
·         SQL Server login on the computer that runs SQL Server.
·         Member of the following SQL Server roles:
o    securityadmin fixed server role
o    dbcreator fixed server role
If you run Windows PowerShell cmdlets that affect a database, this account must be a member of the db_owner fixed database role for the database.
After you run the configuration wizards, machine-level permissions for the setup user administrator account include:
·         Membership in the WSS_ADMIN_WPG Windows security group.
·         Membership in the IIS_WPG role.
After you run the configuration wizards, database permissions include:
·         db_owner on the SharePoint server farm configuration database.
·         db_owner on the SharePoint Central Administration content database.

Farm Account (SP_Farm)
The server farm account is used to perform the following tasks:
·         Configure and manage the server farm.
·         Act as the application pool identity for the SharePoint Central Administration Web site.
·         Run the Microsoft SharePoint Foundation Workflow Timer Service.

·         Domain user account.
Additional permissions are automatically granted for the server farm account on Web servers and application servers that are joined to a server farm.
The server farm account is automatically added as a SQL Server login on the computer that runs SQL Server. The account is added to the following SQL Server security roles:
·         dbcreator fixed server role
·         securityadmin fixed server role
·         db_owner fixed database role for all SharePoint databases in the server farm

Application Pool Account (SP_AppPool)
Account for application pool for different web application
·         Domain user account.
  • This account must not be a member of the Farm Administrators group.


Search Service account (SP_Search)
Used to configure Search service application
·         Domain user account.
  • This account must not be a member of the Farm Administrators group on any server in the server farm.
·         Read permission to the web application


·         SP_Farm: This account is used to for following activites:
ð  Application pool identity for Central Administration
ð  Process account for the SharePoint Foundation 2013 Timer Service
After you run setup, machine-level permission includes:
·         Membership in the WSS_ADMIN_WPG Windows security group for the SharePoint Foundation 2013 Timer service.
·         Membership in WSS_RESTRICTED_WPG for the Central Administration and Timer service application pools.
·         Membership in WSS_WPG for the Central Administration application pool.
After you run the configuration wizards, SQL Server and database permissions include:
·         Dbcreator fixed server role.
·         Securityadmin fixed server role.
·         db_owner for all SharePoint databases.
·         Membership in the WSS_CONTENT_APPLICATION_POOLS role for the SharePoint server farm configuration database.
·         Membership in the WSS_CONTENT_APPLICATION_POOLS role for the SharePoint_Admin content database.
Service Application Pool account:
Service application pool account is setup by default during installation. Following permission is allocated automatically after configuration:
ð  The application pool account is a member of WSS_WPG
ð  The following SQL Server and database permissions for this account are configured automatically:
è  The application pool accounts for Web applications are assigned to the SP_DATA_ACCESS role for the content databases.
è  This account is assigned to the WSS_CONTENT_APPLICATION_POOLS role associated with the farm configuration database.
è  This account is assigned to the WSS_CONTENT_APPLICATION_POOLS role associated with the SharePoint_Admin content database.

 Best Wishes 
Gireesh Painuly

References: MSDN

Sunday, May 11, 2014

Out Of Box(OOB) Web Parts in SharePoint 2013

Hi friends,
This blog is about Out of Box (OOB) Web  Parts available in SharePoint 2013. I have just written brief about them. Many of these Web Parts are visible after activating some Site Features and Site Collection Feature.
   1. Apps: all the Apps list and library
   2.    Blog:
 ð  Blog Archive s: Provides quick links to older blog posts.
 ð  Blog Notification: Provides quick links to register for blog posts notifications using Alerts or RSS feed.
 ð  Blog Tools: Provides blog owners and administrators with quick links to common settings pages and content lists for managing a blog site.
   3.    Business Data
 ð  Business Data Actions: Displays a list of actions from Business Data Connectivity
 ð  Business Data Connectivity Filter: Filters the contents of Web Parts using a list of values from the Business Data Connectivity.
 ð  Business Data Item: Displays one item from a data source in Business Data Connectivity.
 ð  Business Data Item Builder: Creates a Business Data item from parameters in the query string and provides it to other Web Parts.
 ð  Business Data List: Displays a list of items from a data source in Business Data Connectivity.
 ð  Business Data Related List: Displays a list of items related to one or more parent items from a data source in Business Data Connectivity.
 ð  Excel Web Access: Use the Excel Web Access Web Part to interact with an Excel workbook as a Web page.
 ð  Indicator Details: Displays the details of a single Status Indicator. Status Indicators display an important measure for an organization and may be obtained from other data sources including SharePoint lists, Excel workbooks, and SQL Server 2005 Analysis Services KPIs.
 ð  Status List: Shows a list of Status Indicators. Status Indicators display important measures for your organization, and show how your organization is performing with respect to your goals.
 ð  Visio Web Access: Enables viewing and refreshing of Visio Web Drawings
   4.    Content Rollup:
 ð  Content Query: Displays a dynamic view of content from your site. It is also known as ContentByQueryWebPart. It aggregates and displays list items within a site hierarchy. In addition to hierarchical query capabilities, the Content Query Web Part provides caching and query optimization for theSPSiteDataQuery object that it contains. Namespace used by Conte query web part is Microsoft.SharePoint.Publishing.WebControls which is available in Microsoft.SharePoint.Publishing.dll. A ContentByQueryWebPart object uses the CrossListQueryCache object to retrieve data. The data retrieved is cleaned and then sent to the XSLT engine. The XSLT engine uses the defaultHeader.xsldefaultItem.xsl, anddefaultMain.xsl files to translate the data into HTML markup that is presented to the user. You can customize the HTML output of theContentByQueryWebPart by using the XSL transform. TheDataProcessDelegate allows you to retrieve data to be modified before it is sent to the XSLT engine. 
 ð  Content Search: Content Search Web Part will allow you to show items that are results of a search query you specify. When you add it to the page, this Web Part will show recently modified items from the current site. You can change this setting to show items from another site or list by editing the Web Part and changing its search criteria. As new content is discovered by search, this Web Part will display an updated list of items each time the page is viewed.
 ð  Relevant Documents: Displays documents that are relevant to the current user.
 ð  Summary Links: Allows authors to create links that can be grouped and styled.
 ð  Table of Contents: Displays the navigation hierarchy of your site.
 ð  Term Property: Displays the specified property of a Term.
 ð  Timeline: Use this timeline to show a high level view of data from another webpart or tasks list.
 ð  XML Viewer: Transforms XML data using XSL and shows the results.
   5.    Custom:
ð  all the developed web part by developers
   6.    Document Set:
 ð  Document Set Contents: Displays the contents of the Document Set.
 ð  Document Set Property: Displays the properties of the Document Set.
   7.    Forms:
 ð  HTML Form Web Part: Connects simple form controls to other Web Parts.
 ð  InfoPath Form Web Part: Use this Web Part to display an InfoPath browser-enabled form.
   8.    Media and Content:
 ð  Content Editor: Allows authors to enter rich text content.
 ð  Get Started with your site: This web part displays a set of tiles with common SharePoint actions.
 ð  Image Viewer: Displays a specified image.
 ð  Media Web Part: Use to embed media clips (video and audio) in a web page.
 ð  Page Viewer: Displays another Web page on this Web page. The other Web page is presented in an IFrame.
 ð  Picture Library Slideshow Web part:  Use to display a slideshow of images and photos from a picture library.
 ð  Script Editor Web Part: Allows authors to insert HTML snippets or scripts.
 ð  Silver Light Web Part: A web part to display a Silverlight application.
    9.    Performance Point
 ð PerformancePoint filter: This web part displays PerformancePoint filters. Filters may be linked to other web parts to provide an interactive dashboard experience. Filter types include lists and trees based on a variety of data sources.
 ð Performance Point Report: This web part displays PerformancePoint reports. Reports may be linked to other web parts to create an interactive dashboard experience. Report types include: Analytic charts & grids, Strategy Maps, Excel Services, Reporting Services, Predictive Trend charts, and web pages.
 ð PerformancePoint Scorecard: This web part displays a PerformancePoint scorecard. Scorecards may be linked to other web parts, such as filters and reports, to create an interactive dashboard experience.
 ð PerformancePoint Stack Selector: This web part displays a PerformancePoint Stack Selector. All PerformancePoint web parts, such as filters and reports, contained in the same zone will be automatically stacked and selectable using this web part.
   10.SQL Reporting:
 ð   all the report viewer web part
   11.Search:
 ð  Refinement : This webpart helps the users to refine search results
 ð  Search box: Displays a search box that allows users to search for information.
 ð  Search Navigation: This webpart helps the users to navigate among search verticals
 ð  Search Results: Displays the search results and the properties associated with them.
 ð  Taxonomy Refinement Panel: This Web Part helps the user to refine search results on term set data. To use this Web Part, you must also have a Search Data Provider Web Part on this page and use Managed Navigation.
   12.Search-Driven Content:
 ð  Catalog-Item Reuse: Use this Web Part to reuse or republish the content of an item from a catalog.
 ð  Items Matching a Tag: This Web Part will show items that are tagged with a term.
When you add it to the page, this Web Part will show items from the current site matching the page navigation context. You can change this setting to show items from another site or list by editing the Web Part and changing its search criteria. You can also specify whether you want the Web Part to display items associated with a different tag instead.
As new content is discovered by search, this Web Part will display an updated list of items each time the page is viewed.
 ð  Page: This Web Part will show any items that are derived from the Pages content type.
When you add it to the page, this Web Part will show items from the current site. You can change this setting to show items from another site or list by editing the Web Part and changing its search criteria. As new content is discovered by search, this Web Part will display an updated list of items each time the page is viewed.
 ð  Picture: This Web Part will show any items that are derived from the Picture or Image content type. When you add it to the page, this Web Part will show items from the current site. You can change this setting to show items from another site or list by editing the Web Part and changing its search criteria. As new content is discovered by search, this Web Part will display an updated list of items each time the page is viewed.
 ð  Popular Items: This Web Part will show items that have been recently viewed by many users. When you add it to the page, this Web Part will show items from the current site. You can change this setting to show items from another site or list by editing the Web Part and changing its search criteria. You can also customize how items are sorted. As new content is discovered by search, this Web Part will display an updated list of items each time the page is viewed.
 ð  Recently Changed Items: recently. This can help site users track the latest activity on a site or a library. When you add it to the page, this Web Part will show items from the current site. You can change this setting to show items from another site or list by editing the Web Part and changing its search criteria. As new content is discovered by search, this Web Part will display an updated list of items each time the page is viewed.
 ð  Recommended Items: This Web Part will show content recommendations based on usage patterns for the current page. When you add it to the page, this Web Part will show items from the current site. You can change this setting to show items from another site or list by editing the Web Part and changing its search criteria.  As new content is discovered by search, this Web Part will display an updated list of items each time the page is viewed.
 ð   Video: This Web Part will show any items that are derived from the Video content type.  It will sort items by number of views. When you add it to the page, this Web Part will show items from the current site. You can change this setting to show items from another site or list by editing the Web Part and changing its search criteria. As new content is discovered by search, this Web Part will display an updated list of items each time the page is viewed.
 ð  Web Part Page:  This Web Part will show any items that are derived from the Page content type. When you add it to the page, this Web Part will show items from the current site. You can change this setting to show items from another site or list by editing the Web Part and changing its search criteria. As new content is discovered by search, this Web Part will display an updated list of items each time the page is viewed.
 ð  Wiki Page: This Web Part will show any items that are derived from the Wiki Page content type. When you add it to the page, this Web Part will show items from the current site. You can change this setting to show items from another site or list by editing the Web Part and changing its search criteria. As new content is discovered by search, this Web Part will display an updated list of items each time the page is viewed.
   13.Site Collaboration:
 ð  Site Users: Use the Site Users Web Part to see a list of the site users and their online status. When you click a user's name, you see a page that provides information about that user.
 ð  User Task: Displays tasks that are assigned to the current user.ð   Contact Details: Displays details about a contact for this page or site.
 ð  Note Board: Enable users to leave short, publicly-viewable notes about this page. It can be set at project level where some note related to project can be published.
 ð  Organization Browser: This Web Part displays each person in the reporting chain in an interactive view optimized for browsing organization charts.
 ð  Site Feed: Site Feed contains microblogging conversations on a group site.
 ð  Tag Cloud: Displays the most popular subjects being tagged inside your organization.
 ð  User Task: Displays tasks that are assigned to the current user.


Regards
Gireesh Painuly

Tuesday, May 6, 2014

Mostly used powershell command in SharePoint 2013/ SharePoint 2010

Hi Friends,
This blog is about commonly used power shell command used in SharePoint 2013 and SharePoint 2010. I have tested all these commands in SharePoint 2013.

Power shell is executed from SharePoint 2010/2013 management Shell.
è Adding WSP :
ð Farm solution:
               Add-SPSolution -LiteralPath <Path of wsp>
  Eg: Add-SPSolution -LiteralPath c:\contoso_solution.wsp
 
ð Sandbox Solution:
               Add-SPUserSolution –LiteralPath < path of wsp> -site < site ulr>

è Deploy Installed solution
ð Farm Solution:
               Install-SPSolution -Identity <Web part Name.wsp> -GACDeployment
 Eg: Install-SPSolution -Identity contoso_solution.wsp –GACDeployment
 
ð Sandbox Solution:
               Install-SPUserSolution –identity wspfilename.wsp –site <site url>
Eg: Install-SPUserSolution –identity wspfilename.wsp –site <site url>

è Update Existing
ð Farm Solution:
               Update-SPSolution -Identity <wsp name> -LiteralPath <WSP Path> -GACDeployment
 Eg: Update-SPSolution -Identity my.wsp -LiteralPath c:\my.wsp –GACDeployment
 
ð Sandbox Solution:
      Update-SPUserSolution -Identity contoso_solution.wsp -Site http://sitename -ToSolution contoso_solution_v2.wsp
    Eg: Update-SPUserSolution -Identity my.wsp -Site http://sitename -ToSolution myv2.wsp
 
è Uninstall Solution :
ð Farm Solution:
Uninstall-SPSolution [-Identity] <SPSolutionPipeBind> -WebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-CompatibilityLevel <String>] [-Confirm [<SwitchParameter>]] [-Language <UInt32>] [-Local <SwitchParameter>] [-Time <String>] [-WhatIf [<SwitchParameter>]]
    Eg:     Uninstall-SPSolution –Identity http://sitename contoso_solution.wsp
 
ð Sandbox Solution:
Uninstall-SPUserSolution [-Identity] <SPUserSolutionPipeBind> -Site <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
 Eg: Uninstall-SPUserSolution -Identity my.wsp -Site http://sitename
 
è Remove Solution:
ð Farm Solution:
Remove-SPSolution [-Identity] <SPSolutionPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-Language <UInt32>] [-WhatIf [<SwitchParameter>]]
Eg:  Remove-SPSolution -Identity contoso_solution.wsp
ð Sandbox Solution:
Remove-SPUserSolution [-Identity] <String> -Site <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
Eg:  Remove-SPUserSolution -Identity contoso_solution.wsp -Site http://sitename

è Get List of Solution
ð Farm Solution:
                        Get-SPSolution
ð Sandbox Solution:
                        Get-SPUserSolution –Site <site name>

è Install Feature:
ð Farm Solution:
Install-SPFeature [-Path] <String> [-AssignmentCollection <SPAssignmentCollection>] [-CompatibilityLevel <Int32>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Eg:  Install-SPFeature -path "MyCustomFeature"

è Enable Feature: The Enable-SPFeature cmdlet enables an installed feature at the given scope.
ð Farm Solution:
Enable-SPFeature [-Identity] <SPFeatureDefinitionPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-CompatibilityLevel <Int32>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-PassThru <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Eg:  Enable-SPFeature -identity "Feature Folder path" -URL http://somesite

è Deactivate Feature:
ð Farm Feature:
Disable-SPFeature [-Identity] <SPFeatureDefinitionPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-Url <String>] [-WhatIf [<SwitchParameter>]]
Eg:  Disable-SPFeature –identity "MyCustom" -URL http://somesite

è Uninstall/ Delete Feature: The Uninstall-SPFeature cmdlet removes the specified feature definition from the collection of feature definitions in the farm.
ð Farm Solution:
Uninstall-SPFeature [-Identity] <SPFeatureDefinitionPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-CompatibilityLevel <Int32>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Eg: Uninstall-SPFeature -Identity "MyCustomFeature"

è Get List of active features: It displays feature name and corresponding ID:
        Get-SPFeature -Site http://SharePointSite/


è To Delete unused web parts from Solution Store: .webpart file is not deleted from web part gallery after executing above commands, user needs to run bellow command to delete (.webpart) from gallery.

$spQuery = New-Object Microsoft.SharePoint.SPQuery
$camlQuery = '<Where><Eq><FieldRef Name="FileLeafRef" /><Value Type="Text">TestgiriWebPart_GiriWebPart.webpart</Value></Eq>  </Where>'
$spQuery.Query = $camlQuery

$site = Get-SPSite -Identity "http://win-ua50t4mr5s4"
$webpartgallery = $site.GetCatalog( [Microsoft.SharePoint.SPListTemplateType]::WebPartCatalog)
$webparts = $webpartgallery.GetItems($spQuery)
$webparts[0].Recycle()

è To get details about the feature and web application: If you are not sure what Web the feature is activated in, run the following:
                Get-SPSite http://SharePointSite/ | Get-SPWeb -Limit ALL | %{ Get-SPFeature -Web $_ } | Sort DisplayName -Unique | FT DisplayName,Id

è Delete Feature:
      Uninstall-SPFeature <Feature ID>

è To See List of solutions in Solution store:
Stsadm  -o EnumSolutions


è Backup and Restore:
ð Backup SharePoint FARM:
            Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} [-Verbose]
Eg: Backup-SPFarm c:\SPBackup\myfarm.bak –BackupMethod Full

ð Backup Site Collection:
Backup-SPSite -Identity <SiteCollectionGUIDorURL> -Path <BackupFile> [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-Verbose]
Eg: Backup-SPSite –identity http://siteName/ -path c:\mysite.bak –force

è Restore Backup
ð Restore Server Farm:
Restore-SPFarm -Directory <BackupFolder> -RestoreMethod Overwrite [-BackupId <GUID>]
Eg: Restore-SPFarm -Directory \\file_server\share\Backup -BackupId 12345678-90ab-cdef-1234-567890abcdef -RestoreMethod new -ConfigurationOnly

ð  Restore Site Collection:
  Restore-SPSite -Identity SiteCollectionURLHere -Path BackupFilePathHere [-DatabaseServer DatabaseServerNameHere] [-DatabaseName ContentDatabaseNameHere] [-HostHeader HostHeaderHere] [-Force] [-GradualDelete] [-Verbose]
Eg:  Restore-SPSite –identity http://mysite  -path c:\myback.bak -force

è SharePoint list backup: To backup SharePoint list we need to use SharePoint management shell
ð  Exporting List
Export-SPWeb http://www.domain.com -itemurl "/Lists/NameList" -path "c:\test.cmp”
ð  Importing List:
Import-SPWeb http://www.domain.com -Path "c:\test.cmp"

Commonly used power shell command:
ð  Removing Web application
            Remove-SPWebApplication -identity http://sitename –Confirm

ð  Delete Web Application Pool
            Remove-WebAppPool  -name ‘applicationPoolName’
ð  Remove Web Application , Content Database and IIS Application Pool
Remove-SPWebApplication http://sitename -Confirm -DeleteIISSite -RemoveContentDatabases
  
Export list:
# specify the site URL to export

$web = Get-SPWeb "http://testsite:9000"

# specify output folder to store exported lists

$path = "c:\ListBackup\"

foreach($list in $web.lists)
 {
 "Exporting " + $list.RootFolder.URL
 Export-SPWeb $web.URL -ItemUrl $list.URL -path ($path + $list + ".cmp") -nologfile
 }

Export-SPWeb http://tawasul/IT/ISC/ -ItemUrl "/Lists/List_Name" -path "c:\ExportISC\List_Name.cmp"
Export-SPWeb http://mysite/sites/KPI/ -ItemUrl "/Lists/" -path "c:\Export_KPI\List_Name.cmp"
è    Re-Indexing SharePoint List:
UPDATE <Content DB>.dbo.AllListsAux set NextAvailableId=1 where ListID='<GUID>'
eg:
UPDATE WSS_RQMS.dbo.AllListsAux set NextAvailableId=1 where ListID='{500440F9-EEFE-4659-9D33-B90F68404DD4}'
è    Adding Column to existing SharePoint List using powershell:
param([string]$workspaceUrl)
[Microsoft.SharePoint.SPSecurity]::RunWithElevatedPrivileges(
{
$site = SPSite($workspaceUrl)
$web = $site.RootWeb
$spList = $web.Lists["YourList"]
$spFieldType = [Microsoft.SharePoint.SPFieldType]::Text
$spList.Fields.Add("YourColumn",$spFieldType,$false)
$spList.Update()
}
)
To Execute: Save this file in your local drive execute as bellow:
PS C:\Administrator> .\YourScript.ps1 -workspaceUrl "yoururl"
Eg: PS C:\Administrator> C:\MyScript.ps1 -workspaceUrl "http://mymachinename:9000"

è    Create database from power shell:
New-SPConfigurationDatabase [-DatabaseName] <String> [-DatabaseServer] <String> [[-DirectoryDomain] <String>] [[-DirectoryOrganizationUnit] <String>] [[-AdministrationContentDatabaseName] <String>] [[-DatabaseCredentials] <PSCredential>] [-FarmCredentials] <PSCredential> [-Passphrase] <SecureString> [-AssignmentCollection <SPAssignmentCollection>]

è    Changing Site Logo:

$sitename= "http:// dev/sites/SiteName"
$sitelogo= "http:// dev/Site Assets/sitelogo.jpg"
$site=new-object Microsoft.SharePoint.SPSite($sitename)
$web=$site.OpenWeb()
$web.SiteLogoUrl=$sitelogo
$web.Update()
$site.Dispose()

è    Cleanup Deleted Database from SharePoint server:
ð    Display list of all database
Get-SPdatabase
ð    This will list all databases in SharePoint that no longer exist on the database server.
Get-SPDatabase | where {$_.exists -eq $false} :
ð    Remove all orphan database:
Get-SPDatabase | where {$_.exists -eq $false} | foreach {$_.delete()}

è    Get List of Application Pool:
ð    Get list of application Pool:
Get-SPServiceApplicationPool
ð    Delete Application Pool:
Remove-SPServiceApplicationPool-Identity <Name of the application pool>
è    Change Master Page :
$web = Get-SPWeb http://sharepoint
$web.CustomMasterUrl = "/_catalogs/masterpage/seattle.master"
$web.MasterUrl = "/_catalogs/masterpage/ seattle.master"
$web.Update()
è    Get List of Web Application in a Farm:
Get-SPWebapplication
è    Get List of Site collection in a Web Application:
Get-SPWebApplication <WebAppURL> | Get-SPSiteAdministration -Limit ALL| Select url,Title
Eg: Get-SPWebApplication  http:// dev/ | Get-SPSiteAdministration -Limit ALL| Select url,Title
è    List all the Web Application and Site collection and sub sites
Get-SPSite
è    Remove a WebApplication, content database, Application Poo:

Remove-SPWebApplication http://win-2k8-dc7:8081 -Confirm -DeleteIISSite –RemoveContentDatabases
è    To Create new Web Application:

$ap = New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication -DisableKerberos
New-SPWebApplication -Name "WEBAPP" -Port 80 -URL "http://WebAppqa" -ApplicationPool "WEBAPPApplicationPool" -ApplicationPoolAccount (Get-SPManagedAccount "domain\spadmin") -DatabaseName "WSS_Content_WEBAPPRootDB" –AuthenticationProvider $ap
è    To attached SharePoint content database from one server to another server:
ð    Dismount  database from source server:
Dismount-SPContentDatabase [-Identity] <SPContentDatabasePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
Eg:
Dismount-SPContentDatabase <database name>
ð    Mount Database to new server:
Mount-SPContentDatabase "<ContentDb>" -DatabaseServer "<DbServer>" -WebApplication http://SiteName
è    Crate Site collection:
New-SPContentDatabase -Name WSS_Content_WEBAPP_TestSite  -WebApplication http://WebApp:8080/
New-SPSite http://WebApp:8080/sites/TestSite -OwnerAlias "domain\sAdmin" -ContentDatabase WSS_Content_WEBAPP_TestSite-Name "TestSite" -Template "PROJECTSITE#0"

Regards
Gireesh Painuly..