February 2013
Intermediate to advanced
304 pages
8h 26m
English
Scenario/Problem: You need to obtain a specific database reference.
Solution: Use the Get-SPDatabase cmdlet using the -Identity parameter to assign a variable to the results.
Providing the identity of the database with the Get-SPDatabase cmdlet retrieves a specific database. Use this to assign the results to an object for use in other cmdlets, as shown in Listing 7.2.
Listing 7.2. Assigning a Variable to a Specific Database
$database = Get-SPDatabase-Identity 47036154-7a05-44be-9137-9be09f43ccb5
Read now
Unlock full access