The easiest way to start working with SharePoint cmdlets is to start the SharePoint 2010 Management Shell. On a computer with SharePoint 2010 installed, go to Start, All Programs, Microsoft SharePoint 2010 Products, SharePoint 2010 Management Shell. The shell loads; then type the following command into the command prompt:
Get-SPSite
The preceding command lists all site collections in the current SharePoint farm. Sample results are shown in Figure 7.4.
Figure 7.4. Get-SPSite
cmdlets displays a list of SharePoint site collection URLs.