Modify Storage Tiers Optimization With PowerShell #PowerShell #StorageSpaces #WS2012R2

3 min read

Hello Folks,

The killer feature in Windows Server 2012 R2 is Storage Tiered Spaces.

What is Storage Tiered Spaces?

Storage Tiers automatically moves frequently accessed data to faster (solid-state drive) storage and infrequently accessed data to slower (hard disk) storage, by having the file system actively measure the activity of the workload in the background and then automatically and transparently move data to the appropriate tier (SSD or HDD) depending on how hot or cold the data is determined to be.

Storage Spaces in Windows Server 2012 R2 can thus ensure that the workload’s hot data is always stored on the SSD tier to take advantage of the high performance of this tier, and its cold data on the HDD tier to make use of the high capacity of this tier. If a portion of the data for a particular file becomes hotter (is accessed more frequently), then it gets moved from the HDD tier to the SSD tier. And if the portion of data becomes cooler (is accessed less frequently), then it gets moved from the SSD tier to the HDD tier as shown in figure 1.


Figure 1

For more information on What’s New in Storage Spaces in Windows Server 2012 R2, click here.

Ok, so having this explained, the placement of data in storage tiers on all tiered storage spaces in the system is a daily task that runs every day at 1.00 AM.



Sure enough the trigger can be customized to run more than once per day.

As I am running heavy SQL Virtual Machines workloads on my storage spaces, I need the system to determine more frequently the cold and hot data chunks and move them accordingly between the two tiers.

How can we accomplish this? Easy enough by creating new Trigger in Task Scheduler UI.

How about if you want to add 4 or 5 Triggers, how many clicks you want to click? Winking smile

The cutting edge time is PowerShell Smile

Here is an easy way to do it:

PS C:\>$Time1 = New-ScheduledTaskTrigger -Daily -At 7am

PS C:\>$Time2 = New-ScheduledTaskTrigger -Daily -At 12pm

PS C:\>$Time3 = New-ScheduledTaskTrigger -Daily -At 7pm

PS C:\>$Time4 = New-ScheduledTaskTrigger -Daily -At 1am

PS C:\>Set-ScheduledTask -TaskPath “\Microsoft\Windows\Storage Tiers Management” -TaskName “Storage Tiers Optimization” -Trigger $Time1, $Time2, $Time3, $Time4

PS C:\> Get-ScheduledTask -TaskName “Storage Tiers Optimization” | fl Triggers

Triggers : {MSFT_TaskDailyTrigger, MSFT_TaskDailyTrigger, MSFT_TaskDailyTrigger, MSFT_TaskDailyTrigger}



About Charbel Nemnom 579 Articles
Charbel Nemnom is a Cloud Architect, Swiss Certified ICT Security Expert, Microsoft Most Valuable Professional (MVP), and Microsoft Certified Trainer (MCT), totally fan of the latest's IT platform solutions, accomplished hands-on technical professional with over 17 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize the performance of mission-critical enterprise systems. Excellent communicator is adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design, business continuity, and cloud security.

Be the first to comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.