Book Image

PowerCLI Cookbook

By : Philip Brandon Sellers
Book Image

PowerCLI Cookbook

By: Philip Brandon Sellers

Overview of this book

Table of Contents (19 chapters)
PowerCLI Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Setting Storage DRS automation levels for individual virtual machines


In the previous recipe, you created a datastore cluster, moved datastores into the cluster, and set the cluster-wide settings. In the recipe, you set the automation level to fully automated. This means that Storage DRS will direct placement and migrations of virtual machines based on space utilization and/or IO thresholds. However, there might be valid times when a virtual machine should not be moved. Perhaps it's a large virtual machine, or a business-critical virtual machine, where you don't want Storage DRS to automatically move the data disks. In these cases, you can override the cluster-wide settings and you can set a per-VM Storage DRS automation setting. However, PowerCLI does not have a native cmdlet to make this configuration change. In this recipe, you will explore how to use views and objects to make the setting change and save it for vSphere 5.5 using PowerCLI 5.5. If you are using vSphere 6 and PowerCLI 6...