Only displays IPv4 addresses in primary output
This commit is contained in:
parent
c0a406a590
commit
cd21de83f5
|
|
@ -37,7 +37,7 @@ function Get-Hostname ([string]$name) {
|
|||
if ($SCCMMatches -and $SCCMMatches.Count -lt 2) {
|
||||
return $SCCMMatches,''
|
||||
} elseif (!$SCCMMatches) { $errMsg += "No SCCM name match found`n" }
|
||||
elseif ($SCCMMatches.Count -ge 2) { $errMsg += "Many SCCM matches found`n" }
|
||||
elseif ($SCCMMatches.Count -ge 2) { $errMsg += "Many SCCM name matches found`n" }
|
||||
|
||||
# CMDB check should be absolute last resort
|
||||
$cmdbMatches = Find-ISMBO -bo cis -SearchQuery $name
|
||||
|
|
|
|||
|
|
@ -46,7 +46,10 @@
|
|||
$MAC = ($win32_networkadapterconfiguration | Where-Object {$_.IpEnabled -Match "True"} | Select-Object -Expand macaddress) -join ","
|
||||
|
||||
#IP
|
||||
$ip = ($win32_networkadapterconfiguration | Where-Object {$_.IpEnabled -Match "True"} | Select-Object -Expand IPAddress) -join ","
|
||||
$ip = ($win32_networkadapterconfiguration | Where-Object {$_.IpEnabled -Match "True"} | Select-Object -Expand IPAddress |
|
||||
# IPv4 address filter
|
||||
Where-Object {$_ -match "^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$"}
|
||||
) -join ","
|
||||
<#
|
||||
if($ip -is [array]){
|
||||
$ip = $ip[0]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
-Fix when reporting many IP addresses, now only displays ipv4
|
||||
|
||||
Patch: 2024-09-13
|
||||
-Fix Order of hostame resolution changed so it's more consistent with true hostname
|
||||
-Remove MBAM GPO from output
|
||||
|
|
@ -5,6 +7,7 @@ Patch: 2024-09-13
|
|||
-Fix shortened Spark! timeout since Spark! typically won't succeed after 5 seconds
|
||||
-Fix bug when querying mobile devices
|
||||
-Fix Less helpful (and less confusing) ISM error messages
|
||||
-Fix all ip addresses reported when more than one are present
|
||||
-Tip try setting $SoundEnabled = $true
|
||||
|
||||
Patch: 2024-09-12
|
||||
|
|
|
|||
Loading…
Reference in a new issue