Win32::Netsh::Interface - Provide functions in that correlate to the Microsoft Windows netsh utility's interface context
Version 0.02
use Win32::Netsh::Interface qw(interface_ipv4_info); my @ip_addresses = interface_ipv4_info(qq{Local Area Network});
Set the debug level for the module
Debug level
Current debug level
Return a hash reference with the IPV4 information for the given interface
Name of the interface
HASH reference whose keys are as follows:
Indicates if DHCP is enabled
Array reference containing IP addresses for the interface
Array reference containing netmasks for the interface
IP address of the default gateway for the interface
Gateway metric
Interface metric
Return an array reference that contains hash reference with the IPV4 information for each interface
NONE
Array reference to array of hash references whose keys are as follows:
Return the error string associated with the last command
Error string
Return an reference to an array of hash references with interface information
ARRAY reference of hash references whose keys are as follows:
Boolean indicating if the administrative state is enabled
Indicates the connections state as Connected or Disconnected
Indicates the type of interface
Return a hash references with interface information
Name of the interface such as "Local Area Connection"
Indicates the named interface could not be found
Hash reference whose keys are as follows:
Enable / disable the specified interface
NOTE: The script must be running with Administrator privileges for to be able to enable or disable an interface
Name of the interface to control
Boolean value indicating if the interface should be enabled
A "true" value indicates success
UNDEF or a "false" vale indicates an error. The error message can be retrieved using interface_last_error()
Win32::Netsh::Wlan for examining and controlling the netsh wlan context for wireless interfaces.
Paul Durden <alabamapaul AT gmail.com>
Copyright (C) 2015 by Paul Durden.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Win32::Netsh, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::Netsh
CPAN shell
perl -MCPAN -e shell install Win32::Netsh
For more information on module installation, please visit the detailed CPAN module installation guide.