Thursday, October 31, 2013

SharePoint common Errors


Following are common errors occurs in SharePoint. Later, I will add the fixes for all these errors

503 - The service is unavailable

An unexpected error has occurred

Error: Access denied

Stuck on starting UPS service

page cannot be found 404

page cannot be displayed error

403 Error

Connection Error - can't not connecton the configuration database

Run time error

Webservice Errors

The workbook cannot be opened

FIMSynchronizationService Error

Error rendering control - Error in sharepoint designer

_spBodyOnLoadFunctionNames javascript error

SecurityTokenServiceApplication Error

Security Error

WorkFlow errors

SharePoint Tools


SharePoint Manager is a SharePoint object model explorer. 

U2U CAML Query Builder- It helps you to build CAML queries rapidly

Fiddler

SPDisposeChecker

SharePoint Designer

ULS Viewer

PowerGUI


Upload a videos to sharepoint


Go to your SharePoint site

Go to settings menu

Add an App

Click on Asset Library App and create it

Click on New Document menu link on Newly created Asset Library. Select Video content type

You can either directly upload the video or provide a link to video

Once you uploaded video, you can watch the video

Wednesday, October 30, 2013

What is AllowUnsafeUpdates in SharePoint?


If your code modifies Windows SharePoint Services data in some way, you may need to allow unsafe updates on the Web site, without requiring a security validation. You can do by setting the AllowUnsafeUpdates property.Otherwise you will get a security exception is follows. It protects the code from cross-site scripting attacks.


System.Exception: Microsoft.SharePoint.SPException: The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again. —>System.Runtime.InteropServices.COMException (0x8102006D): The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.

Tuesday, October 29, 2013

Setup DNS Record for your SharePoint Web Application


Create a new Web application using CA and mention the Host Header in the parameter.It could be something like mydomain.com

Logon to DNS Server

DNS Server -> DNS -> Forward Lookup Zones -> Select Zone -> Right Click n zone and Click New Host -> Enter Host Name as something like www or portal. Enter IP Address for the Web Application.


www
mydomain.com          


Go to IIS -> Select web app -> Go to site bindings -> Add the IP Address and save

Now you can able to ping the web app

www.mydomain.com



How to convert sandbox solution to farm solution and vice versa



Open the Project in Visual Studio

Click on Project Folder -> Select Project Properties -> Update the Sandboxed Solution property

Convert farm solution to sandbox solution

Update the Sandboxed Solution Property to true

Convert sandbox solution to farm solution

Update the Sandboxed Solution Property to false

Resolve Recycle IIS application pool Error in SharePoint

Solution

User should have DBO(db_owner) permissions on the Config Database and Admin database


How to handle large lists in SharePoint?


In SharePoint, Large lists are handled by using a concept called Throttling .

Throttling refers the no of items that will be queried from the List. A Threshold Limit will be applied by Administrators.

If we do not apply threshold limit and if users issues a queries to retrieve the large data, it will effect your system.

SharePoint supports 30,000,000 items per list.

The default List threshold value is 5k items which is available in the Central Administration

CA -> Manage Web Applications -> Click on Web App -> Select General Settings -> Select Resource Throttling









Service Applications in SharePoint 2013


  • Access Services
  • Access Services 2010
  • App Management Service
  • Business Data Connectivity Service
  • Excel Services Application
  • Machine Translation Service 
  • PerformancePoint Service Application
  • PowerPoint Automation Services
  • Managed Metadata Service Application
  • Search Service Application
  • Secure Store Service
  • State Service
  • User and Health Data Collection Service
  • User Profile Service Application
  • Visio Graphics Service
  • Word Automation Services
  • Work Management Service Application
  • Microsoft SharePoint Foundation Subscription Settings Service


Monday, October 28, 2013

Error Logging in SharePoint


Three are 2 sections where you can log the SharePoint Errors.

1. ULS Logs
2. Event Logs

Detailed steps are given below:

1. Configure ULS Logging

CA -> Monitoring section -> Reporting Section -> Configure diagnostic logging.

The default location is C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS. If you want, you can change the Log path on all servers in the farm. 

Use SPDiagnosticsService.Local.WriteTrace to write the entries into ULS logs

2. Event Logging


Use EventLog.WriteEntry to entries to event log. It is derived from System.Diagnostics class

Example:

EventSource = “CustomEvent”

if (!EventLog.SourceExists(EventSource ))
    EventLog.CreateEventSource(EventSource ,”Application”);

EventLog.WriteEntry(EventSource,Errormessage,EventLogEntryType.Error);

How to use Captcha control in ASP.NET, PHP or SharePoint

Go to following link and Sign up and follow the steps documentation for implementation:

 http://www.google.com/recaptcha/whyrecaptcha

Use the javascript to generate the Captcha control add the script into your page

http://download.cnet.com/Internet-Captcha/3000-10247_4-10824424.html

http://sourceforge.net/projects/easyjscaptcha/

All the above links are free to use anywhere.

Saturday, October 26, 2013

Create and Configure the Search Service Application in SharePoint


You can create and configure the Search Service Application either manually or through Powershell Automation

Go to CA -> Manage Service Application -> Click New Search Service Application

Enter proper name for Search Service App

Create a Service Account in AD. Enter a new App Pool and select service account. Click on OK button. Now Search Service Application will be created.

When search service app is created, following 3 databases will be created in the database server

Administration Database 
Crawl database 
Property Database 

Create a service account for Default Content Access Account. Register this a/c as Managed Account

Update Default content access account in Search Administration Page. This Account will be used for crawling the content

