PS > Get-PSSnapin -Registered in VS .NET

Creating QR Code in VS .NET PS > Get-PSSnapin -Registered

PS > Get-PSSnapin -Registered
Recognize QR Code ISO/IEC18004 In Visual Studio .NET
Using Barcode Control SDK for .NET framework Control to generate, create, read, scan barcode image in VS .NET applications.
QR Code Encoder In VS .NET
Using Barcode generation for Visual Studio .NET Control to generate, create QR Code image in .NET framework applications.
Name : MicrosoftSharePointPowerShell PSVersion : 10 Description : Register all administration Cmdlets for Microsoft SharePoint Server
Recognizing QR In .NET
Using Barcode reader for Visual Studio .NET Control to read, scan read, scan image in .NET framework applications.
Barcode Creation In Visual Studio .NET
Using Barcode generation for .NET Control to generate, create barcode image in .NET framework applications.
PowerShell for Microsoft SharePoint 2010 Administrators
Bar Code Scanner In VS .NET
Using Barcode scanner for .NET framework Control to read, scan read, scan image in .NET framework applications.
QR Drawer In C#
Using Barcode generation for .NET Control to generate, create QR Code ISO/IEC18004 image in .NET framework applications.
And here s how to add the snap-in with the Add-PSSnapin cmdlet:
QR Code Encoder In Visual Studio .NET
Using Barcode maker for ASP.NET Control to generate, create QR Code ISO/IEC18004 image in ASP.NET applications.
Generate QR Code JIS X 0510 In VB.NET
Using Barcode maker for VS .NET Control to generate, create QR-Code image in .NET framework applications.
PS > Add-PSSnapin MicrosoftSharePointPowerShell
Draw Data Matrix In Visual Studio .NET
Using Barcode printer for .NET Control to generate, create Data Matrix 2d barcode image in .NET applications.
Painting Barcode In VS .NET
Using Barcode creation for .NET framework Control to generate, create bar code image in VS .NET applications.
After you ve added the SharePoint 2010 snap-in, you can access all the cmdlets included in SharePoint 2010 The standard PowerShell console and the SharePoint 2010 Management Shell also differ in how threads are created and used The PowerShell console runs each pipeline (as marked by a hit of the Enter button), function, or script on its own thread, while the SharePoint 2010 Management Shell runs each line, function, or script on the same thread When working with the SharePoint object model using PowerShell, running code on separate threads can cause memory leaks, while commands running on the same thread have a smaller chance of doing so This is because some SharePoint objects still use unmanaged code and the way memory is allocated to those objects The threading model used is determined by the value of the ThreadOptions property of each PowerShell runspace (each PowerShell console window is a runspace) The SharePoint 2010 Management Shell uses the ReuseThread option set in the SharePointps1 file that is executed every time you start the shell from the SharePoint 2010 menu group The standard PowerShell console, however, does not have this option configured out of the box and thus uses the default, which is UseNewThread A good practice is to set the ThreadOption property to ReuseThread when working with SharePoint 2010 using the standard PowerShell console The example below demonstrates how you set the ThreadOption property
Create DataBar In .NET
Using Barcode drawer for .NET framework Control to generate, create GS1 DataBar Stacked image in .NET framework applications.
Draw UPC-E Supplement 2 In .NET
Using Barcode drawer for Visual Studio .NET Control to generate, create UPC-E Supplement 2 image in Visual Studio .NET applications.
PS > $HostRunspaceThreadOptions = "ReuseThread"
Bar Code Drawer In None
Using Barcode generator for Software Control to generate, create bar code image in Software applications.
Generating USS Code 128 In None
Using Barcode generation for Microsoft Excel Control to generate, create Code-128 image in Excel applications.
Finding the SharePoint 2010 Cmdlets
Making Code 128B In Java
Using Barcode creation for Java Control to generate, create Code 128 image in Java applications.
GS1 DataBar Truncated Generator In Java
Using Barcode creator for Java Control to generate, create GS1 DataBar-14 image in Java applications.
Windows PowerShell includes a great cmdlet called Get-Command This cmdlet returns basic information about cmdlets and other elements of Windows PowerShell commands, such as functions, aliases, filters, scripts, and applications Figure 3-1 shows the output from Get-Command As mentioned earlier, all nouns of the SharePoint 2010 cmdlets start with SP Knowing this, you can retrieve all SharePoint cmdlets Just use Get-Command s Noun parameter followed by SP*:
Generating GS1-128 In Java
Using Barcode maker for BIRT Control to generate, create EAN / UCC - 14 image in BIRT applications.
Data Matrix 2d Barcode Creator In Java
Using Barcode printer for Java Control to generate, create Data Matrix 2d barcode image in Java applications.
PS > Get-Command -Noun SP*
2D Barcode Printer In Java
Using Barcode printer for Java Control to generate, create Matrix 2D Barcode image in Java applications.
UPCA Maker In VB.NET
Using Barcode generator for .NET Control to generate, create UPC A image in Visual Studio .NET applications.
The asterisk (*) is used to perform a wildcard match, meaning that you want to retrieve all cmdlets, aliases, functions, and so on where the noun starts with SP As shown in Figure 3-2, the list is pretty long You can find out exactly how many SharePoint 2010 cmdlets are available by counting them and specifying that you want only cmdlets returned using the CommandType parameter:
PS > (Get-Command -Name *-SP* -CommandType cmdlet)Count 531
3:
Getting Started with PowerShell in SharePoint 2010
Figure 3-1
Using the Get-Command cmdlet
Here, you place the command within parentheses and use the Count property on the resulting SystemArray object to retrieve the actual number of cmdlets where the noun starts with SP Placing commands or code within parentheses forces Windows PowerShell into expression mode, meaning that the contents of the parentheses are evaluated (and in this case executed) first The result is returned as an object, and then that object s methods and properties are available for you to use It s also possible to count the number of cmdlets using the Measure-Object cmdlet, as you will see in the Measuring Objects in Windows PowerShell section later in this chapter You can use Get-Command to find specific SharePoint 2010 cmdlets Say you want to retrieve all SharePoint 2010 cmdlets that are used to manage site collections You can achieve this by specifying that the noun should include SPSite:
PS > Get-Command -Noun SPSite CommandType ----------Cmdlet Cmdlet Cmdlet Name ---Backup-SPSite Get-SPSite Move-SPSite Definition ---------Backup-SPSite [-Identity] <SPSitePipeBind> -Path < Get-SPSite [-Limit <String>] [-WebApplication <SPW Move-SPSite [-Identity] <SPSitePipeBind> -Destinat
PowerShell for Microsoft SharePoint 2010 Administrators
Figure 3-2
Cmdlet Cmdlet Cmdlet Cmdlet
Using Get-Command with the -Noun parameter
New-SPSite Remove-SPSite Restore-SPSite Set-SPSite New-SPSite [-Url] <String> [-Language <UInt32>] [Remove-SPSite [-Identity] <SPSitePipeBind> [-Delet Restore-SPSite [-Identity] <String> -Path <String> Set-SPSite [-Identity] <SPSitePipeBind> [-OwnerAli
The output from the command shows seven different cmdlets that you can use when working with site collections If you take a closer look at the verbs in the cmdlets, you ll see that they are self-describing Get is used for getting information, Set is used for modifying site collections, and so on You can go even further and get information on a specific cmdlet Here is how you can use Get-Command to retrieve information on the Get-SPSite cmdlet:
PS > Get-Command Get-SPSite CommandType Name Definition ----------- ------------Cmdlet Get-SPSite Get-SPSite [-Limit <String>] [-WebApplication
You can see the command type, its name, and its definition Next, let s see how to get information about how to use a cmdlet in SharePoint 2010
3:
Copyright © OnBarcode.com . All rights reserved.