We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe. No
Describe the solution you'd like It would be great to add the driver details to the network adapter array.
Describe alternatives you've considered Plan on modifying myself in the script we use, but thought others might find it useful as well.
Additional context Possible solution
` #Get network adapters $NetWorkArray = @()
$CurrentNetAdapters = Get-NetAdapter | Where-Object { $_.Status -eq 'Up' }
foreach ($CurrentNetAdapter in $CurrentNetAdapters) { try{ $IPConfiguration = Get-NetIPConfiguration -InterfaceIndex $CurrentNetAdapter[0].ifIndex -ErrorAction Stop } catch{ $IPConfiguration = $null }
try { $DriverVersion = (Get-CimInstance -ClassName win32_pnpsigneddriver -ErrorAction Stop | Where-Object {$_.description -like "$($CurrentNetAdapter.InterfaceDescription)"}).DriverVersion } catch { $DriverVersion = $null } $ComputerNetInterfaceDescription = $CurrentNetAdapter.InterfaceDescription $ComputerNetProfileName = $IPConfiguration.NetProfile.Name $ComputerNetIPv4Adress = $IPConfiguration.IPv4Address.IPAddress $ComputerNetInterfaceAlias = $CurrentNetAdapter.InterfaceAlias $ComputerNetIPv4DefaultGateway = $IPConfiguration.IPv4DefaultGateway.NextHop $ComputerNetMacAddress = $CurrentNetAdapter.MacAddress $tempnetwork = New-Object -TypeName PSObject $tempnetwork | Add-Member -MemberType NoteProperty -Name "NetInterfaceDescription" -Value "$ComputerNetInterfaceDescription" -Force $tempnetwork | Add-Member -MemberType NoteProperty -Name "NetProfileName" -Value "$ComputerNetProfileName" -Force $tempnetwork | Add-Member -MemberType NoteProperty -Name "NetIPv4Adress" -Value "$ComputerNetIPv4Adress" -Force $tempnetwork | Add-Member -MemberType NoteProperty -Name "NetInterfaceAlias" -Value "$ComputerNetInterfaceAlias" -Force $tempnetwork | Add-Member -MemberType NoteProperty -Name "NetIPv4DefaultGateway" -Value "$ComputerNetIPv4DefaultGateway" -Force $tempnetwork | Add-Member -MemberType NoteProperty -Name "MacAddress" -Value "$ComputerNetMacAddress" -Force $tempnetwork | Add-Member -MemberType NoteProperty -Name "DriverVersion" -Value "$DriverVersion" -Force $NetWorkArray += $tempnetwork
} [System.Collections.ArrayList]$NetWorkArrayList = $NetWorkArray `
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
It would be great to add the driver details to the network adapter array.
Describe alternatives you've considered
Plan on modifying myself in the script we use, but thought others might find it useful as well.
Additional context
Possible solution
`
#Get network adapters
$NetWorkArray = @()
$CurrentNetAdapters = Get-NetAdapter | Where-Object { $_.Status -eq 'Up' }
foreach ($CurrentNetAdapter in $CurrentNetAdapters) {
try{
$IPConfiguration = Get-NetIPConfiguration -InterfaceIndex $CurrentNetAdapter[0].ifIndex -ErrorAction Stop
}
catch{
$IPConfiguration = $null
}
}
[System.Collections.ArrayList]$NetWorkArrayList = $NetWorkArray
`
The text was updated successfully, but these errors were encountered: