Поделиться через


Introduction to Storage Management on Windows Server 2012 (Part 2)

Understanding Custom object views in the Storage Module for Windows PowerShell

Before I delve into the actual usage of the cmdlets present in the Storage module, I wanted to explain a bit about how the parameters and information are displayed. The default view of most Storage cmdlets display only the most commonly accessed properties of an object, which can be a little confusing unless you know there are other parameters that you can access.

For the first article in this series, see the post below:

https://blogs.msdn.com/b/san/archive/2012/06/26/an-introduction-to-storage-management-in-windows-server-2012.aspx

The Storage module uses a custom object format that varies the parameters returned based on whether the object is viewed in table or list format. This is done so that the default (table) view is easy to read.

To display an expanded set of properties, use the Format-List cmdlet shown in Figure 1. For example, Get-Disk | Format-List.

Note: In the figure below, FL is an alias to Format-List.

To view a complete list of properties, use the Format-List * command shown in Figure 3. For example, Get-Disk | Format-List *).

image

Figure 1: The default (table) view for Get-Disk

image

Figure 2: The list view for Get-Disk

image

Figure 3: The list view of ALL object properties for Get-Disk. (Using Format-List *)

Storage Management scenarios are managed via Windows PowerShell in Windows Server 2012 and Windows 8 using the following modules:

Module name

Purpose

Storage

Provides management interfaces for local storage and storage objects exposed via a Storage Management Provider

MPIO

Allows configuration of the Multipath I/O (MPIO) feature. (Windows Server 2012 only).

iSCSI

Provides iSCSI initiator connection management

To obtain a list of the commands in any of these modules, use the following commands in Windows PowerShell:

Get-Command –Module <ModuleName>

For example, to obtain a list of all of the Windows PowerShell cmdlets in the Storage module, use the following commands:

Get-Command –Module Storage

Obtaining and Updating help for Windows PowerShell Modules:

In Windows 8, Windows PowerShell Help includes only a basic listing of parameters “in-box”. The complete Help is published to Microsoft TechNet, and you can update Windows PowerShell to include this Help from any computer that has Internet access.

Once a Windows PowerShell module has been imported into the current Windows PowerShell session, the help content may be downloaded and updated via the following command:

Update-Help

Note: the –Force parameter must be used if attempting to update more than once per 24 hour period.

To display help for a specific cmdlet, use the following command:

Get-Help <Cmdlet>

For example, to get help for the Get-Disk cmdlet, use

Get-Help Get-Disk

The get-help cmdlet offers multiple levels of verbosity, which include

  • No parameter specified, only basic help is displayed.
  • Detailed provides detailed help
  • Example provides examples of the cmdlet in use.
  • Full provides all available help content for the specified cmdlet.

For example, to obtain script examples for the Get-Disk cmdlet, use the following command:

Get-Help Get-Disk –Examples

This returns output similar to the following:

image

Figure 4: The Help examples included with the Get-Disk cmdlet

Windows 8 and Windows Server 2012 contain the Storage Management API, associated WMI classes, and the Storage module for Windows PowerShell.

Note: Windows PowerShell and the Storage module are not available by default in Windows PE. I will cover in a subsequent post building a custom Windows PE image that includes the Storage module and Windows PowerShell optional components for Windows PE.

The Windows Standards-Based Storage Management Service is available only on Windows Server 2012, and is required for the use of SMI-S providers with Storage Management (it is also not available from Windows PE).

Other available management interfaces for storage:

Storage Spaces Control Panel

Windows 8 includes the Storage Spaces control panel item, shown in Figure 5. The Storage Spaces control panel item provides a simple user interface that end-users can use to configure and manage the Storage Spaces subsystem for personal storage. It cannot be used for management of other Storage Management Providers, and is available only on Windows 8.

image

Figure 5: Storage Spaces in Control Panel in Windows 8

File and Storage Services canvas in Server Manager

Windows Server 2012 includes the File and Storage Services role in Server Manager, which enables you to remotely manage multiple file servers from a single window, including Storage Spaces, and other installed Storage Management Providers or SMI-S providers.

image

Figure 6: File and Storage Services in Server Manager in Windows Server 2012

Windows Management Instrumentation (WMI)

Windows 8 and Windows Server 2012 include a rich set of management classes intended for use by developers creating management applications for storage.