Add local Windows Server inventory collection and validation; include core package

This commit is contained in:
2026-10-30 11:24:40 -07:00
parent 967b2bd46a
commit f65ade9fff
35 changed files with 2200 additions and 56 deletions

View File

@@ -0,0 +1,23 @@
function Get-SamsaraStorage {
param($Result)
Invoke-SamsaraRead $Result 'Local volumes' {
$Result.data = @(Get-Volume -ErrorAction Stop | ForEach-Object {
[pscustomobject]@{ type = 'Volume'; name = [string]$_.FileSystemLabel
path = if ($_.DriveLetter) { [string]$_.DriveLetter + ':\' } else { [string]$_.Path }
filesystem = [string]$_.FileSystem; capacity_gib = [math]::Round(([double]$_.Size / 1GB), 2)
free_gib = [math]::Round(([double]$_.SizeRemaining / 1GB), 2) }
})
}
$Result.limitations += 'Local volume metadata only. Share contents, mounted remote storage, storage-array dependencies, snapshots and backups are not inspected.'
}
function Get-SamsaraShares {
param($Result)
Invoke-SamsaraRead $Result 'SMB shares' {
$Result.data = @(Get-SmbShare -ErrorAction Stop | ForEach-Object {
[pscustomobject]@{ type = 'SMB Share'; name = [string]$_.Name; path = [string]$_.Path
capacity_gib = $null; free_gib = $null; special = [bool]$_.Special }
})
}
$Result.limitations += 'Configured SMB shares, including administrative shares. No share contents, ACLs, credentials, sessions or consumers queried. Existence does not establish use.'
}