White Papers

PowerShell integration
43 Dell EMC SC Series: Microsoft Hyper-V Best Practices | CML1009
7 PowerShell integration
SC Series storage has incorporated Windows PowerShell for many years and now supports a large library of
cmdlets. The SC Series PowerShell SDK command set provides administrators with the ability to perform
many SC Series tasks from the command line and create automated scripts.
To learn more about PowerShell integration with SC Series storage including many examples, see the
Dell
Storage PowerShell SDK Cookbook.
7.1 Importance of PowerShell
With newer versions of Windows Server and Hyper-V, the use of PowerShell may be required for some day-
to-day tasks because there may not be a GUI equivalent in Server Manager, Hyper-V Manager, Failover
Cluster Manager, or Windows Admin Center (WAC). This is particularly true when servers are running Server
Core and a GUI tool is available only if the server is configured with a desktop. While the real power of
PowerShell lies in being able script and automate complex or repeatable processes, many simple
administration tasks are easy to perform with PowerShell.
While initial creation and testing of PowerShell scripts may be time consuming, the return on the investment in
cost savings and ease of administration can be significant. As scripts are built, they can be saved for future
use, and used as building blocks to create additional scripts. Many online resources exist to aid administrators
with learning to use PowerShell and develop their own scripts. See for example the
Microsoft PowerShell
documentation library.
7.2 PowerShell automation with Hyper-V and SC Series
PowerShell for SC Series and PowerShell for Hyper-V can be used together to script processes that involve
the host servers, the Hyper-V layer, and the SC Series layer. This provides administrators great control and
flexibility to automate repeatable tasks and solve complex problems. Scripting also reduces the risk of user
error when having to complete repetitive or tedious tasks, ensuring that steps are not missed and completed
in the right order, and that naming is consistent.
Some use cases include the following:
Example 1: An administrator needs to quickly modify the same setting on 500 guest VMs. Using a GUI to
modify each guest VM one at a time would prove to be very inefficient and time consuming. By leveraging
PowerShell, an administrator could script an automated process that would accomplish the same task in a
fraction of the time and save the script to use as a foundation for building similar scripts in the future.
Example 2: An administrator needs to provision 100 new guest VMs from an SC Series volume snapshot that
contains a gold image. Native SC Series, Hyper-V, and SCVMM GUI tools make it difficult to create more
than one VM at a time. With PowerShell, the process can be scripted and automated.
Example 3: A backup process that involves SC Series storage and Hyper-V guest VMs runs overnight that
requires some manual sequenced steps to complete properly. With PowerShell, the process can be
automated so that an administrator does not have to be available to perform these steps manually after hours.
Example 4: Several order-dependent steps that involve the SC Series array and recovery hosts at a DR site
must be completed to bring a critical workload online when invoking a DR plan. Following the steps manually
increases the time required, and increases the risk of user error, particularly if the situation is stressful. By