Question

how do we determine size of storage hardware installed in our endpoints?

  • 2 November 2023
  • 10 replies
  • 110 views

Badge

Most of our staff are remote from our office, hence using Automox

we haven’t bene great at recording hardware configurations, specifically we need to know size of SSDs installed in our endpoints

can we use Automox to report on that detail?


10 replies

Userlevel 3
Badge

Hey! Fantastic topic - Automox helps a ton with Configuration Management Data Bases, and we have plenty of use cases where we capture SO MUCH data for you.. 
(Let us know what you’d like to see different inside of our console and reports!!)
But within the device page, after running a scan, you can see the list of HDD’s/SSD’s and USB drives, their max storage and how much is left available. 

If you want to extract more detailed information, we have an API you can use to dump more data out into JSON. https://developer.automox.com/openapi/axconsole/operation/getServer/#tag/Devices/operation/getServer


 

From Device Page
"DISKS": [
{
"SIZE": "1000555581440",
"TYPE": "APPLE SSD AP1024R"
}
],
"MODEL": "MacBook Pro",
"VOLUME": [
{
"VOLUME": "/dev/disk3s1s1",
"FSTYPE": "APFS",
"LABEL": "Macintosh HD",
"AVAIL": "994662584320",
"FREE": "561034780672",
"IS_SYSTEM_DISK": "true"
},
{
"VOLUME": "/dev/disk4s1",
"FSTYPE": "MS-DOS",
"LABEL": "ESD-USB",
"AVAIL": "34347188224",
"FREE": "26619707392",
"IS_SYSTEM_DISK": "false"
}
],

 

Userlevel 3
Badge

Can I ask what you use for inventory management in general?
 

Badge

Hi
I’ve used the API, it doesn’t give the required detail

here is a snapshot of the data i retrieved when i used the API to export data in to a CSV file for action:

 

as you can see a number of the data elements just report System Object []

Userlevel 3
Badge

Hi,

I used OttoAI to generate a powershell script to collect only system drives (HDD/SSD) which also includes some basic detail about raw space left also displayed as a percentage. The Activity Log can then be used to ONLY show results from that specific policy (selected from the filters on the left)

 

get-volume
# ======================
# Otto AI Generated Code
# ======================
$drives = Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=3"

foreach ($drive in $drives) {
$driveLetter = $drive.DeviceID
$freeSpace = $drive.FreeSpace
$totalSpace = $drive.Size
$freeSpacePercentage = [math]::Round(($freeSpace / $totalSpace) * 100, 2)

Write-Host "Drive: $driveLetter"
Write-Host "Raw Space Left: $freeSpace bytes"
Write-Host "Percentage of Free Space: $freeSpacePercentage%"
Write-Host
}

 

 

We could further modify this to only return results if a device has less than 50% space as an example.

Badge

thank you

that script will return the logical drives on the machine

what i want is the physical HDD / SSD installed in the device please

 

Userlevel 3
Badge

‘get-disk’ (can also be run via Worklet) will return the entire volume size regardless of partition.

Badge

thank you
my worklet skills aren’t great, could you expand on what i should do please?
regards

Badge

sorted it i think
thank you for your help

 

Userlevel 3
Badge

When you create a policy, put ‘exit 0’ in the Evaluation code. This means we plan on skipping any eval and running the policy manually, so we don’t need a condition.
In the Remediation Code, put the desired command ‘get-drive’. Now you can run the policy against all endpoints or against individual endpoints followed by taking a look at the Activity Log.

 

 

Badge

thank you

Reply