samples/cimlogicaldisk-extensions.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[
    {
        "MemberType": "ScriptProperty",
        "MemberName": "SizeGB",
        "Value": "$this.size/1gb -as [int32]",
        "TypeName": "Microsoft.Management.Infrastructure.CimInstance#root/cimv2/Win32_LogicalDisk"
    },
    {
        "MemberType": "ScriptProperty",
        "MemberName": "FreeGB",
        "Value": "[math]::round($this.freespace/1gb,4)",
        "TypeName": "Microsoft.Management.Infrastructure.CimInstance#root/cimv2/Win32_LogicalDisk"
    },
    {
        "MemberType": "ScriptProperty",
        "MemberName": "PctFree",
        "Value": "[math]::round(($this.freespace/$this.size)*100,2)",
        "TypeName": "Microsoft.Management.Infrastructure.CimInstance#root/cimv2/Win32_LogicalDisk"
    }
]