Add the Crawl Account to the Policy of web applications with Full Read Permissions.

By default, A Local SharePoint sites content source will be created. If you want to add more content sources, you can add more content sources in Content Sources Section

Now Click on content menu of Local SharePoint sites item, select the Crawl options 

Finally if you want move Query Servers and Index Servers to different servers in a farm, You can configure those options in Crawl/Query Topolpgy sections.

Add Page Views Counter to your Blog site


Easy to add Page Views Widget to your Blog:

http://bloggerhitcounter.com/

Steps to Deploy InfoPath form into SharePoint



Design An InfoPath form using InfoPath designer tool. Deploy InfoPath form templates using publish option in InfoPath Designer. You cannot create a form based screens as an out-of-box feature in SharePoint. The simple and easy way to create a form based screens by using InfoPath Form designer. 

For example, you can create Leave Application form using InfoPath tool and deploy it in SharePoint environment. 

Just drag and drop the controls into the InfoPath Form and write a code behind using VSTA and save the form.

There are 3 ways to deploy InfoPath form to SharePoint environment.

1. To a SharePoint Form Library - This option will deploy an InfoPath form template to a SharePoint form library. You can just deploy InfoPath form template directly to a SharePoint form library when you don’t need to use any other location.

2. As a SharePoint content type - If you want to reuse across several sites and document libraries, deploy it as Content Type

3. As an administrator-approved form template

If you write  .NET managed code in InfoPath form, use Administrator-approved deployment step

When you deploy the InfoPath  form in this way, you have to first download template file to some location.Go to central administration, Click on Manage Form Templates library section, Upload the template which was saved earlier and Activate the form template to site collection

If you want to associate this form template to any form library, Create form library in any site. Go to Advanced settings page, select your form template from Site Content type gallery. Now you can create forms and save the forms.

Another way to deploy the InfoPath form as a feature.

Create Project using Visual Studio, Add module item and attach xsn file to the Module

Create a feature to the project. define all the XML nodes in the feature.xml file.

Save and Deploy the Project.

Go to Central Admin-> Application Management -> Manage Form Templates -> Locate the template file

Friday, October 25, 2013

Site Templates in SharePoint

Site template that are available in SharePoint 

 List of commonly used Site Templates in SharePoint 2010:


  •  Team Site 
  •  Blank Site
  •  Document Workspace
  •  Blog
  •  Group Work Site,
  •  Visio Process Repository, 
  •  Basic Meeting Workspace
  •  Blank Meeting Workspace 
  •  Decision Meeting Workspace 
  •  Social Meeting Workspace 
  •  Multipage Meeting Workspace ,
  •  Document Center ,  
  •  Records Center
  •  Business Intelligence Center 
  •  My Site Host
  •  Personalization Site
  •  Enterprise Search Center
  •  Basic Search Center 
  •  FAST Search Center 
  •  Enterprise Wiki
  •  Publishing Portal
  • Publishing Site
A preview of all above site templates are listed from ref:

Usage Reports in SharePoint 2013


We do not have Web Analytics feature in the sharepoint 2013. A new feature is introduced to get the site usage reports is called Analytics feature

If you want to view site usage reports of your site or web, Here is the procedure

Site Settings -> Click on Popularity Trends on Site Adminitrsation section -> View Usage Report

Programmatically if you want get the information:

$mysearchApp = Get-SPEnterpriseSearchServiceApplication
$site = Get-SPSite "site url"
$web =  Get-SPWeb "web url"
$myusageData = $mysearchApp.GetRollupAnalyticsItemData(1,[System.Guid]::Empty,$site.ID,$web.ID)


If you are looking at the site collection level

$myusageData = $mysearchApp.GetRollupAnalyticsItemData(1,[System.Guid]::Empty,$site.ID,Guid.Empty)

Hide a Column in List View Web part


Add Content Editor Web Part to form. Make sure to refer JQuery library


Replace "name" with your column name

<script type="text/javascript">
$(document).ready(function()
{

    $('nobr:contains("name")').closest('tr').hide()
  
});
</script>

Thursday, October 24, 2013

How to create charts from Custom List in SharePoint?


In sharepoint 2013, chart webpart is not available. Use Google Chart API


What is SharePoint?


Microsoft SharePoint is an enterprise collaboration and content management platform using which we can share the information. Using SharePoint we can create web sites on the fly. We have document management features like sharing of documents across the organisation. We can quickly search the content across the sites. We have various out-of-box web parts using which we can develop the web pages in short period of time just by drag and dropping the components. 

SharePoint versions history


  • SharePoint Portal Server 2001 (SPS 2001)
  • STS (SharePoint Team Services)
  • WSS (Windows SharePoint Services)
  • SharePoint Portal Server 2003 (SPS 2003)
  • MOSS 2007
  • SharePoint 2010
  • SharePoint 2013


SharePoint Migration tools



DocAve SharePoint Migration for Microsoft SharePoint : http://avepoint.com/sharepoint-to-sharepoint-migration-docave/

Quest Migration Manager for SharePoint : http://www.quest.com/migration-manager-for-sharepoint/

Metalogix SharePoint Site Migration Manager 2010 : http://www.metalogix.net/Products/SharePoint-Site-Migration-Manager-2010/


Another  3rd party migration tool : http://www.tzunami.com/products/td-sp2013-migration/

SharePoint 2010 Web Parts


An excellent information from Jason:

Cross Post from http://blogs.msdn.com/b/jpic/archive/2010/03/08/sharepoint-2010-out-of-the-box-web-parts.aspx

Lists and Libraries - These are similar to the same Web Parts offered in MOSS 2007.

