This commit is contained in:
Zack Meier
2026-04-15 15:42:41 -05:00
parent 74edcc4d9a
commit 03dba08135
146 changed files with 9119 additions and 1 deletions
+36
View File
@@ -0,0 +1,36 @@
$iLOs = Find-HPEiLO -Range "10.8.144.0-255"
$iLOs += Find-HPEiLO -Range "10.8.145.0-255"
$iLOs += Find-HPEiLO -Range "10.8.146.0-255"
$iLOs += Find-HPEiLO -Range "10.8.147.0-255"
$iLOs += Find-HPEiLO -Range "10.8.148.0-255"
$iLOs += Find-HPEiLO -Range "10.8.149.0-255"
$iLOs += Find-HPEiLO -Range "10.8.150.0-255"
$iLOs += Find-HPEiLO -Range "10.8.151.0-255"
$iLOs = Find-HPEiLO -Range "10.8.144-151" -Full
$ilos | export-csv "D:\OneDrive - State of North Dakota\iLOs.csv"
$Connection = $iLOs | Connect-HPEiLO -Credential $AdminCred
$AllTags = Get-HPEiLOAssetTag -Connection $Connection
$result = @()
ForEach($ilo in $iLOs)
{
$Hostname = $ilo.hostname -replace 'lo'
$VMhost = Get-VMhost $Hostname
$obj=[PSCustomObject]@{
Hostname = $Hostname;
IPAddress = (Resolve-DNSName $Hostname).IPAddress
Model = $iLO.HostSystemInformation.SPN;
SerialNumber = $iLO.HostSystemInformation.SerialNumber;
AssetTag = ($AllTags | where-object Hostname -eq $iLO.Hostname).AssetTag;
Rack = $ilo.BladeSystem.Manager.Rack;
Enclosure = $ilo.BladeSystem.Manager.Enclosure;
Bay = $ilo.BladeSystem.Bay;
CPU = $VMhost.NumCpu;
Memory = [math]::round($VMhost.MemoryTotalGB,2);
Cluster = ($VMHost | Get-Cluster).Name;
}
$result += $obj
}