itmicus / zabbix

Zabbix Templates
GNU General Public License v3.0
155 stars 264 forks source link

Get-NetworkStatusFromValue is not recgonized as the name of a cmdlet #60

Closed jacks4ever closed 3 years ago

jacks4ever commented 3 years ago

When I am troubleshooting why I am not receiving my network traffic statistics, this is what I get as an error when I run this command in Windows 10 :

PS C:\Program Files\Zabbix Agent\scripts> .\os_windows_active.ps1 -ActionType get -Key pnetwork -Value "Intel[R] Dual Band Wireless-AC 7265"

Get-NetworkStatusFromValue : The term 'Get-NetworkStatusFromValue' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At C:\Program Files\Zabbix Agent\scripts\os_windows_active.ps1:271 char:34
+             $connection_status = Get-NetworkStatusFromValue -SV ([con ...
+                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-NetworkStatusFromValue:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

{
    "MacAddress":  null,
    "LinkSpeed":  0,
    "Name":  null,
    "InterfaceIndex":  null,
    "Status":  null,
    "AdminStatus":  null
}
jacks4ever commented 3 years ago

Upgraded to newer version.