Friday, September 7, 2012

WMI Query Disk Before Apply Operating System Image

Hi,

You can do a WMI Query to check the disk space before apply the image. Please refer to http://social.technet.microsoft.com/Forums/nb-NO/mdt/thread/db891dd0-2316-4082-9c3e-8f8332cc84b7

But I prefer, "SELECT * FROM Win32_DiskPartition WHERE DiskIndex = 0 and Index = 0 and Size > 21474836480". Disk Index is refer to the HDD, Index is refer to Partition, and Size is the partition size. The size above is = 20GB x 1024 x 1024 x 1024.

Windows 7 has a 100mb system reserve partition, so I'll create 2 Apply Operating System task. First task apply to disk 0, partition 1, and second task apply to disk 0, partition 1. The first task will query "SELECT * FROM Win32_DiskPartition WHERE DiskIndex = 0 and Index = 0 and Size > 21474836480". The second task will query "SELECT * FROM Win32_DiskPartition WHERE DiskIndex = 0 and Index = 1 and Size > 21474836480".

I created two tasks because some machines previously from XP doesn't have the 100mb system reserve partition, and therefore partition 1 will be used. Please be aware that you need that 100mb system reserve partition for Bitlocker.

Regards,
Hau

No comments:

Post a Comment