Settings and activity
2 results found
-
24 votes
An error occurred while saving the comment -
595 votes
An error occurred while saving the comment Shawn Rose commentedI agree it would be nice to have historical data, but I would also want to have a force refresh option: For some of the data, once it's pulled Atera never seems to check it again. Office versions in particular: I've seen cases where it still shows Office 2016 despite it having long since been upgraded to 365.
At least for the data that Atera already pulls and has available, this is pretty easy with the API. Powershell script (Edited from the one I use which also does a few things like map location via public IP to a site from our Meraki infrastructure, which are stripped). No idea how much of it will stay on this comment, though. (Apparently, everything but the tabs and some random characters getting HTML escaped: Oh well)
$AteraHeaders = @{"X-Api-Key" = "Your API Key"}
$AteraDevices = $null
$Run = $true
$Page = 1
$Count = 0
while($Run){
$Items = Invoke-RestMethod -Headers $AteraHeaders -Uri "https://app.atera.com/api/v3/agents?itemsInPage=50&page=$Page"$Page++
if(-not $AteraDevices){
$AteraDevices = New-Object PSCustomObject[] $Items.totalItemCount # Uses lass ram since it isn't going to be recreating the array all the time to add items
}
foreach($Device in $Items.items){
$AteraDevices[$Count] = $Device
$Count++
}
"$Count / $($Items.totalItemCount)"
if($Count -eq $Items.totalItemCount){
$Run = $false
}
}$AgentInfo = foreach($Agent in $AteraDevices){
$DiskSize = $null
$DiskFree = $null
$DiskPercentage = $nullforeach($disk in $Agent.HardwareDisks){
if($disk.Drive -eq "C:"){
$DiskSize = [Math]::Round($disk.Total/1024)
$DiskFree = [Math]::Round($disk.Free/1024)
$DiskPercentage = [Math]::Round(($disk.Free / $disk.Total)*100)
}
}
$Uptime = $null
if($Agent.LastRebootTime){
$Uptime = ([DateTime]::Now - [DateTime]::Parse($Agent.LastRebootTime)).Days
}
[PSCustomObject]@{
ID = $Agent.AgentID
Online = $Agent.Online
Name = $Agent.SystemName
User = $Agent.LastLoginUser
Domain = $Agent.DomainName
'Reported IP' = $Agent.ReportedFromIP
'Internal IP' = $Agent.IpAddresses -join "; "
'Uptime' = $Uptime
OS = $Agent.OS
'OS Build' = $Agent.OSBuild
Office = $Agent.Office
'Office Build' = $Agent.OfficeFullVersion
Vendor = $Agent.Vendor
Model = $Agent.VendorBrandModel
CPU = $Agent.Processor
RAM = "$([Math]::Round($Agent.Memory/1024)) GB"
'Disk Free' = $DiskFree
'Disk Size' = $DiskSize
'Disk Usage' = $DiskPercentage
Serial = $Agent.VendorSerialNumber
}
}$AgentInfo | Export-Excel -NoNumberConversion Model,Serial -Show
This is currently available, for anyone curious: On the Devices page, click the gear on the top right (Next to filters), Edit columns, and check off Public IP/hostname.