Thursday, April 28, 2011

Create a new SharePoint column in User Profile's list

How to get a hidden Sharepoint List for User Profile?
Here is the way to find out hidden user profile's list in sharepoint: At the top level site in site collection, type this url: /_catalogs/users/simple.aspx , that will give you User Information List's default view.

Go and edit this page(site action >> edit page), and than modifiy Shared webpart. It will give list view of this list, edit the current view. Edit will show the editable view of that user Profile's hidden list.

Now you got the place where you can see all the column from this hidden treasure, now it is the time to add a new column in this list, so you can use this column in your custom permission's code:

Here is the PowerShell to Create a New Coloumn in hidden site collection level's "User Information List"

$site= New-Object Microsoft.SharePoint.SPSite ("http://YourSiteName")
$list=$web.Lists["User Information List"]
$list.Fields.Add("Region1", "Text", 0)

Tuesday, April 19, 2011

WebMatrix - New Buzzword in IT Industry

WebMatrix is a free tool that allows you to create, customize and publish websites, Believe me It’s amazingly easy to use.
WebMatrix connects you to a world of popular and free open-source Web applications, including WordPress, DotNetNuke, Umbraco, Joomla!, Moodle, Drupal , and many more(till now 49 apps). You can select a website from built-in gallery, and WebMatrix will handle all the downloading and installation of your new Web site.

Here is the list of Features of WebMatrix which makes it very powerful and #1 development tool for the web development.
Features List of WebMatrix

  • Small, but complete package - It is free web development tool. It is small in size but very powerful tool.

  • Desktop based Web Development and Testing Environment - You will get the same powerful Web server(IIS Express), database engine(SQL CE4), and frameworks(MVC 3.0) that your Web site on the internet uses. This ensures that your transition from development to production is smooth and seamless.

  • Easy to Code - Start with HTML, CSS and JavaScript and then seamlessly connect to a database or add in dynamic server code using the new ‘Razor’ syntax for ASP.NET Web pages.

  • Webmatrix have intellisense - it also supports tag completion and hinting for standard HTML and CSS markup making it easier and faster for you to write code.

  • Simple Publishing - You can find host company to suite your need. Use webMatrix to find your web host which supports webmatrix.

  • Easy to cross bowser testing - You can test your site directly will diffrent browsers using webmartix tool.

  • Last but not least - It will connect you with lots of open source web applications(till the date i am writing this blog - 49 applications incliding most populars WordPress, DotNetNuke, Umbraco, Joomla!, Moodle, Drupal and more)

  • Make your site More Search engine friendly - Run an SEO report and find how to make your site more visible to search engines.

  • Code Helper is the best helping tool - Want to display a Twitter feed? Need to show a video? Code helpers make common tasks easy to do with just a simple tag in your HTML(Yes it is HTML not server side...).

  • Nice Interface with IDE, Database, IIS, FTP, and more - WebMatrix has rich code editor, a database editor, Web server management, Search Engine Optimization, FTP publishing, and many more..

  • Easy and Lightweight Database - Using a database has never been easier! WebMatrix includes a small, embedded database SQL Server CE 4. Copy that database from your machine to web server under bin folder and you are done.

  • Enjoy your Green coding @

Thursday, April 14, 2011

Compare powershell and STSAdm commands for SharePoint

Here is the Most important STSAdm commands which is used in Sharepoint 2007 for scripting. I have converted those comands into PowerShell, so you can compare and use it. Here is the sample to compare side by side STSAdm and PowerShell commands for Sharepoint:

    STSAdm Command
  • stsadm –o addsolution –filename “D:\Temp\YourSharePointSolution.wsp“

  • stsadm –o deploysolution –name YourSharePointSolution.wsp –url http://myspwebappp –allowgacdeployment –immediate

  • stsadm –o upgradesolution –name YourSharePointSolution.wsp –filename “D:\Temp\YourSharePointSolution.wsp” -immediate

  • stsadm –o retractsolution –name YourSharePointSolution.wsp –url http://myspwebapp –immediate

  • stsadm –o deletesolution –name YourSharePointSolution.wsp

  • stsadm –o activatefeature –name YourFeatureName –url http://YourSharePointWebApp

  • stsadm –o deactivatefeature –name YourFeatureName –url http://YourSharePointWebApp

  • stsadm -o execadmsvcjobs

  • stsadm -o userrole -userlogin "YourUserOrGroupName" -role "Approve" -add -url "http:/YourSPSite"

    PowerShell Command
  • Add-SPSolution “D:\Temp\YourSharePointSolution.wsp“

  • Install-SPSolution –Identity YourSharePointSolution.wsp –WebApplication http://myspwebapp –GACDeployment

  • Update-SPSolution –Identity YourSharePointSolution.wsp –LiteralPath “D:\Temp\YourSharePointSolution.wsp” –GacDeployment

  • Uninstall-SPSolution –Identity YourSharePointSolution.wsp –WebApplication http://myspwebapp

  • Remove-SPSolution–Identity YourSharePointSolution.wsp

  • Enable-SPFeature –Identity YourFeatureNameOrGuid –url http://YourSharePointWebApp

  • Disable-SPFeature –Identity YourFeatureNameOrGuid –url http://YourSharePointWebApp

  • Start-SPAdminJob -Verbose

  • New-SPUser – UserAlias ‘YourUserOrGroupName’–displayname ‘Your Display Name’ –web YourSPSite

Here is the complete list of stsadm command and their related PowerShell command: Click HERE