A quick look on Sharepoint object model programs – Part 2

29 March, 2010 (12:04) | MOSS - Object Model, MOSS - Quick Look | By: G Vijai Kumar

In my previous post you can have a quick look on Sharepoint object model programs – Part 1

Here, once again am going to post Sharepoint object model programs (part 2) with minimum lines of code and are really handy, which are actually most useful even.

Show only BLOG sites:

//STS#0 – Team Site
//STS#1 – Blank Site
//STS#2 – Document Workspace
//MPS#0 – Basic Meeting Workspace
//MPS#1 – Blank Meeting Workspace
//MPS#2 – Decision Meeting Workspace
//MPS#3 – Social Meeting Workspace
//MPS#4 – Multipage Meeting Workspace
//WIKI#0 – Wiki
//BLOG#0 – Blog

static void Main(string[] args)
        {
            SPSite site = new SPSite("http://servername:port");
            foreach (SPWeb web in site.AllWebs)
            {
                string template = web.WebTemplate + "#" + web.Configuration;
                if (template.ToUpper() == "BLOG#0")
                {
                    Console.WriteLine(web.Title);
                }
            }
            Console.WriteLine("Press any key to continue.....");
            Console.ReadLine();
        }

Show services and status in Sharepoint server farm:

static void Main(string[] args)
        {
            SPServiceCollection services = SPFarm.Local.Services;
            foreach (SPService service in services)
            {
                Console.WriteLine("Service Name: {0}", service.Name);
                Console.WriteLine("Service Status: {0}", service.Status);
                Console.WriteLine("-------------------------------------");
            }
            Console.WriteLine("Press any key to continue.....");
            Console.ReadLine();
        }

Adding/Retrieving values to property bag:

static void Main(string[] args)
        {
            using (SPSite siteCollection = new SPSite("http://servername:port"))
            {
                using (SPWeb site = siteCollection.RootWeb)
                {
                    site.Properties.Add("TempKey", "TempValue");//Adding value
                    site.Properties.Update();

                    Console.WriteLine(site.Properties["TempKey"]);//Reading value
                }
            }
            Console.WriteLine("Press any key to continue.....");
            Console.ReadLine();
        }

Read files in a folder:

static void Main(string[] args)
        {
            SPSite site = new SPSite("http://servername:port");
            SPWeb web = site.OpenWeb();
            SPFolder folder = web.GetFolder("Shared Documents");
            SPFileCollection files = folder.Files;
            foreach (SPFile file in files)
            {
                Console.WriteLine(file.Name.ToString());
            }
            Console.WriteLine("Press any key to continue.....");
            Console.ReadLine();
        }

Get content database for all site collections:

 static void Main(string[] args)
        {
                SPSite site = new SPSite("http://CentralAdminSiteURL");
                SPFarm farm = site.WebApplication.Farm;
                SPWebService service = farm.Services.GetValue<SPWebService>("");
                foreach (SPWebApplication webapp in service.WebApplications)
                {
                    foreach (SPSite mysite in webapp.Sites)
                    {
                        Console.WriteLine(mysite.Url+" ----- "+ mysite.ContentDatabase.Name);
                    }
                }
            Console.WriteLine("Press any key to continue.....");
            Console.ReadLine();
        }

United Nations agencies websites powered by Sharepoint

13 March, 2010 (13:05) | Announcements, MOSS - General | By: G Vijai Kumar

The websites of United Nations Development Program – Solutions Network of Asia Pacific (UNDP-SNAP) and United Nations Office for Project Services (UNOPS) built with Sharepoint

The great gigantic sites http://www.snap-undp.org/ and http://www.unops.org/ already developed in Sharepoint, in order to:

  • Humanize user experience with feel of branding and look.
  • Modernizing the development with rich internet experience
  • Generalizing the content management system

The sites are heavily used over on internet, the folks of UNDP and UNOPS extensively developed, customized, branded the site one that cannot imagine the underlying supporting technology which was extended over on Internet web platform.

