Author Posts

November 15, 2017 at 9:28 am

the advice is "grab the file from Morelunches" but it is not included in the downloaded.

November 15, 2017 at 9:43 am

I typed it out (it works) but found some typos in the original (There was no ` after {$OK=$True})

Function Get-DiskInfo {
    Param (
        $disks=Get-WmiObject -Class Win32_Logicaldisk -Filter "Drivetype=3"
            foreach ($disk in $disks) {$perFree=($disk.FreeSpace/$disk.Size)*100;
            if ($perFree -ge $MinimumFreepercent) {$OK=$True}`
            else {$OK=$False};$disk|Select DeviceID,VolumeName,Size,FreeSpace,`

Does this look like acceptable formatting per the book?