Configuring Sites in SharePoint 2010 in .NET

Encoding QR Code JIS X 0510 in .NET Configuring Sites in SharePoint 2010

Configuring Sites in SharePoint 2010
Denso QR Bar Code Scanner In VS .NET
Using Barcode Control SDK for .NET Control to generate, create, read, scan barcode image in .NET framework applications.
QR Code Generation In .NET
Using Barcode generation for Visual Studio .NET Control to generate, create QR Code image in .NET framework applications.
The Set-SPWeb cmdlet lets you configure existing sites in SharePoint 2010 The following example changes the description of an existing site
QR Code Recognizer In VS .NET
Using Barcode decoder for Visual Studio .NET Control to read, scan read, scan image in .NET applications.
Painting Bar Code In Visual Studio .NET
Using Barcode encoder for Visual Studio .NET Control to generate, create bar code image in .NET framework applications.
PS > Get-SPWeb http://SPServer01/NewSite | Select-Object -Property Description Description ----------My New Site PS > Get-SPWeb http://SPServer01/NewSite | >> Set-SPWeb -Description "A New Description" PS > Get-SPWeb http://SPServer01/NewSite | Select-Object -Property Description Description ----------A New Description
Read Barcode In VS .NET
Using Barcode scanner for VS .NET Control to read, scan read, scan image in VS .NET applications.
QR-Code Encoder In C#
Using Barcode generator for .NET Control to generate, create QR image in .NET framework applications.
First, we use Get-SPWeb and pipe the object to the Select-Object cmdlet to retrieve the current value of the Description property We then use the Set-SPWeb cmdlet to change the site s description Finally, we verify that the change occurred by retrieving the site s description again
QR Code JIS X 0510 Generation In .NET
Using Barcode printer for ASP.NET Control to generate, create Denso QR Bar Code image in ASP.NET applications.
QR Code 2d Barcode Drawer In Visual Basic .NET
Using Barcode generator for .NET framework Control to generate, create QR Code image in Visual Studio .NET applications.
Exporting and Importing Sites in SharePoint 2010
USS Code 39 Drawer In .NET
Using Barcode maker for VS .NET Control to generate, create Code39 image in .NET applications.
GTIN - 128 Creation In .NET Framework
Using Barcode printer for .NET framework Control to generate, create GS1-128 image in Visual Studio .NET applications.
With the Export-SPWeb cmdlet, you can export a site, as follows:
ECC200 Encoder In .NET
Using Barcode maker for VS .NET Control to generate, create Data Matrix ECC200 image in .NET applications.
Encoding MSI Plessey In VS .NET
Using Barcode encoder for .NET Control to generate, create MSI Plessey image in Visual Studio .NET applications.
PS > Export-SPWeb -Identity http://SPServer01/NewSite ` >> -Path C:\Backup\spWebBackupbak
Matrix 2D Barcode Printer In .NET Framework
Using Barcode encoder for ASP.NET Control to generate, create Matrix Barcode image in ASP.NET applications.
USS-128 Maker In Java
Using Barcode creator for Java Control to generate, create UCC - 12 image in Java applications.
This example exports an entire site to a backup file It is also possible to export specific content from a site, such as lists, document libraries, and even list items You use the ItemUrl parameter to export lists or list items from a site Here is an example of exporting a list called Calendar from a site:
Generating Universal Product Code Version A In Java
Using Barcode drawer for Java Control to generate, create GTIN - 12 image in Java applications.
Recognize Bar Code In Java
Using Barcode reader for Java Control to read, scan read, scan image in Java applications.
PS > Export-SPWeb -Identity http://SPServer01/NewSite ` >> -ItemUrl "Lists/Calendar" -Path C:\Backup\spWebCalendarbak
Painting GS1 - 12 In Java
Using Barcode drawer for Android Control to generate, create UPCA image in Android applications.
Reading Code 128A In Visual Studio .NET
Using Barcode decoder for Visual Studio .NET Control to read, scan read, scan image in .NET applications.
4:
UCC - 12 Generation In Objective-C
Using Barcode creation for iPad Control to generate, create UPC Code image in iPad applications.
Printing Barcode In None
Using Barcode drawer for Software Control to generate, create bar code image in Software applications.
Managing SharePoint 2010 with Windows PowerShell
The Export-SPWeb cmdlet also supports the IncludeUserSecurity switch parameter, which allows you to include access control lists for all items By default, Export-SPWeb exports the last major version of a list item, but you can change this by setting the IncludeVersions parameter to include the current version, last major and minor version, or all versions of each item Once you have an export file, you can use the Import-SPWeb cmdlet to import it into a site Importing a site works as long as you specify a site collection that contains a matching template; otherwise, an error occurs In the following example, we will delete the Calendar list in SharePoint 2010 and perform an import with the Import-SPWeb cmdlet Figure 4-3 shows how to delete a list in SharePoint 2010
Figure 4-3
Deleting the Calendar list
Now that the list is removed, we can go ahead and run Import-SPWeb:
PS > Import-SPWeb -Identity http://SPServer01/NewSite ` >> -Path C:\Backup\spWebCalendarbak
PowerShell for Microsoft SharePoint 2010 Administrators
The Import-SPWeb cmdlet also supports the UpdateVersions parameter, which allows you to specify how to handle items that already exist in a list The possible values are Append, Overwrite, and Ignore
Removing Sites in SharePoint 2010
The Remove-SPWeb cmdlet removes a specific site from SharePoint 2010 If the top-level site is deleted, the site collection is also removed Here is an example of running this cmdlet:
PS > Remove-SPWeb -Identity http://SPServer01/NewSite -Confirm:$false
Summary
This chapter covered how to use the cmdlets in Windows PowerShell to manage the SharePoint 2010 environment We began with content database and web application management As you saw, you can use cmdlets to create, manage, and remove content databases and web applications with Windows PowerShell Then we covered the basics of site collection and site management with Windows PowerShell We included examples of creating, configuring, removing, and backing up sites and site collections In the next chapter, we will dig deeper into the core functionality of Windows PowerShell We ll look at items such as variables, functions, operators, scripts, and remoting
Variables, Arrays, and Hashtables
PowerShell for Microsoft SharePoint 2010 Administrators
his chapter covers the use of variables, arrays, and hashtables First, we will demonstrate how to work with variables in Windows PowerShell, including creating, setting, and removing variables We will also take a brief look at different data types Then we will move on to using arrays and hashtables in Windows PowerShell
Variables in Windows PowerShell
Windows PowerShell, like most other scripting languages, stores values in variables Variables are represented by single-word text strings that begin with the dollar sign ($) Windows PowerShell supports four types of variables: user-created, automatic, preference, and environment variables
Working with Variables
The simplest way to create a variable is by using the assignment operator = to set a variable to a specific value The following example creates the variable $string and assigns it the value My String
PS > $string = "My String"
You can also use the New-Variable cmdlet to create variables This cmdlet offers some additional functionality, such as adding a description, setting the variable to read-only or constant, and setting a specific scope for a variable Here is an example:
PS > New-Variable -Name string -Value "My String" ` >> -Description "Created using New-Variable" -Option ReadOnly -Force
This creates the variable $string and sets the value to My String We also specify a description, use the Option parameter to set the variable to ReadOnly, and use the -Force switch parameter since the variable already exists If we try to assign a new value to the variable using the assignment operator, an error occurs since the variable is set to read-only
PS > $string = "New Value" Cannot overwrite variable string because it is read-only or constant At line:1 char:8 + $string <<<< = "New Value" + CategoryInfo : WriteError: (string:String) [], SessionStateUnauthorizedAccessException + FullyQualifiedErrorId : VariableNotWritable
Instead, we can use the Set-Variable cmdlet with the -Force switch parameter to set a new value We also change the Option parameter from ReadOnly to None
Copyright © OnBarcode.com . All rights reserved.