Below is the output I am getting from my ipconfig /all command
PS C:\Windows\system32> ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : XXXXXXXX
Primary Dns Suffix . . . . . . . : XXXXXX
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : XXXX.XXX.XXX.XX
XX.XXX.XXX
Ethernet adapter PROD:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : vmxnet3 Ethernet Adapter #2
Physical Address. . . . . . . . . : 00-50-56-8B-CA-B3
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 1.1.9.7(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.224
Default Gateway . . . . . . . . . : 1.124.0.5
DNS Servers . . . . . . . . . . . : 10.255.255.10
10.0.0.10
NetBIOS over Tcpip. . . . . . . . : Disabled
Ethernet adapter Backup:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : vmxnet3 Ethernet Adapter
Physical Address. . . . . . . . . : 00-50-56-8B-9C-C6
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.5.35.2(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.252.0
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Disabled
Tunnel adapter isatap.{ED18D3B3-5B05-451B-A0D2-AEEBB251E77A}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
I want to get only the Ethernet details from this output
Something like starting from Ethernet and ending Tunnel. line between these 2 words
I was tried using netsh and grep, but not able to get the output
Please need some help how to do this.
You should review the 3 following cmdlets:
Get-NetAdapter (return ifIndex)
Get-NetIPAddress (return InterfaceIndex)
Get-NetIPConfiguration (return InterfaceIndex)
Combining all the three should give you what you expect.
Related
We are doing a configuration inventory of servers in our system, and found something odd. Two of our servers share this anomaly:
When we run PowerShell Get-NetIPAddress as follows:
Get-NetIPAddress -addressstate Preferred -addressfamily ipv4
Three IP addresses are returned. They are 192.x.x.x, 127.0.0.1, and 169.x.x.x. The 169 address, in both cases, reportedly are on Interface Alias Local Area Connectiuon 11* The IP addresses are different from one another, but both in the 169.254.0.0/16 network (16-bit mask).
However, "ipconfig /all" for these two servers does not show the 169 address at all.
Control Panel / Network and Internet / Network Connections also does not show anythong other than the interface for 192.168.x.x.
Where might I look to determine where Get-NetIPAddress is getting this information?
PS C:\Windows\system32> Get-NetIPAddress -addressstate Preferred -addressfamily ipv4
IPAddress : 192.168.10.xxx
InterfaceIndex : 13
InterfaceAlias : Ethernet 2
AddressFamily : IPv4
Type : Unicast
PrefixLength : 24
PrefixOrigin : Manual
SuffixOrigin : Manual
AddressState : Preferred
ValidLifetime : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource : False
PolicyStore : ActiveStore
**IPAddress : 169.254.xxx.xxx
InterfaceIndex : 14
InterfaceAlias : Local Area Connection* 11
AddressFamily : IPv4
Type : Unicast
PrefixLength : 16
PrefixOrigin : WellKnown
SuffixOrigin : Link
AddressState : Preferred
ValidLifetime : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource : False
PolicyStore : ActiveStore**
IPAddress : 127.0.0.1
InterfaceIndex : 1
InterfaceAlias : Loopback Pseudo-Interface 1
AddressFamily : IPv4
Type : Unicast
PrefixLength : 8
PrefixOrigin : WellKnown
SuffixOrigin : WellKnown
AddressState : Preferred
ValidLifetime : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource : False
PolicyStore : ActiveStore
PS C:\Windows\system32>
PS C:\Windows\system32> ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : GotDomVM1
Primary Dns Suffix . . . . . . . : gotnet.net
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : gotnet.net
Tunnel adapter Local Area Connection* 11:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Failover Cluster Virtual Adapter
Physical Address. . . . . . . . . : 02-87-4F-xx-xx-xx
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Ethernet adapter Ethernet 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
Physical Address. . . . . . . . . : 00-15-5D-xx-xx-xx
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::b074:d74d:6320:dab0%13(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.10.xxx(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.10.xxx
DHCPv6 IAID . . . . . . . . . . . : 251663709
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-25-F9-6D-6F-00-15-xx-xx-xx-xx
DNS Servers . . . . . . . . . . . : ::1
192.168.10.x
192.168.10.y
127.0.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Tunnel adapter isatap.{6D49450E-C01F-4FF3-9CF8-033D67921AA6}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-xx-xx-xx-xx
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.{2B8A29E1-13B1-4311-A1F7-6CDBA190EC28}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
PS C:\Windows\system32>
Thanks,
Dennis
Well as to why it has a 169 address at all:
What is a Microsoft Failover Cluster Virtual Adapter anyway?
Like other adapters, the Microsoft Failover Cluster Virtual Adapter
has a MAC address and both IPv4 and IPv6 addresses assigned to it. The
IPv4 address is an Automatic Private Internet Protocol Addressing
(APIPA) address
But why it doesn't show up using ipconfig /all? Probably because it's disconnected. It still has an IP address assigned, so Get-NetIPAddress sees that, but ipconfig doesn't really care about inactive IPs. the linked MS blog specifically shows it working normally with ipconfig:
it is plainly visible when listing the network configuration of a Cluster node using the ipconfig /all command line.
After updating HELM and restarting Emacs it doesn't show a list of initial candidates. However, it shows them after you start typing. This is inconvenient as visual cues are lacking. Has anyone encountered and solved it?
My config is as simple as this:
(straight-use-package '(helm :type git :host github :repo "emacs-helm/helm"))
(use-package helm
:config (helm-mode)
:bind (("M-x" . helm-M-x)
("C-o" . helm-find-files)
("M-s s" . helm-projectile)
("s-a" . helm-ag)
("M-s M-s" . helm-projectile-switch-project)
("C-b" . helm-mini)
:map helm-map
("<tab>" . helm-execute-persistent-action)
("C-i" . helm-select-action)
("M-k" . helm-next-line)
("M-i" . helm-previous-line)
:map helm-find-files-map
("M-i" . helm-previous-line)
("M-k" . helm-next-line)
:map helm-generic-files-map
("M-i" . helm-previous-line)
("M-k" . helm-next-line)
))
The problem was with Centaur-tabs, somehow it interfered with Helm-M-x. Disabling it helped. I didn't try to update it as I'm going to switch to the tab-line-mode. So I won't be testing the issue deeper it the moment. The important thing is Helm works as supposed now.
My first post and I really need some guidance, I have spent weeks researching and trying to understand why my mail code does not appear to be working on the corporate hosting(Plesk) vs. my personal hosting(CPanel) - (both on GoDaddy)
I have a number of areas within my site that I send emails, either to a newly registered user or when a user has downloaded software. The newly registered email I send works on both CPanel and Plesk
My problem is on the hosting of my personal website (CPanel), the following code works fine. However, when using the exact same code on my corporate hosting (Plesk) this does not work. I am pulling my hair out and would really appreciate a steer from you experts.
This is the code:
$to = "myname#myemail.com";
$subject = "Trial Software downloaded";
$headers.= 'From: "Test Mail" <noreply#myemail.com>';
$headers.= 'Reply-To: "Reply Mail" <noreply#myemail.com>';
$headers.= 'X-Mailer: PHP/' . phpversion();
$headers.= 'MIME-Version: 1.0';
$headers.= 'Content-type: text/html; charset=iso-8859-1';
$Message = 'Software Downloaded' . "\n\n" . 'The following registered user
has just downloaded a trial' . "\n\n" . 'Name: ' . $Fname . " " . $Lname .
"\n" . 'Company: '. $Company . "\n" . 'Email: '. $Email . "\n" . "Product: "
. $Product . "\n" . 'Date: ' . $a . "\n\n" . "An evaluation license for " .
$Product . " requires sending to " . $Email;
mail($to, $subject, $Message, $headers);
I once used int_set to send email from my company local xammp server for testing.
ini_set('SMTP','mail.companysite.com');
ini_set('smtp_port','26');
ini_set('sendmail_from','email#companysite.com');
Now our host has upgraded the server and we have to authenticate email sending. However I have not been able to get ini_set to work with authentication for email. How can this be done?
We are using xampp on windows machine.
I figured this out:
here is my code:
ini_set('SMTP','mail.somewebsite');
ini_set('smtp_port','26');
ini_set('sendmail_from','email#somewebsite');
ini_set('auth_username','email#somewebsite');
ini_set('auth_password','password');
$headers = "From:email#somewebsite\r\n" .
'X-Mailer: PHP/' . phpversion() . "\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/html; charset=utf-8\r\n" .
"Content-Transfer-Encoding: 8bit\r\n\r\n";
mail("email#gmail.com", "testing authentication", "hello world", $headers);
Getting this error:
Fatal error: require_once() [function.require]: Failed opening required 'db/db.php' (include_path='/home/domain.ru/testerier/sites/application/../library:/home/domain.ru/testerier/sites/library:.:/usr/local/lib/php;/home/domain.ru/testerier/sites/application/models') in /home/domain.ru/testerier/sites/www/index.php on line 51
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)).";".realpath(APPLICATION_PATH . '/models'));
It's working perfectly on the local machine. What's wrong?
Is your local machine a windwos machine and the server Linux? Then you might have a problem with case sensitivity. Windows is not case sensitive and therefore on windows Folder and folder are the same. On Linux they aren't. Maybe your library is actually Library or something.