Skip to main content

Drive List Collection

Summary

This script polls for physical, non-removable drives with a capacity greater than 10GB and places the available drive letters in EPM - Disk - Custom Field - xPVAL Drive List.

Sample Run

TimeActionResultUser
3:15:59 PM 1-Sep-22Drive List CollectionSuccess THENprovaltech.com/dan.hicks
3:15:59 PM 1-Sep-22Drive List CollectionC:provaltech.com/dan.hicks
3:15:59 PM 1-Sep-22Execute PowerShell CommandSuccess THENprovaltech.com/dan.hicks
3:15:59 PM 1-Sep-22Execute PowerShell Command-0012Results returned to global variable #global:psresult# and saved in Documents tab of server.provaltech.com/dan.hicks
3:15:59 PM 1-Sep-22Execute PowerShell Command-0011PowerShell command completed!provaltech.com/dan.hicks
3:15:51 PM 1-Sep-22Execute PowerShell Command-0011Executing PowerShell command: "((Get-PartitionWhere-Object {($.DriveLetter -and $.Size -gt 10000000000) -and ($_.DiskPath -notmatch 'usb')}
3:15:51 PM 1-Sep-22Execute PowerShell Command-0010Sending output to global variable.provaltech.com/dan.hicks
3:15:51 PM 1-Sep-22Execute PowerShell Command-0008New command variable is: -Command "((Get-PartitionWhere-Object {($.DriveLetter -and $.Size -gt 10000000000) -and ($_.DiskPath -notmatch 'usb')}
3:15:51 PM 1-Sep-22Execute PowerShell Command-0008Custom commands detected as: ((Get-PartitionWhere-Object {($.DriveLetter -and $.Size -gt 10000000000) -and ($_.DiskPath -notmatch 'usb')}
3:15:48 PM 1-Sep-22Execute PowerShell Command-0002PowerShell is present.provaltech.com/dan.hicks
3:15:39 PM 1-Sep-22Run Now - Drive List CollectionAdmin provaltech.com/dan.hicks scheduled procedure Run Now - Drive List Collection to run at Sep 1, 2022, 3:15 PMprovaltech.com/dan.hicks

Process

The script queries the endpoint for physical, non-removable drives with a capacity greater than 10GB.

Output

Agent Procedure Log
EPM - Disk - Custom Field - xPVAL Drive List