- Announcements
- Calendar
- Contacts
- Links
- Shared Documents
- Sites Assets - Use this library to store files which are included on page within the site such as images on Wiki pages
- Tasks
- Team Discussions

Business Data

- BusinessData Actions
- Business Data Connectivity Filter
- Business Data Item
- Business Data Item Builder
- Business Data List
- Business Data Related List
- Indicator Details
-Status List

Content Rollup

- Content Query
- HTML Form Web Part
- Picture LIbrary Slideshow Web Part
- RSS Viewer
- Web Analytics Web Part - Displays the most viewed content, most popular search queries, or most popular clicked search results as reported by Web Analytics fo rthe site or site collection
- XML Viewer

Documents

- Document Set Contents - Displays the contents of the Document Set
- Document Set Properties - Displays the properties of the Document Set
- Enter a Document ID - Finds a document by its Document ID
- Relevent Documents - Displays documents that are relevent to the current user

Filters

- Choice Filter
- Current User Filter
- Date Filter
- Filter Actions
- Page Field Filter
- Query String (URL) Filter
- SharePoint List Filter
- SQL Server Analysis Services Filter
- Text Filter

Media and Content

- Content Editor
- Image Viewer
- Media Web Part - Use to embed media clisp (video and audio) in web page
- Page Viewer
- Silverlight Web Part - A Web Part to display a Silverlight application

My Information

- My Calendar
- My Contacts
- My Inbox
- My Mail Folder
- My Tasks

Navigation

- Categories
- Site Aggregator
- Sites in Category
- Summary Links
- Table of Contents
- Tag Cloud - Displays the most popular subjects being tagged inside your organization

Office Client Applications

- Excel Web Access
- InfoPath Form Web Part - Use this Web Part to display an InfoPath browser-enabled form
- Visio Web Access - Enables viewing and refreshing of published Visio Diagrams
- WSRP Viewer

People

- Contact Detail
- Note Board - Enables users to leave short, publicly-viewable notes about a page
- Organization Browser - Displays each person in the reporting chain in the interactive view optimized for browsing organization charts
- Site Users
- User Taskis

Performance Point
- PerformancePoint Filter
- PerformancePoint Report
- PerformancePoint Scorecard
- PerformancePoint Stack Selector

Search

- Advanced Search Box
- Dual Chinese Search - Used to search Dual Chinese documentand items at the same time
- Federated REsults
- People Refinment Panel - This web part helps the users to refine people search results
- People Search Box
- People Search Core Results
- Refinement Panel - used to refine results
- Related Queries
- Search Action LInks
- Search Best Bets
- Searhc Box
- Search Core Results
- Search Paging
- Search Statistics
- Search Summary
- Search Visual Best Bet - displays visual best bets
- Search Federated Results

Miscellaneous

- Chart Web Part - Helps you visualize yoru data on SharePoint Sites and portals

Migrate Site Collection of one web application into another Web Application


The first approach, a site collection backup performed by STSADM.exe –o backup –url <urL> or use Backup-SPSite cmdlet.

The other approach, a site collection export performed by STSADM.exe –o export or use Export-SPWeb

The Export approach generated a new GUID for every objects such as sites, sub sites, lists and items.

If you want to move entire site collection, use Backup/Restore method

If you want to move a subsite use Export/Import method

How to run the command using PowerShell:

On the Start menu, click All Programs.

Click Microsoft SharePoint 2010 Products.

Click SharePoint 2010 Management Shell.

Export-SPWeb siteurl –Path C:\sitebackup.bak

If you want to export/import the sites

Backup-SPSite -Identity "https://../sites/oldsite" -Path "C:\sitebackup.bak"

Restore-SPSite -Identity "https://../sites/newsite" -Path "C:\sitebackup.bak"

If you want to move entire site collection from Farm A to Farm B, Following are the steps:

1. Create a empty web application in Farm B. Dont create any site collections

2. Copy the source database to the Target database.

3. Use Mount SP Database on the Farm B

4. Take a backup of the site collection from Farm A and Restore it on Farm B

Wednesday, October 23, 2013

Apps in SharePoint 2013


App is an application that runs outside the SharePoint server. It will be executed on the client side. App can be considered as small web application that can be re-used anywhere.

Apps communicate with SharePoint via OData and CSOM. 


There are certain limitations using farm solutions or Sandboxed solutions.


There are 3 types of Apps


1. Provider Hosted App - Designed to deploy it in separate server environmet


2. Auto-Hosted App  - Designed to deploy it in Azure


3. SharePoint-Hosted App - Designed to deploy it in your local SharePoint environment


You can develop Apps using Visual Studio 2012 or NAPA



Apps Advantages:


  • Easy to Install, Buy and Sell from App Store
  • Scalability
  • Reusablity
  • Stability


If you want to download  Sample Apps


http://apps.codeplex.com/releases/view/91377

Open a Modal Window in SharePoint

Script to open modal popup window.

<script type="text/javascript">

