This module adds the following facts on Windows:
The output of the Powershell Get-Disk
command, but in a more Puppet-friendly format
The output of the Powershell Get-PSDrive -PSProvider 'FileSystem'
command, but in a more Puppet-friendly format + additional drive type information ('Fixed' = local hard drive, 'Removable' = removable devices like floppy and usb, 'CD-ROM' = optical drives)
The output of the Powershell Get-Partition
command, but in a more Puppet-friendly format
# Loop over all of the partitions and find the one that is mounted to C:\
$::partitions.each |$partition| {
if $partition['drive_letter'] == 'C' {
# Do something here
}
}
# Get the free size of C:\
notice($::drives['C']['free_bytes'])