After bearing in mind a number of alternative solutions, UNDP made the conclusion to build its Solutions Network of Asia Pacific (SNAP) portal using Microsoft® Office SharePoint® Server 2007

From simple file sharing, e-mail messaging and phone communications, we have moved on and now have the capacity to share document libraries, participate in real-time discussion boards, have centralized communities of practice, and execute document check-in check-out using SharePoint Server 2007,” says Norman Sanders, Regional ICT Officer at UNDP Regional Centre, Bangkok.

Please look in to UNDP case study

It’s a breathing of fresh air when a website loads fast and clean, two good examples are UNDP-SNAP and UNOPS sites, proved by creating websites on Sharepoint platform loads very quickly. The UNOPS site supports multiple languages like Spanish, French including English.

UNDP - Solution Networks of Asia-Pacific

UNDP - Solution Networks of Asia-Pacific

United Nations Office for Project Services

United Nations Office for Project Services

MVP OPEN DAY 2010 at MSIDC, HYD

26 February, 2010 (15:17) | MVP | By: G Vijai Kumar

The MVP open day South Asia sessions started with the IT Pro Round table by Ravi Sankar, addressing the details how IT Pro evangelism team to be forwarded.

Then followed by the DPE Round table with Stuti Shukla. In DPE session we were asked to present our thoughts on topics like

Top 5 Challenges faced by developers

How Microsoft can better meet the needs of the SME segment

How they can compete more effectively in the web space.

Our team and all other presented excellent presentations, kept their thoughts. we have got the opportunity on including the thoughts on topic ‘Top 5 Challenges faced by developers’ where we had put out thoughts.

Stuti Shukla the collected all the feedback from the teams.

Following are few pictures at MVP open day

MVP Open Day accommodation at ISTA hotel, HYD

MVP Open Day accommodation at ISTA hotel, HYD

Group Photo at MSIDC, Hyderabad

Group Photo at MSIDC, Hyderabad

One more Group Photo

One more Group Photo

Karaoke Events

Karaoke Events

MSIDC campus, HYD

MSIDC campus, HYD

Microsoft Most Valuable Professional

8 January, 2010 (16:32) | Announcements | By: G Vijai Kumar

MVP Logo

MVP Logo

Happy to inform you that, on 1st January 2010 I have received a mail from Microsoft that I have been awarded as Microsoft Most Valuable Professional (MVP) in Sharepoint Server. What a surprise! I am so thrilled, thank you so much MICROSOFT for recognizing my contributions and honoring me with MVP award

The mail I received from Microsoft

Dear G Kumar,

Congratulations! We are pleased to present you with the 2010 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in SharePoint Server technical communities during the past year.

Also in this email:

* About your MVP Award Gift
* How to access www.mvpaward.com to begin taking advantage of your award benefits
* Your MVP Identification Number
* MVP Award Program Code of Conduct

The Microsoft MVP Award provides us the unique opportunity to celebrate and honor your significant contributions and say “Thank you for your technical leadership.”

Toby Richards
General Manager
Community & Online Support

***********************************************************************************************************

Yet another Sharepoint sample site template

12 November, 2009 (12:51) | MOSS - Customization with SPD, MOSS - Master Pages, MOSS - Site Templates | By: G Vijai Kumar

Here I created a simple sample Sharepoint site template with rounded corners.

This template allows you to create a new site with rounded corners around the webparts

Sharepoint Sample Master Page

Sharepoint Sample Site Template

Download the site template

Step by step installation:

  • Log into your SharePoint site
  • Go to Site Settings, under Galleries click on Site Template
  • Then, click on Upload to upload the site template on to the site
  • Browse to the downloaded file and click Open
  • Click Ok to complete the upload process and now the template is available for you to use

Step by step creating of site:

  • Log into your Sharepoint site
  • Go to Site Settings, under Site Administration section click on Sites and Workspaces
  • On Sites and Workspaces page click on Create for creating a new site
  • Provide the necessary information, then select Custom tab
  • You can see the uploaded template listed select the template 5NumberSiteTemplate_Pink.stp
  • Finally, click on Create