function openDialogWindow()
{

var options =
{

width: 800,
height: 600,
url: 'your url',
title: "Sample Title"
};

SP.UI.ModalDialog.showModalDialog(options);

 </script>

 <a href="#" onclick="javascript:openDialogWindow();">Click Me</a> 

Tuesday, October 22, 2013

Why Managed Meta data in SharePoint



Managed metadata is a centralized hierarchical collection of data. Organize the data in an hierarchical manner at one point as Taxonomy. If you update the data in store, it will be applied to entire site collection wherever you are using the data. Its like a common meta data that can be used at different locations. If you want to attach this data to list or library, attach this with metadata column. If you do not manage the data at one point, different user use this meta data as different manners and there will not any control of the data. When you search the data, the same data will be presented different types and there will be confusion.

Create and Configure Managed Metadata service in Central Administration. You can define and structure the data using Term Store management tool in CA.

The main root element can be defined as Term Store.

Next level of Items can be treated as Term Groups

The Items which are placed under Term Groups are called Term Sets

Finally Term Sets has collection of Terms.




Visual Studio 2012 project templates for SharePoint 2013


If you want to work with Apps or SharePoint Development templates using Visual Studio 2012, you need to install Microsoft Office Developer Tools for Visual Studio 2012, Below is the link:

http://msdn.microsoft.com/en-US/office/apps/fp123627

Remove unwanted Ads on Google Chrome Browser

Navigate  to Google Chrome Webstore

https://chrome.google.com/webstore

Search for AdBlock

Click AdBlock Plus extension to install it on your Browser

Now you are free from Ads on your Browser


Monday, October 21, 2013

Creating Custom Application Page in SharePoint 2010 or 2013



There are 2 types of Pages in SharePoint 

1. Application Page
2. Site Pages

Site Pages can be customized but Application pages cannot be customized. Site Pages are stored in Content Database while Application pages are stored in 12/14/15 hive file path(Layouts folder). Application will be displayed much faster that Site Pages.Moreover, Application pages can be used across all sites within your SharePoint farm

Basically the application pages are used for modifying server configurations. Sometimes you may get a requirement to create page like asp.net page in SharePoint and place the link in central administration area. 

Create an Application Page using Visual Studio in few steps.

Start Visual Studio 2010/2012

Select New Empty Project

Add New Item -> Add Application Page from Templates

Rename the folder as SampleApplicationPage and ASPX page. Design the layout and Add Code behind files

For testing, Open the ASPX page and add a simple label control to the page with in-line coding style.

<asp:Label Text="Sample Appication Page" runat="server" ></asp:Label>

Save Project and Build and Deploy

Test the Page

http://site/_layouts/SampleApplicationPage/SampleApplicationPage .apsx

You will get Sample Application Page as an Output.

You can place other controls and add the code according to your requirement and use in your project.


Sunday, October 20, 2013

Do you want to search items in GMail sent items folder?

Use following format:

Go to Search text box, Type:

is:sent keyword


Earn Money Online



Looking to earn money online ? Follow the link.........

http://www.clixsense.com

Let me know any other web site which pays more.....

Excel Services and PerformancePoint Services in SharePoint

Excel Services and PerformancePoint Services are used primarily for business intelligence scenarios.

Excel Services:

Just Upload a Excel file into Document Library

Create a webpart page. Insert Excel Web Access Webpart and configure the webpart to display the Excel data

Using REST API, you can display the data as Chart or Graph

You need to setup an Unattended Account in Secure Store Service app to display the data without asking for any credentials.  Start the Claims to Windows Token Service if it is not running.

Performance Point Services:

Create a Secure Store target Application using CA

Create Performance Point Service Application using CA and set the Unattended Account

Associate the PPS to the Web Application

Activate the PPS site collection featrues

Create a Site Collection using Business Intelligence Center template

Click on Start using Performance Point services

Click on Run Dashboard Designer

Now you can create a Dashboard for your data.



Saturday, October 19, 2013

Quick Steps for Creating Custom Timer Job in SharePoint



Simple Step By Step procedure for creating custom timer job in SharePoint. Its summary quick steps for anyone who has already created custom timer job.  

Open Visual Studio 2010 -> Create New Empty SharePoint Project - >

Right Click solution -> Add New Item -> Add Class -> It should inherit from SPJobDefinition  class

Right clikc on features -> Add feature -> Add Event Receiver -> Go to FeatureActivated method -> Invoke Timer Job

Go to FeatureDeActivated method -> Delete Timer Job

Save the solution -> Click on Deploy

Go to Monitoring -> Job Definitions -> You can find your timer job

How to Create MySite in SharePoint 2013



Create a Web Application -> Go to CA -> Manage Web Applications

Create a Site Collection -> Choose web application which was created earlier -> Select "My Site Host" template. 

Manage web application -> Select Managed Paths -> Add a new path such as "Personal"
-> Turn on Self-Service Site Creation

Create a custom permission policy > Add this policy to Policy for Web Application

 Manage service applications -> User Profile service application -> Setup My Sites ->   Add url to My Site Host

Monitoring -> Timer Job -> Review job definitions -> Click the activity feed job for the User Profile service application - > Change the schedule -> click on Run

Your mysite is ready




Generate your own video from your PC or Laptop

Install Windows Movie maker

Open Windows Movie Maker

Capture Video -> Select Capture from video device

Difference between WFE and Application Server in SharePoint

Web Front Server has the following services:

       Microsoft SharePoint Foundation Web Application Service

       Central Administration


Application Server has the following services:


          Excel Services, Managed Metadata, Access db service, UPS etc


WFE servers are usually balanced with NetworkLoadBalancing

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered

When you open Powershell window, you may get an error like: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered. Following are the solutions to resolve this problem.

Method1:

Go to you SharePoint 2010 management shell  properties

Go to properties -> Select target -> Add "–version 2" before -NoExit argument


Method 2:

You do not have appropriate permissions to Config database.  

SharePoint_Shell_Access
DB_owner

If you know better ways Let us know via comments

Friday, October 18, 2013

Buy an App from SharePoint Store

The SharePoint Store is a place where you can buy apps from third-party developers. You need a Microsoft Acount to buy an App.

http://office.microsoft.com/en-in/sharepoint-help/buy-an-app-from-the-sharepoint-store-HA102897470.aspx

Best Code Review or Analysis Tools for Programming Languages

Sharepoint CAML query to fetch data from multiple Custom Lists - SPSiteDataQuery


Use SPSiteDataQuery  to fetch the data from multiple custom lists.

Code Examples are given below:

Retrieve data from Multiple Lists;

        SPSiteDataQuery query = new SPSiteDataQuery();
        query.Lists = "<Lists ServerTemplate=\"105\" />";
        query.Query = "<Where><Gt><FieldRef Name='colname'/>" +
"<Value Type='datatype'>somevalue</Value></Gt>
</Where>";
        DataTable dataTable = web.GetSiteData(query);
     
Fetch data from specific Lists;

       string  strListIDs += "<Lists>";
       strListIDs += "<List ID='GUID'/>";
       ListIDs += "<List ID='GUID'/>";
       strListIDs += "</Lists>";
       query.Lists = strListIDs ;
       query.ViewFields = "<FieldRef Name ='Title' />";
     DataTable dataTable = web.GetSiteData(query);

Thursday, October 17, 2013

Learning SharePoint

Learn basics of SharePoint from the Videos. An excellent source:

http://technet.microsoft.com/en-us/sharepoint/ee518660

How to sum Calculated Columns in SharePoint

Create a custom view 

Edit the view in SharePoint Designer. 

You will right-click the view and convert to XSLT,

Perform the Calculations

A Good Example

http://blog.metrostarsystems.com/2012/12/03/jennys-sharepoint-tip-sum-calculated-columns/

Only machine administrators are allowed to create administration service job definitions

Following is the procedure to resolve this issue:
  •   Start -> Control Panel.
  •   In Control Panel, click User Accounts.
  •   In the User Accounts window, click User Accounts.
  •  In the User Accounts tasks window, click Turn User Account Control on or off.
  •  If UAC is currently configured in Admin Approval Mode, the User Account Control message appears. Click Continue.
  •  Clear the Use User Account Control (UAC) to help protect your computer check box, and then click OK.
  • Click Restart Now to apply the change right away, or click Restart Later and close the User Accounts tasks window

List of Templates available in SharePoint


0 - GLOBAL (SetupPath=global) - "Global template"
1 - STS - "windows SharePoint Services Site", "Team Site", "Blank Site", "Document Workspace"
2 - MPS - "Basic Meeting Workspace", "Blank Meeting Workspace", "Decision Meeting Workspace", "Social Meeting Workspace", "Multipage Meeting Workspace"
3 - CENTRALADMIN - "Central Admin Site"
4 - WIKI - "Wiki Site"
7 - BDR - "Document Center"
9 - BLOG - "Blog"
20 - SPS (OBSOLETE) - "SharePoint Portal Server Site"
21 - SPSPERS - "SharePoint Portal Server Personal Space"
22 - SPSMSITE - "Personalization Site"
30 - SPSTOC (OBSOLETE) - "Contents area Template"
31 - SPSTOPIC (OBSOLETE) - "Topic area template"
32 - SPSNEWS (OBSOLETE) - "News area template"
33 - SPSNHOME (SubWebOnly) - "News Home template"
34 - SPSSITES - "Site Directory area template"
36 - SPSCOMMU (OBSOLETE) - "Community area template"
38 - SPSREPORTCENTER - "Report Center Site"
39 - CMSPUBLISHING (SetupPath=SiteTemplates\PUBLISHING) - "Publishing and Team Collaboration Site"
40 - OSRV (SetupPath=SiteTemplates\OSRV) - "Shared Services Administration Site"
47 - SPSPORTAL - "Corporate Intranet Site"
50 - SRCHCEN - "Search Center"
51 - PROFILES - "Profiles"
52 - BLANKINTERNETCONTAINER - "Internet Presence Web Site"
53 - BLANKINTERNET - "Publishing Site", "Press Releases Site", "Publishing Site"
54 - SPSMSITEHOST - "My Site Host"
90 - SRCHCENTERLITE (SetupPath=SiteTemplates\SRCHCENTERLITE) - "Search Center Lite"
6221 - PWA (SetupPath=SiteTemplates\PWA) - "Project Web Access Site"
6215 - PWS (SetupPath=SiteTemplates\PWS) - "Project Workspace"
14483 - OFFILE - "Records Repository", "Records Repository"

Powershell Commands quick Reference and Purpose of each Command


Use Get-Help command to get an information about cmdlet.


One of the really nice features of Windows PowerShell is the fact that it includes a very extensive help system, which just happens to be incorporated right into the shell itself. Once you know the name of a cmdlet, you can get additional information on that cmdlet by calling the Get-Help cmdlet:



Reference from the Microsoft Press book Windows PowerShell 2.0 Administrator’s Pocket Consultant by William R. Stanek.



Add-BitsFileAdds one or more files to an existing Background Intelligent Transfer Service (BITS) transfer job.
Add-ComputerAdds the local computer to a domain or workgroup.
Add-ContentAdds content to the specified items, such as adding words to a file.
Add-HistoryAppends entries to the session history.
Add-MemberAdds a user-defined custom member to an instance of a Windows PowerShell object.
Add-PSSnapinAdds one or more Windows PowerShell snap-ins to the current session.
Add-TypeAdds a Microsoft .NET Framework type (a class) to a Windows PowerShell session (PSSession).
Checkpoint-ComputerCreates a system restore point on the local computer.
Clear-ContentDeletes the contents of an item, such as deleting the text from a file, but does not delete the item.
Clear-EventLogDeletes all entries from specified event logs on the local or remote computers.
Clear-HistoryDeletes entries from the command history.
Clear-ItemDeletes the contents of an item but does not delete the item.
Clear-ItemPropertyDeletes the value of a property but does not delete the property.
Clear-VariableDeletes the value of a variable.
Compare-ObjectCompares two sets of objects.
Complete-BitsTransferCompletes a BITS transfer job.
Complete-TransactionCommits the active transaction.
Connect-WSManConnects to the Windows Remote Management (WinRM) service on a remote computer.
ConvertFrom-CSVConverts object properties in comma-separated value (CSV) format into CSV versions of the original objects.
ConvertFrom-SecureStringConverts a secure string into an encrypted standard string.
ConvertFrom-StringDataConverts a string containing one or more key/value pairs to a hash table.
Convert-PathConverts a path from a Windows PowerShell path to a PowerShell provider path.
ConvertTo-CSVConverts .NET Framework objects into a series of CSV variable-length strings.
ConvertTo-HtmlConverts .NET Framework objects into HTML that can be displayed in a Web browser.
ConvertTo-SecureStringConverts encrypted standard strings to secure strings. It can also convert plain text to secure strings. It is used with ConvertFrom-SecureString and Read-Host.
ConvertTo-XMLCreates an XML-based representation of an object.
Copy-ItemCopies an item from one location to another within a namespace.
Copy-ItemPropertyCopies a property and value from a specified location to another location.
Debug-ProcessDebugs one or more processes running on the local computer.
Disable-ComputerRestoreDisables the System Restore feature on the specified file system drive.
Disable-PSBreakpointDisables breakpoints in the current console.
Disable-PSSessionConfigurationDenies access to the session configurations on the local computer.
Disable-WSManCredSSPDisables Credential Security Service Provider (CredSSP) authentication on a client computer.
Disconnect-WSManDisconnects the client from the WinRM service on a remote computer.
Enable-ComputerRestoreEnables the System Restore feature on the specified file system drive.
Enable-PSBreakpointEnables breakpoints in the current console.
Enable-PSRemotingConfigures the computer to receive remote commands.
Enable-PSSessionConfigurationEnables session configurations on the local computer.
Enable-WSManCredSSPEnables CredSSP authentication on a client computer.
Enter-PSSessionStarts an interactive session with a remote computer.
Exit-PSSessionEnds an interactive session with a remote computer.
Export-AliasExports information about currently defined aliases to a file.
Export-ClixmlCreates an XML-based representation of an object or objects and stores it in a file.
Export-ConsoleExports the names of snap-ins in the current session to a console file.
Export-CounterTakes PerformanceCounterSampleSet objects and exports them as counter log files.
Export-CSVConverts .NET Framework objects into a series of CSV variable-length strings and saves the strings in a CSV file.
Export-FormatDataSaves formatting data from the current session in a formatting file.
Export-ModuleMemberSpecifies the module members that are exported.
Export-PSSessionImports commands from another session and saves them in a Windows PowerShell module.
ForEach-ObjectPerforms an operation against each of a set of input objects.
Format-CustomUses a customized view to format the output.
Format-ListFormats the output as a list of properties in which each property appears on a new line.
Format-TableFormats the output as a table.
Format-WideFormats objects as a wide table that displays only one property of each object.
Get-AclGets the security descriptor for a resource, such as a file or registry key.
Get-AliasGets the aliases for the current session.
Get-AppLockerFileInformationGets the AppLocker file information from a list of files or an event log.
Get-AppLockerPolicyGets the local, effective, or domain AppLocker policy.
Get-AuthenticodeSignatureGets information about the Authenticode signature in a file.
Get-BitsTransferRetrieves the associated BitsJob object for an existing BITS transfer job.
Get-ChildItemGets the items and child items in one or more specified locations.
Get-CommandGets basic information about cmdlets and other elements of Windows PowerShell commands.
Get-ComputerRestorePointGets the restore points on the local computer.
Get-ContentGets the content of the item at the specified location.
Get-CounterGets performance counter data from local and remote computers.
Get-CredentialGets a credential object based on a user name and password.
Get-CultureGets the current culture set in the operating system.
Get-DateGets the current date and time.
Get-EventGets the events in the event queue.
Get-EventLogGets the events in an event log, or a list of the event logs, on the local or remote computers.
Get-EventSubscriberGets the event subscribers in the current session.
Get-ExecutionPolicyGets the execution policies for the current session.
Get-FormatDataGets the formatting data in the current session.
Get-HelpDisplays information about Windows PowerShell commands and concepts.
Get-HistoryGets a list of the commands entered during the current session.
Get-HostGets an object that represents the current host program. Also displays Windows PowerShell version and regional information by default.
Get-HotFixGets the hotfixes that are applied to the local and remote computers.
Get-ItemGets the item at the specified location.
Get-ItemPropertyGets the properties of a specified item.
Get-JobGets Windows PowerShell background jobs that are running in the current session.
Get-LocationGets information about the current working location.
Get-MemberGets the properties and methods of objects.
Get-ModuleGets the modules that are imported or that can be imported into the current session.
Get-PfxCertificateGets information about .pfx certificate files on the computer.
Get-ProcessGets the processes that are running on the local computer or a remote computer.
Get-PSBreakpointGets the breakpoints that are set in the current session.
Get-PSCallStackDisplays the current call stack.
Get-PSDriveGets the Windows PowerShell drives in the current session.
Get-PSProviderGets information about the specified Windows PowerShell provider.
Get-PSSessionGets the Windows PSSessions in the current session.
Get-PSSessionConfigurationGets the registered session configurations on the computer.
Get-PSSnapinGets the Windows PowerShell snap-ins on the computer.
Get-RandomGets a random number or selects objects randomly from a collection.
Get-ServiceGets the services on a local or remote computer.
Get-TraceSourceGets the Windows PowerShell components that are instrumented for tracing.
Get-TransactionGets the current (active) transaction.
Get-TroubleshootingPackGets information about a troubleshooting pack and can generate an answer file.
Get-UICultureGets the current user interface (UI) culture settings in the operating system.
Get-UniqueReturns the unique items from a sorted list.
Get-VariableGets the variables in the current console.
Get-WinEventGets events from event logs and event tracing log files on local and remote computers.
Get-WmiObjectGets instances of Windows Management Instrumentation (WMI) classes or information about the available classes.
Get-WSManCredSSPGets the CredSSP-related configuration for the client.
Get-WSManInstanceDisplays management information for a resource instance specified by a Uniform Resource Identifier (URI).
Group-ObjectGroups objects that contain the same value for specified properties.
Import-AliasImports an alias list from a file.
Import-ClixmlImports a CLIXML file and creates corresponding objects within Windows PowerShell.
Import-CounterImports performance counter log files (.blg, .csv, .tsv) and creates the objects that represent each counter sample in the log.
Import-CSVConverts object properties in a CSV file into CSV versions of the original objects.
Import-LocalizedDataImports language-specific data into scripts and functions based on the UI culture that is selected for the operating system.
Import-ModuleAdds modules to the current session.
Import-PSSessionImports commands from another session into the current session.
Invoke-CommandRuns commands on local and remote computers.
Invoke-ExpressionRuns commands or expressions on the local computer.
Invoke-HistoryRuns commands from the session history.
Invoke-ItemPerforms the default action on the specified item.
Invoke-TroubleshootingPackExecutes a troubleshooting pack in interactive or unattended mode to fix a problem and then generates a results report.
Invoke-WmiMethodCalls WMI methods.
Invoke-WSManActionInvokes an action on the object that is specified by the Resource URI and by the selectors.
Join-PathCombines a path and a child path into a single path. The provider supplies the path delimiters.
Limit-EventLogSets the event log properties that limit the size of the event log and the age of its entries.
Measure-CommandMeasures the time it takes to run script blocks and cmdlets.
Measure-ObjectCalculates the numeric properties of objects and the characters, words, and lines in string objects, such as files of text.
Move-ItemMoves an item from one location to another.
Move-ItemPropertyMoves a property from one location to another.
New-AliasCreates a new alias.
New-AppLockerPolicyCreates a new AppLocker policy from a list of file information and other rule creation options.
New-EventCreates a new event.
New-EventLogCreates a new event log and a new event source on a local or remote computer.
New-ItemCreates a new item.
New-ItemPropertyCreates a new property for an item and sets its value. For example, you can use New-ItemProperty to create and change registry values and data, which are properties of a registry key.
New-ModuleCreates a new dynamic module that exists only in memory.
New-ModuleManifestCreates a new module manifest.
New-ObjectCreates an instance of a Microsoft .NET Framework or Component Object Model (COM) object.
New-PSDriveCreates a Windows PowerShell drive in the current session.
New-PSSessionCreates a persistent connection to a local or remote computer.
New-PSSessionOptionCreates an object that contains advanced options for a PSSession.
New-ServiceCreates a new Windows service.
New-TimeSpanCreates a TimeSpan object.
New-VariableCreates a new variable.
New-WebServiceProxyCreates a Web service proxy object that lets you use and manage the Web service in Windows PowerShell.
New-WSManInstanceCreates a new instance of a management resource.
New-WSManSessionOptionCreates a WS-Management session option hash table to use as input parameters to the followingWS-Management cmdlets: Get-WSManInstance, Set-WSManInstance, Invoke-WSManAction, Connect-WSMan.
Out-DefaultSends the output to the default formatter and to the default output cmdlet.
Out-FileSends output to a file.
Out-GridViewSends output to an interactive table in a separate window.
Out-HostSends output to the command line.
Out-NullDeletes output instead of sending it to the console.
Out-PrinterSends output to a printer.
Out-StringSends objects to the host as a series of strings.
Pop-LocationChanges the current location to the location most recently pushed onto the stack. You can pop the location from the default stack or from a stack that you create by using the Push-Location cmdlet.
Push-LocationAdds the current location to the top of a list of locations (a stack).
Read-HostReads a line of input from the console.
Receive-JobGets the results of the Windows PowerShell background jobs in the current session.
Register-EngineEventSubscribes to events that are generated by the Windows PowerShell engine and by the New-Event cmdlet.
Register-ObjectEventSubscribes to the events that are generated by a Microsoft .NET Framework object.
Register-PSSessionConfigurationCreates and registers a new session configuration.
Register-WmiEventSubscribes to a WMI event.
Remove-BitsTransferCancels a BITS transfer job.
Remove-ComputerRemoves the local computer from a workgroup or domain.
Remove-EventDeletes events from the event queue.
Remove-EventLogDeletes an event log or unregisters an event source.
Remove-ItemDeletes the specified items.
Remove-ItemPropertyDeletes the property and its value from an item.
Remove-JobDeletes a Windows PowerShell background job.
Remove-ModuleRemoves modules from the current session.
Remove-PSBreakpointDeletes breakpoints from the current console.
Remove-PSDriveRemoves a Windows PowerShell drive from its location.
Remove-PSSessionCloses one or more Windows PSSessions.
Remove-PSSnapinRemoves Windows PowerShell snap-ins from the current session.
Remove-VariableDeletes a variable and its value.
Remove-WmiObjectDeletes an instance of an existing WMI class.
Remove-WSManInstanceDeletes a management resource instance.
Rename-ItemRenames an item in a Windows PowerShell provider namespace.
Rename-ItemPropertyRenames a property of an item.
Reset-ComputerMachinePasswordResets the machine account password for the computer.
Resolve-PathResolves the wildcard characters in a path and displays the path contents.
Restart-ComputerRestarts (reboots) the operating system on local and remote computers.
Restart-ServiceStops and then starts one or more services.
Restore-ComputerStarts a system restore on the local computer.
Resume-BitsTransferResumes a BITS transfer job.
Resume-ServiceResumes one or more suspended (paused) services.
Select-ObjectSelects specified properties of an object or set of objects. It can also select unique objects from an array of objects, or it can select a specified number of objects from the beginning or end of an array of objects.
Select-StringFinds text in strings and files.
Select-XMLFinds text in an XML string or document.
Send-MailMessageSends an e-mail message.
Set-AclChanges the security descriptor of a specified resource, such as a file or registry key.
Set-AliasCreates or changes an alias (alternate name) for a cmdlet or other command element in the current Windows PSSession.
Set-AppLockerPolicySets the AppLocker policy for the specified Group Policy object (GPO).
Set-AuthenticodeSignatureAdds an Authenticode signature to a Windows PowerShell script or other file.
Set-BitsTransferModifies the properties of an existing BITS transfer job.
Set-ContentWrites or replaces the content in an item with new content.
Set-DateChanges the system time on the computer to a time that you specify.
Set-ExecutionPolicyChanges the user preference for the Windows PowerShell execution policy.
Set-ItemChanges the value of an item to the value specified in the command.
Set-ItemPropertyCreates or changes the value of a property of an item.
Set-LocationSets the current working location to a specified location.
Set-PSBreakpointSets a breakpoint on a line, command, or variable.
Set-PSDebugTurns script debugging features on and off, sets the trace level, and toggles StrictMode.
Set-PSSessionConfigurationChanges the properties of a registered session configuration.
Set-ServiceStarts, stops, and suspends a service and changes its properties.
Set-StrictModeEstablishes and enforces coding rules in expressions, scripts, and script blocks.
Set-TraceSourceConfigures, starts, and stops a trace of Windows PowerShell components.
Set-VariableSets the value of a variable. Creates the variable if one with the requested name does not exist.
Set-WmiInstanceCreates or updates an instance of an existing WMI class.
Set-WSManInstanceModifies the management information that is related to a resource.
Set-WSManQuickConfigConfigures the local computer for remote management.
Show-EventLogDisplays the event logs of the local or a remote computer in Event Viewer.
Sort-ObjectSorts objects by property values.
Split-PathReturns the specified part of a path.
Start-BitsTransferCreates a new BITS transfer job.
Start-JobStarts a Windows PowerShell background job.
Start-ProcessStarts one or more processes on the local computer.
Start-ServiceStarts one or more stopped services.
Start-SleepSuspends the activity in a script or session for the specified period of time.
Start-TransactionStarts a transaction.
Start-TranscriptCreates a record of all or part of a Windows PSSession in a text file.
Stop-ComputerStops (shuts down) local and remote computers.
Stop-JobStops a Windows PowerShell background job.
Stop-ProcessStops one or more running processes.
Stop-ServiceStops one or more running services.
Stop-TranscriptStops a transcript.
Suspend-BitsTransferSuspends a BITS transfer job.
Suspend-ServiceSuspends (pauses) one or more running services.
Tee-ObjectSaves command output in a file or variable and displays it in the console.
Test-AppLockerPolicyTests whether the input files are allowed to run for a given user based on the specified AppLocker policy.
Test-ComputerSecureChannelTests and repairs the secure channel between the local computer and its domain.
Test-ConnectionSends Internet Control Message Protocol (ICMP) echo request packets (pings) to one or more computers.
Test-ModuleManifestVerifies that a module manifest file accurately describes the contents of a module.
Test-PathDetermines whether all elements of a path exist.
Test-WSManTests whether the WinRM service is running on a local or remote computer.
Trace-CommandConfigures and starts a trace of the specified expression or command.
Undo-TransactionRolls back the active transaction.
Unregister-EventCancels an event subscription.
Unregister-PSSessionConfigurationDeletes registered session configurations from the computer.
Update-FormatDataUpdates the formatting data in the current session.
Update-ListAdds items to and removes items from a property value that contains a collection of objects.
Update-TypeDataUpdates the current extended type configuration by reloading the *.types.ps1xml files into memory.
Use-TransactionAdds the script block to the active transaction.
Wait-EventWaits until a particular event is raised before continuing to run.
Wait-JobSuppresses the command prompt until one or all of the Windows PowerShell background jobs running in the session are complete.
Wait-ProcessWaits for the processes to be stopped before accepting more input.
Where-ObjectCreates a filter that controls which objects will be passed along a command pipeline.
Write-DebugWrites a debug message to the console.
Write-ErrorWrites an object to the error stream.
Write-EventLogWrites an event to an event log.
Write-HostWrites customized output to a host.
Write-OutputSends the specified objects to the next command in the pipeline. If the command is the last command in the pipeline, the objects are displayed in the console.
Write-ProgressDisplays a progress bar within a Windows PowerShell command window.
Write-VerboseWrites text to the verbose message stream.
Write-WarningWrites a warning message.