O'Reilly logo

Automating Microsoft® SharePoint® 2010 Administration with Windows PowerShell® 2.0 by Shannon Bray, Gary Lapointe

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understand Variables and Types

Now that you know the core components involved, you can begin to use Windows PowerShell to perform some tasks. The following sections will review the core Windows PowerShell elements that every SharePoint administrator must know. These include declaring and using variables and working with various data types, including the core value types as well as arrays and hash tables.

Declare and Use Variables

In all programming and scripting languages, storage locations are needed to hold data so that it can be accessed at a later time. These locations are referred to as variables.

Windows PowerShell variables are designated with a dollar sign. For example, declaring a variable that stores the results of the Get-SPFarm cmdlet ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required