LinkedIn

Showing posts with label Vinay. Show all posts
Showing posts with label Vinay. Show all posts

Thursday, April 17, 2014

SharePoint PowerShell Commands

 Site Collection Backup
Backup-SPSite -Identity -Path [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-Verbose] 

Site Collection Restore
Restore-SPSite -Identity -Path< Backup file> [-DatabaseServer ] [-DatabaseName ] [-HostHeader ] [-Force] [-GradualDelete] [-Verbose]

Export Site
Export-SPWeb -Identity -Path [-ItemUrl ] [-IncludeUserSecurity] [-IncludeVersions] [-NoFileCompression] [-GradualDelete] [-Verbose]
Import Site 
Import-SPWeb -Identity -Path [-Force] [-   NoFileCompression] [-Verbose]
Get all site details

$a = Get-SPWebApplication "<  $a | Select RootWeb, Url, Owner > c:\emea.csv
 $a | Select RootWeb, Url, Owner | Format-Table -AutoSize >data.csv

Deploy BDC from PowerShell
$metaStore = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Catalog" -ServiceContext < Import-SPBusinessDataCatalogModel -Path "D:\Droppoint\test.bdcm" -Identity $metaStore -Force

Get Database names of sites
Get-SPContentDatabase | %{Write-Output "- $($_.Name)”; foreach($site in $_.sites){write-Output $site.url}} > C:\sitecollections.txt

Site Collection Sizes
Get-SPSite -Limit ALL | select url, ContentDatabase, Owner, @{label="Size in MB";Expression={$_.usage.storage/1MB}} | Sort-Object -Descending -Property "Size in MB" | Format-Table –AutoSize | Out-String -Width 100000 > D:\CollectionSize.txt
 
Get all Sub Site names
$site = Get-SPSite "http://yoursite"
 foreach ($web in $site.AllWebs) { 
  $web | Select-Object -Property Title,Url,WebTemplate   
}  
$site.Dispose()

 Search for Correlation ID in ULS logs
 
$term= ''
Select-String -pattern "$term" -Path E:\SPLogs\ULS\*.* -list

Mount and Unmount the DB

Dismount-SPContentDatabase ""
Mount-SPContentDatabase "" -DatabaseServer "" -WebApplication http://mysitename
 
Site Collections and its DB names
 Get-SPContentDatabase | %{Write-Output "- $($_.Name)”; foreach($site in $_.sites){write-Output $site.url}}
 Get Servers in Farm
 Get-SPServer
  
Get All Application Servers in Farm
 get-spserver | ? { $_.Role -eq "Application" }
 
Content Database Size
 Get-SPDatabase | select name, disksizerequired| Sort-Object disksizerequired -desc| Format-Table –AutoSize > c:\contDBSize.csv
 Storage Details of Site Collection

Get-SPSite -Limit 5| Select URL, @{Name=”Storage”; Expression={“{0:N2} MB” -f ($_.Usage.Storage/1000000)}}, @{Name=”Quota”; Expression={“{0:N2} MP” -f ($_.Quota.StorageMaximumLevel/1000000)} } | Format-Table –AutoSize | Out-string -width 10000 > C:\output.csv
 
To avoid truncation of PowerShell output: $FormatEnumerationLimit =-1
Site Owners
 
Get-SPWebApplication | Get-SPSite -Limit All | Get-SPWeb -Limit All | Select Title, URL, ID, ParentWebID,@{Name=’SiteAdministrators’;Expression={[string]::join(";", ($_.SiteAdministrators))}} | Export-CSV C:\InfoArch.csv -NoTypeInformation

Orphaned Database

$orphanedDB = Get-SPDatabase | where{$_.Name -eq "MyContentDatabase"}

$orphanedDB.Delete()


Reference:
http://praveeniyer7.blogspot.in/p/sharepoint-powershell-commands.html

Thursday, January 30, 2014

SharePoint : Latency and Bandwidth for SharePoint

Bandwidth is the amount of data that you can send through the wire.
Latency is the time taken by the data ( or packet) to travel from source to destination.

For example : If you are located in Australia and are opening a SharePoint site which is hosted in Seattle ( USA) and if it takes 1/10th of a second to open that page, then the network latency between your machine and the machine hosting the site is 1/10th of a second.

For SharePoint deployment we have some guidelines to consider with respect to bandwidth and latency. Below table summaries with different scenarios



With respect to backup/restore of database in SharePoint 2010, network drives with 1 millisecond or less latency between them and the database server will perform well.

http://blogs.msdn.com/b/sharepoint__cloud/archive/2012/09/20/guidance-on-latency-and-bandwidth-for-sharepoint-2010.aspx

Tuesday, December 10, 2013

SharePoint : Representational State Transfer (REST)

The SharePoint 2010 Representational State Transfer (REST) interface is a WCF Data Service that allows you to use construct HTTP requests to query SharePoint list data. Representational State Transfer, aka REST, is an architectural style for web-based data access, an alternative to other techniques like SOAP Web Services and Remote Procedure Calls. OData is a protocol – a standardized way to implement REST to surface, query, and manipulate data. OData is an open web-data protocol developed by Microsoft. OData is all about web-based data access; OData can make almost any kind of structured data collection available to any kind of platform, because all data access is via plain old HTTP, and the data is served up as XML (or JSON) in an Atom-style RSS feed.
ODataQuery by URL, Answer by RSS
OData is built on the Entity Data Model. A RDBMS like SQL Server, tables contain rows; in OData, Collections contain Entries. In a database, tables can be related; in OData, Collections can be associated. A row has columns. An Entry has properties. Tables may have keys; Collections always have keys. Browsing to the service root of an OData service usually displays an Atom+XML list of all available Collections.
Entity Data Model (EDM) and OData have parallel terms:
EDM (What to query)
OData (What is returned)
Entity Set
Collection
Entity Type
Entry
Property of an Entity Type
Property of an Entry
Navigation Property
Link
Function Import
Service Operation
An OData Url has three parts: a Service root, a resource path, and (optionally) query string options. We”ve seen the service root, which typically returns a list of all available Collections. The resource path is kind of like a relative URL, and identifies a Collection or a single Entry or a property of an Entry. Basically the resource path drills down through the entity model to get to a particular object. OData URLs are usually case-sensitive, so take care with spelling. For example, http://services.odata.org/Northwind/Northwind.svc/Customers(”ALFKI”) returns just the ALFKI Customer, which is a single Entry identified by its key

Reference:

http://www.mindsharp.com/blog/2012/07/sharepoints-rest-an-odata-overview/

Writing Event Handlers for a Specific Sharepoint 2010 List

When you register Event handlers get added to all the lists of that template. for eg: Lets take a common scenario. Lets say you will have at least 2 custom lists in your site List1, List2. Now you write an event handler that you want to trigger on operations on one list List1. But this event handler also gets attached to List2 without you intending for.
Solution:
            There are may solutions you may find for this. One and most straight forward is write a feature stapler. But again writing a stapler is not easy and takes a lot of time. Also it's one more feature added to your site.
            The second solution(not too obvious) also exists. Now if you are writing a feature you got to have a Elements.xml file(At least I have to have one). Here making some tweaks will solve your problem.
I have created a solution called GG.BlogsEventHandler. I have written Asynchronous receiver. Below is how my Elements.xml looks like.



Look carefully at line #4. Do you see any difference? By default you will have


where xx=template id of your list. Custom Lists have "301" . Instead of giving a template Id, I have given site relative Url of the List.

Thursday, April 14, 2011

SharePoint 2010 custom masterpage with code behind file

Master Page code behind should like this:

using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MasterPageWithCodeBehind.MasterPageModule

{

public class _starter : MasterPage

{

protected System.Web.UI.HtmlControls.HtmlGenericControl divRibbonContainer;
protected Label Label1;

protected void Page_Load(object sender, EventArgs e)
{

     divRibbonContainer.Visible = false;
     Label1.Text = "Hello World!";
}

}

}
 
In the application pages you should have a attribute like this:
Add the following Inherits attribute:
Inherits :
To combine the code-behind file with the masterpage there need to be an attribute added to the masterpage directive.
The following data is needed:
■Namespace of the class & Type/Class name (these need to be seperated by a dot) (MasterPageWithCodeBehind.MasterPageModule._starter)

■Strongname/Assembly in my case was this the same as the projectname (MasterPageWithCodeBehind)

■Version (Version=1.0.0.0)

■Culture (Culture=neutral)

■PublicKeyToken (PublicKeyToken=f8a88530fbc7b81b)In the masterpage navigate to the following:

In our case the Inherits would contain:
MasterPageWithCodeBehind.MasterPageModule._starter, MasterPageWithCodeBehind, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f8a88530fbc7b81b
 
Deploy your SharePoint 2010 project and load the default site.Your ribbon should be gone and a text like Hello World! should be visible.
Refer the following link for details:
http://rburgundy.wordpress.com/2010/03/10/sharepoint-2010-custom-masterpage-with-code-behind-file-%e2%80%93-part-2/

Tuesday, December 16, 2008

Sharepoint Features



This image displays the features of the Sharepoint in pie chart format. The pies on the right half (Collaboration, Portal & Search) form the part of core framework .i.e. WSS 3.0.

Why use Sharepoint for Application Development? Part II

Application Development in Sharepoint hardly requires any coding. Why? See the following list:

• Entities - these get created as "Content Types" in WSS and require no coding.
• Metadata - these get created as "Site Columns" in WSS and get bound together as "Content Types". No coding.
• Database - WSS automatically stores all metadata in its own database without the need to create additional structures. No coding
• Connections - connections to the database handled by the WSS provisioning engine. No coding.
• Security - this is handled by WSS through NTLM, Kerberos, SSO or "Forms Based" authentication. No coding
• Authentication - this is done by IIS and WSS. No coding
• Optimising - WSS has built in caching components that can be configured using the browser.
• Scalability - the topology of WSS allows it to scale out into a farm configuration. All web pages are stored in the database as metadata and can therefore be rendered from any amount of WFE's.
• Auditing - WSS has built in audit trails.
• Web page builds - the provisioning engine of WSS creates web page on the fly without the need of coding them. The layouts can be controlled using the browser or SPD.

Why use Sharepoint for Application Development? Part I

B'coz we get so much as out of box feature in the new platform instead of using Visual Studio, C# etc for developing web based applications. Here also we may still need Visual Studio for many applications, but not to begin with. Building on this platform is cheaper, faster, less error prone and delivers more consistent user experience. So it doesn’t make sense to build a new application if platform provides all the stuff we need to develop the applications.

What we get as out of the box functionalities?
• Advanced document management
• Workflow
• Records
• Web content management
• Connection to get backend systems with BDC
• Collaborative spaces
• Search Centre
• Dash boards
• Excel services
• Forms Dev Environment

.Net Framework 3.0 in WSS 3.0

The following features of .Net Fraemwork 3.0 are used in WSS 3.0:

Windows Workflow Foundation (WF):
Windows Workflow Foundation (WWF) is a Microsoft technology for defining, executing, and managing workflow's. This is used extensively by WSS 3.0 to run built-in workflow's that ship with the product, but also provides the ability of building new and custom workflow's. This can either be done using Visual Studio or SPD (Sharepoint Designer).

Windows Communication Foundation (WCF):
The WCF programming model unifies web services, .NET Remoting, distributed transactions, and message queues into a single service-oriented programming model for distributed computing. This removes the complexity of trying to manager each of these methods individually in the application and also creates a standard to manage these communication mechanisms.

Windows Presentation Foundation (WPF):
WPF is a consistent programming model for building solutions that enables the use of richer controls, design, and development in Windows programs. This now allows the developer to easily insert and use components such as video, animation, 2/3D graphics, and various kinds of documents into the application whist removing the complexity of trying to use API's directly like we did in the past.

Windows CardSpace (WCS):
WCS (originally called Info Card) helps people keep track of their digital identities as distinct information cards. This allows easier authentications on many web sites without the need to re-enter usernames and passwords or even credit card information. It is also encrypted and therefore a lot more secure

Content Types in WSS 3.0

Content types are reusable settings for a specific type of content.These are used when we have to maintain different kinds of metadata about each kind of content. A content type is a group of reusable settings that describe the shared behaviors for a specific type of content.

Sharepoint Development

Whenever we refer "Sharepoint Development", we are not actually building a site but instead we are creating a "type" of site which are referred as "Site Definitions". We may create a new Team Site or a Document workspace or a Meeting workspace or a Blog or a Wiki site, but actually we are creating a type of site or definition of a site based on site templates. Site definitions are made up of features like document library, picture library or form library.
Sharepoint sites are not individual web applications,they have no pages of their own. They are nothing but data and only data. Everything is maintained in database (sql server) somewhere, but nothing on file system. If you look at the Sharepoint filesystem only handful of things will be present on file system, but everything else resides in database.

What is MOSS 2007?

WSS 3.0 is shipped free of cost with Windows 2003 Server. But MOSS 2007 is enhanced version of WSS 3.0 which is not available for free. MOSS 2007 stands for Microsoft Office Sharepoint Services 2007. MOSS 2007 is built over WSS 3.0, that means the base framework still remains WSS 3.0. So along with the core functionalities offered by the base framework, MOSS 2007 offers many more out of the box new functionalities. The following are the few of the new functionalities which I've listed:

Enterprise Content Management – i.e. Web Content Management.
• Business intelligence using Excel Services, Report Center & Search Center
BDC – provides the access to the external data residing within other business application enabling display and interaction with external data.
• Single Sign-On (SSO) - Allows the User to log onto a variety of applications with a single user name and password
• Business intelligence dashboards - Rich, interactive BI dashboards
• Personalization – Providing customized user browser experience.

What is WSS 3.0?

WSS 3.0 is a platform to develop collaborative applications along with this it also provides framework for document management for storing & sharing documents.

Previously Windows Sharepoint Services was only known as Document Management System (DMS). Over the years WSS has changed. Now WSS 3.0 has a dual nature. It was a storage application back in 2003. It still is a storage application, but it can now host web applications also.

WSS is at a stage where it can serve as both a solution and development platform.

Intro about me

I'm Vinay Chavadi, software professional with  more than 13 years of professional experience with extensive experience in architecture, design and implementation of software solutions, specializing in Microsoft technologies with around 5 years of experience in Sharepoint platform. Presently working as a Sharepoint Solution Architect in Global IT Company . Has experience in all phases of the software life cycle beginning with gathering requirements, architecture, design, implementation, testing, deployment and support phases. Has skills in building credibility, establish rapport, and maintain communication with stakeholders at multiple levels, including those external to the organization.

Core Competencies:

■Solution Selling
■Business Needs Assessment.
■Technology and Business Process Integration
■Collaboration Platforms (Sharepoint & Salesforce)

Specialties:MOSS 2007, Sharepoint 2010, WSS 3.0, Biztalk 2006 R2, Biztalk 2009, ASP.Net, C#, Salesforce, Force.com