Skip to content

Script show Array issue ( sometimes ) #36

Description

@CupLin36

Hi Team,

I have developed an inventory script and i am currently testing the module on several PCs.

Used Version
https://www.powershellgallery.com/packages/PSDiscoveryProtocol/1.4.3

on one tested PCs i get this message. but i hav to save.... "sometimes it works on the same PC"
On most tested PCs it woked but not on one .... there is nothing specific... i hope .

PS C:\Temp> Import-Module c:\programdata\Switch-Info\psdiscoveryprotocol\PSDiscoveryProtocol.psm1 -Force
PS C:\Temp> $Packet = Invoke-DiscoveryProtocolCapture -Type LLDP
PS C:\Temp> Get-DiscoveryProtocolData -Packet $Packet

Ausnahme beim Aufrufen von "ToUInt16" mit 2 Argument(en): "Das Zielarray ist nicht lang genug, um alle Elemente in
der Sammlung zu kopieren. Überprüfen Sie Arrayindex und -länge."
In C:\programdata\Switch-Info\psdiscoveryprotocol\PSDiscoveryProtocol.psm1:755 Zeichen:13

  •         $Length = [BitConverter]::ToUInt16($Packet[($Offset + 1). ...
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : ArgumentException

Port : 101015
TimeToLive : 120
ChassisId : xxxxxxxxxxxxxx
Computer : xxxxxxHostname
Connection : Ethernet 3
Interface : Realtek USB GbE Family Controller
Type : LLDP

#########

hav you any idee ?

Thanks
Marcus

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions