Skip to content

Instantly share code, notes, and snippets.

@JCapriotti
Last active March 10, 2016 18:41
Show Gist options
  • Select an option

  • Save JCapriotti/3792a0bf2b020aba7a31 to your computer and use it in GitHub Desktop.

Select an option

Save JCapriotti/3792a0bf2b020aba7a31 to your computer and use it in GitHub Desktop.
Ohai / Windows
Windows IP Configuration
Host Name . . . . . . . . . . . . : INTPLAT-JASON_TDFGEN001
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Data Interface:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Xen Net Device Driver #3
Physical Address. . . . . . . . . : 00-16-3E-D0-85-63
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.1.141.101(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.240
Default Gateway . . . . . . . . . : 0.0.0.0
NetBIOS over Tcpip. . . . . . . . : Disabled
Ethernet adapter Application Interface:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Xen Net Device Driver #2
Physical Address. . . . . . . . . : 00-16-3E-0C-E0-F4
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.1.141.85(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.240
Default Gateway . . . . . . . . . : 10.1.141.81
NetBIOS over Tcpip. . . . . . . . : Disabled
Ethernet adapter DCI Interface:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Xen Net Device Driver
Physical Address. . . . . . . . . : 00-16-3E-66-75-CB
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 223.0.47.7(Preferred)
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Lease Obtained. . . . . . . . . . : Monday, February 2, 1880 10:29:10 AM
Lease Expires . . . . . . . . . . : Thursday, March 10, 2016 12:27:28 PM
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 223.0.0.1
DNS Servers . . . . . . . . . . . : 223.0.0.1
NetBIOS over Tcpip. . . . . . . . : Disabled
{
"cpu": {
"0": {
"cores": 2,
"vendor_id": "AuthenticAMD",
"family": "1",
"model": "512",
"stepping": "0",
"physical_id": "CPU0",
"model_name": "AMD64 Family 21 Model 2 Stepping 0",
"mhz": "2800",
"cache_size": " KB"
},
"total": 2,
"cores": 2,
"real": 1
},
"filesystem": {
"C:": {
"kb_size": 107372081,
"kb_available": 92778496,
"kb_used": 14593585,
"percent_used": 13,
"mount": "C:",
"fs_type": "ntfs",
"volume_name": "OSDisk"
},
"D:": {
"kb_size": 34223419,
"kb_available": 34139496,
"kb_used": 83923,
"percent_used": 0,
"mount": "D:",
"fs_type": "ntfs",
"volume_name": ""
}
},
"kernel": {
"os_info": {
"boot_device": "\\Device\\HarddiskVolume1",
"build_number": "9600",
"build_type": "Multiprocessor Free",
"caption": "Microsoft Windows Server 2012 R2 Datacenter",
"code_set": "1252",
"country_code": "1",
"creation_class_name": "Win32_OperatingSystem",
"cs_creation_class_name": "Win32_ComputerSystem",
"csd_version": null,
"cs_name": "INTPLAT-JASON_T",
"current_time_zone": -360,
"data_execution_prevention_32_bit_applications": true,
"data_execution_prevention_available": true,
"data_execution_prevention_drivers": true,
"data_execution_prevention_support_policy": 3,
"debug": false,
"description": "",
"distributed": false,
"encryption_level": 256,
"foreground_application_boost": 2,
"free_physical_memory": "7315784",
"free_space_in_paging_files": "1966080",
"free_virtual_memory": "9043688",
"install_date": "20160310165423.000000-360",
"large_system_cache": null,
"last_boot_up_time": "20160310105652.888232-360",
"local_date_time": "20160310120954.111000-360",
"locale": "0409",
"manufacturer": "Microsoft Corporation",
"max_number_of_processes": -1,
"max_process_memory_size": "137438953344",
"mui_languages": [
"en-US"
],
"name": "Microsoft Windows Server 2012 R2 Datacenter|C:\\windows|\\Device\\Harddisk0\\Partition1",
"number_of_licensed_users": 0,
"number_of_processes": 45,
"number_of_users": 1,
"operating_system_sku": 8,
"organization": "D",
"os_architecture": "64-bit",
"os_language": 1033,
"os_product_suite": 400,
"os_type": 18,
"other_type_description": null,
"pae_enabled": null,
"plus_product_id": null,
"plus_version_number": null,
"portable_operating_system": false,
"primary": true,
"product_type": 3,
"registered_user": "D",
"serial_number": "00252-00109-72570-AA710",
"service_pack_major_version": 0,
"service_pack_minor_version": 0,
"size_stored_in_paging_files": "1966080",
"status": "OK",
"suite_mask": 400,
"system_device": "\\Device\\HarddiskVolume1",
"system_directory": "C:\\windows\\system32",
"system_drive": "C:",
"total_swap_space_size": null,
"total_virtual_memory_size": "10346096",
"total_visible_memory_size": "8380016",
"version": "6.3.9600",
"windows_directory": "C:\\windows"
},
"name": "Microsoft Windows Server 2012 R2 Datacenter",
"release": "6.3.9600",
"version": "6.3.9600 Build 9600",
"os": "WINNT",
"cs_info": {
"admin_password_status": 3,
"automatic_managed_pagefile": true,
"automatic_reset_boot_option": true,
"automatic_reset_capability": true,
"boot_option_on_limit": null,
"boot_option_on_watch_dog": null,
"boot_rom_supported": true,
"bootup_state": "Normal boot",
"caption": "INTPLAT-JASON_T",
"chassis_bootup_state": 3,
"creation_class_name": "Win32_ComputerSystem",
"current_time_zone": -360,
"daylight_in_effect": false,
"description": "AT/AT COMPATIBLE",
"dns_host_name": "INTPLAT-JASON_TDFGEN001",
"domain": "WORKGROUP",
"domain_role": 2,
"enable_daylight_savings_time": true,
"front_panel_reset_status": 3,
"hypervisor_present": true,
"infrared_supported": false,
"initial_load_info": null,
"install_date": null,
"keyboard_password_status": 3,
"last_load_info": null,
"manufacturer": "Xen",
"model": "HVM domU",
"name": "INTPLAT-JASON_T",
"name_format": null,
"network_server_mode_enabled": true,
"number_of_logical_processors": 2,
"number_of_processors": 1,
"oem_string_array": [
"Xen"
],
"part_of_domain": false,
"pause_after_reset": "-1",
"pc_system_type": 1,
"pc_system_type_ex": 1,
"power_management_capabilities": null,
"power_management_supported": null,
"power_on_password_status": 3,
"power_state": 0,
"power_supply_state": 3,
"primary_owner_contact": null,
"primary_owner_name": "D",
"reset_capability": 1,
"reset_count": -1,
"reset_limit": -1,
"roles": [
"LM_Workstation",
"LM_Server",
"NT",
"Server_NT"
],
"status": "OK",
"support_contact_description": null,
"system_startup_delay": null,
"system_startup_options": null,
"system_startup_setting": null,
"system_type": "x64-based PC",
"thermal_state": 3,
"total_physical_memory": "8581136384",
"user_name": null,
"wake_up_type": 6,
"workgroup": "WORKGROUP"
},
"machine": "x86_64"
},
"memory": {
"swap": {
"total": "1966080kB",
"free": "1966080kB"
},
"total": "8380016kB",
"free": "7315160kB"
},
"network": {
"interfaces": {
"0xc": {
"configuration": {
"arp_always_source_route": null,
"arp_use_ether_snap": null,
"caption": "[00000010] Xen Net Device Driver",
"database_path": "%SystemRoot%\\System32\\drivers\\etc",
"dead_gw_detect_enabled": null,
"default_ip_gateway": null,
"default_tos": null,
"default_ttl": null,
"description": "Xen Net Device Driver",
"dhcp_enabled": true,
"dhcp_lease_expires": "20160310121728.000000-360",
"dhcp_lease_obtained": "20160310120728.000000-360",
"dhcp_server": "223.0.0.1",
"dns_domain": null,
"dns_domain_suffix_search_order": [
],
"dns_enabled_for_wins_resolution": false,
"dns_host_name": "INTPLAT-JASON_TDFGEN001",
"dns_server_search_order": [
"223.0.0.1"
],
"domain_dns_registration_enabled": false,
"forward_buffer_memory": null,
"full_dns_registration_enabled": true,
"gateway_cost_metric": null,
"igmp_level": null,
"index": 10,
"interface_index": 12,
"ip_address": [
"223.0.47.7"
],
"ip_connection_metric": 5,
"ip_enabled": true,
"ip_filter_security_enabled": false,
"ip_port_security_enabled": null,
"ip_sec_permit_ip_protocols": [
],
"ip_sec_permit_tcp_ports": [
],
"ip_sec_permit_udp_ports": [
],
"ip_subnet": [
"255.0.0.0"
],
"ip_use_zero_broadcast": null,
"ipx_address": null,
"ipx_enabled": null,
"ipx_frame_type": null,
"ipx_media_type": null,
"ipx_network_number": null,
"ipx_virtual_net_number": null,
"keep_alive_interval": null,
"keep_alive_time": null,
"mac_address": "00:16:3E:66:75:CB",
"mtu": null,
"num_forward_packets": null,
"pmtubh_detect_enabled": null,
"pmtu_discovery_enabled": null,
"service_name": "XenNet",
"setting_id": "{B2F87D17-1492-4F0D-B63B-CDBE48490B34}",
"tcpip_netbios_options": 2,
"tcp_max_connect_retransmissions": null,
"tcp_max_data_retransmissions": null,
"tcp_num_connections": null,
"tcp_use_rfc1122_urgent_pointer": null,
"tcp_window_size": null,
"wins_enable_lm_hosts_lookup": true,
"wins_host_lookup_file": null,
"wins_primary_server": null,
"wins_scope_id": "",
"wins_secondary_server": null
},
"instance": {
"adapter_type": "Ethernet 802.3",
"adapter_type_id": 0,
"auto_sense": null,
"availability": 3,
"caption": "[00000010] Xen Net Device Driver",
"config_manager_error_code": 0,
"config_manager_user_config": false,
"creation_class_name": "Win32_NetworkAdapter",
"description": "Xen Net Device Driver",
"device_id": "10",
"error_cleared": null,
"error_description": null,
"guid": "{B2F87D17-1492-4F0D-B63B-CDBE48490B34}",
"index": 10,
"install_date": null,
"installed": true,
"interface_index": 12,
"last_error_code": null,
"mac_address": "00:16:3E:66:75:CB",
"manufacturer": "Xen GPL PV Driver Developers",
"max_number_controlled": 0,
"max_speed": null,
"name": "Xen Net Device Driver",
"net_connection_id": "DCI Interface",
"net_connection_status": 2,
"net_enabled": true,
"network_addresses": null,
"permanent_address": null,
"physical_adapter": true,
"pnp_device_id": "XEN\\VIF\\4&3519CBBC&0&02",
"power_management_capabilities": null,
"power_management_supported": false,
"product_name": "Xen Net Device Driver",
"service_name": "XenNet",
"speed": "10000000000",
"status": null,
"status_info": null,
"system_creation_class_name": "Win32_ComputerSystem",
"system_name": "INTPLAT-JASON_T",
"time_of_last_reset": "20160310105652.888232-360"
},
"counters": {
},
"addresses": {
"223.0.47.7": {
"prefixlen": "8",
"netmask": "255.0.0.0",
"broadcast": "223.255.255.255",
"family": "inet"
},
"00:16:3E:66:75:CB": {
"family": "lladdr"
}
},
"mtu": null,
"type": "Ethernet 802.3",
"arp": {
"223.0.0.1": "00:16:5f:01:00:04",
"224.0.0.22": "01:00:5e:00:00:16",
"224.0.0.252": "01:00:5e:00:00:fc",
"255.255.255.255": "ff:ff:ff:ff:ff:ff"
},
"encapsulation": "Ethernet"
},
"0xd": {
"configuration": {
"arp_always_source_route": null,
"arp_use_ether_snap": null,
"caption": "[00000011] Xen Net Device Driver",
"database_path": "%SystemRoot%\\System32\\drivers\\etc",
"dead_gw_detect_enabled": null,
"default_ip_gateway": [
"10.1.141.81"
],
"default_tos": null,
"default_ttl": null,
"description": "Xen Net Device Driver #2",
"dhcp_enabled": false,
"dhcp_lease_expires": null,
"dhcp_lease_obtained": null,
"dhcp_server": null,
"dns_domain": null,
"dns_domain_suffix_search_order": [
],
"dns_enabled_for_wins_resolution": false,
"dns_host_name": "INTPLAT-JASON_TDFGEN001",
"dns_server_search_order": null,
"domain_dns_registration_enabled": false,
"forward_buffer_memory": null,
"full_dns_registration_enabled": true,
"gateway_cost_metric": [
1
],
"igmp_level": null,
"index": 11,
"interface_index": 13,
"ip_address": [
"10.1.141.85"
],
"ip_connection_metric": 5,
"ip_enabled": true,
"ip_filter_security_enabled": false,
"ip_port_security_enabled": null,
"ip_sec_permit_ip_protocols": [
],
"ip_sec_permit_tcp_ports": [
],
"ip_sec_permit_udp_ports": [
],
"ip_subnet": [
"255.255.255.240"
],
"ip_use_zero_broadcast": null,
"ipx_address": null,
"ipx_enabled": null,
"ipx_frame_type": null,
"ipx_media_type": null,
"ipx_network_number": null,
"ipx_virtual_net_number": null,
"keep_alive_interval": null,
"keep_alive_time": null,
"mac_address": "00:16:3E:0C:E0:F4",
"mtu": null,
"num_forward_packets": null,
"pmtubh_detect_enabled": null,
"pmtu_discovery_enabled": null,
"service_name": "XenNet",
"setting_id": "{F93C854E-2A80-4C92-B03E-595E810FCB54}",
"tcpip_netbios_options": 2,
"tcp_max_connect_retransmissions": null,
"tcp_max_data_retransmissions": null,
"tcp_num_connections": null,
"tcp_use_rfc1122_urgent_pointer": null,
"tcp_window_size": null,
"wins_enable_lm_hosts_lookup": true,
"wins_host_lookup_file": null,
"wins_primary_server": null,
"wins_scope_id": "",
"wins_secondary_server": null
},
"instance": {
"adapter_type": "Ethernet 802.3",
"adapter_type_id": 0,
"auto_sense": null,
"availability": 3,
"caption": "[00000011] Xen Net Device Driver",
"config_manager_error_code": 0,
"config_manager_user_config": false,
"creation_class_name": "Win32_NetworkAdapter",
"description": "Xen Net Device Driver",
"device_id": "11",
"error_cleared": null,
"error_description": null,
"guid": "{F93C854E-2A80-4C92-B03E-595E810FCB54}",
"index": 11,
"install_date": null,
"installed": true,
"interface_index": 13,
"last_error_code": null,
"mac_address": "00:16:3E:0C:E0:F4",
"manufacturer": "Xen GPL PV Driver Developers",
"max_number_controlled": 0,
"max_speed": null,
"name": "Xen Net Device Driver #2",
"net_connection_id": "Application Interface",
"net_connection_status": 2,
"net_enabled": true,
"network_addresses": null,
"permanent_address": null,
"physical_adapter": true,
"pnp_device_id": "XEN\\VIF\\4&3519CBBC&0&00",
"power_management_capabilities": null,
"power_management_supported": false,
"product_name": "Xen Net Device Driver",
"service_name": "XenNet",
"speed": "10000000000",
"status": null,
"status_info": null,
"system_creation_class_name": "Win32_ComputerSystem",
"system_name": "INTPLAT-JASON_T",
"time_of_last_reset": "20160310105652.888232-360"
},
"counters": {
},
"addresses": {
"10.1.141.85": {
"prefixlen": "28",
"netmask": "255.255.255.240",
"broadcast": "10.1.141.95",
"family": "inet"
},
"00:16:3E:0C:E0:F4": {
"family": "lladdr"
}
},
"mtu": null,
"type": "Ethernet 802.3",
"arp": {
"10.1.141.81": "00:00:00:03:01:04",
"224.0.0.22": "01:00:5e:00:00:16",
"224.0.0.252": "01:00:5e:00:00:fc"
},
"encapsulation": "Ethernet"
},
"0xe": {
"configuration": {
"arp_always_source_route": null,
"arp_use_ether_snap": null,
"caption": "[00000012] Xen Net Device Driver",
"database_path": "%SystemRoot%\\System32\\drivers\\etc",
"dead_gw_detect_enabled": null,
"default_ip_gateway": [
"0.0.0.0"
],
"default_tos": null,
"default_ttl": null,
"description": "Xen Net Device Driver #3",
"dhcp_enabled": false,
"dhcp_lease_expires": null,
"dhcp_lease_obtained": null,
"dhcp_server": null,
"dns_domain": null,
"dns_domain_suffix_search_order": [
],
"dns_enabled_for_wins_resolution": false,
"dns_host_name": "INTPLAT-JASON_TDFGEN001",
"dns_server_search_order": null,
"domain_dns_registration_enabled": false,
"forward_buffer_memory": null,
"full_dns_registration_enabled": true,
"gateway_cost_metric": [
9999
],
"igmp_level": null,
"index": 12,
"interface_index": 14,
"ip_address": [
"10.1.141.101"
],
"ip_connection_metric": 5,
"ip_enabled": true,
"ip_filter_security_enabled": false,
"ip_port_security_enabled": null,
"ip_sec_permit_ip_protocols": [
],
"ip_sec_permit_tcp_ports": [
],
"ip_sec_permit_udp_ports": [
],
"ip_subnet": [
"255.255.255.240"
],
"ip_use_zero_broadcast": null,
"ipx_address": null,
"ipx_enabled": null,
"ipx_frame_type": null,
"ipx_media_type": null,
"ipx_network_number": null,
"ipx_virtual_net_number": null,
"keep_alive_interval": null,
"keep_alive_time": null,
"mac_address": "00:16:3E:D0:85:63",
"mtu": null,
"num_forward_packets": null,
"pmtubh_detect_enabled": null,
"pmtu_discovery_enabled": null,
"service_name": "XenNet",
"setting_id": "{FB4B3470-EE36-47E8-9C80-F54D2B14B26A}",
"tcpip_netbios_options": 2,
"tcp_max_connect_retransmissions": null,
"tcp_max_data_retransmissions": null,
"tcp_num_connections": null,
"tcp_use_rfc1122_urgent_pointer": null,
"tcp_window_size": null,
"wins_enable_lm_hosts_lookup": true,
"wins_host_lookup_file": null,
"wins_primary_server": null,
"wins_scope_id": "",
"wins_secondary_server": null
},
"instance": {
"adapter_type": "Ethernet 802.3",
"adapter_type_id": 0,
"auto_sense": null,
"availability": 3,
"caption": "[00000012] Xen Net Device Driver",
"config_manager_error_code": 0,
"config_manager_user_config": false,
"creation_class_name": "Win32_NetworkAdapter",
"description": "Xen Net Device Driver",
"device_id": "12",
"error_cleared": null,
"error_description": null,
"guid": "{FB4B3470-EE36-47E8-9C80-F54D2B14B26A}",
"index": 12,
"install_date": null,
"installed": true,
"interface_index": 14,
"last_error_code": null,
"mac_address": "00:16:3E:D0:85:63",
"manufacturer": "Xen GPL PV Driver Developers",
"max_number_controlled": 0,
"max_speed": null,
"name": "Xen Net Device Driver #3",
"net_connection_id": "Data Interface",
"net_connection_status": 2,
"net_enabled": true,
"network_addresses": null,
"permanent_address": null,
"physical_adapter": true,
"pnp_device_id": "XEN\\VIF\\4&3519CBBC&0&01",
"power_management_capabilities": null,
"power_management_supported": false,
"product_name": "Xen Net Device Driver",
"service_name": "XenNet",
"speed": "10000000000",
"status": null,
"status_info": null,
"system_creation_class_name": "Win32_ComputerSystem",
"system_name": "INTPLAT-JASON_T",
"time_of_last_reset": "20160310105652.888232-360"
},
"counters": {
},
"addresses": {
"10.1.141.101": {
"prefixlen": "28",
"netmask": "255.255.255.240",
"broadcast": "10.1.141.111",
"family": "inet"
},
"00:16:3E:D0:85:63": {
"family": "lladdr"
}
},
"mtu": null,
"type": "Ethernet 802.3",
"arp": {
"224.0.0.22": "01:00:5e:00:00:16",
"224.0.0.252": "01:00:5e:00:00:fc"
},
"encapsulation": "Ethernet"
}
},
"default_gateway": "0.0.0.0",
"default_interface": "0xe"
},
"counters": {
"network": {
}
},
"ipaddress": "10.1.141.101",
"macaddress": "00:16:3E:D0:85:63",
"os": "windows",
"os_version": "6.3.9600",
"platform": "windows",
"platform_version": "6.3.9600",
"platform_family": "windows",
"uptime_seconds": 4383,
"uptime": "1 hours 13 minutes 03 seconds",
"virtualization": {
"systems": {
}
},
"languages": {
"powershell": {
"version": "4.0",
"ws_man_stack_version": "3.0",
"serialization_version": "1.1.0.1",
"clr_version": "4.0.30319.34209",
"build_version": "6.3.9600.17400",
"compatible_versions": [
"1.0",
"2.0",
"3.0",
"4.0"
],
"remoting_protocol_version": "2.2"
},
"python": {
"version": "2.7.9",
"builddate": "Dec 10 2014, 12:28:03"
},
"ruby": {
}
},
"chef_packages": {
"chef": {
"version": "12.8.1",
"chef_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib"
},
"ohai": {
"version": "8.11.1",
"ohai_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai"
}
},
"dmi": {
},
"cloud_v2": null,
"command": {
},
"hostname": "INTPLAT-JASON_TDFGEN001",
"machinename": "INTPLAT-JASON_T",
"fqdn": "INTPLAT-JASON_TDFGEN001",
"domain": null,
"keys": {
"ssh": {
}
},
"ohai_time": 1457633398.2050967,
"root_group": "Administrators"
}

PS code

$adapters = Get-WmiObject -Class Win32_NetworkAdapterConfiguration
Write-Output "adapters[10]:" ($adapters[10] | Format-List)
Write-Output "adapters[11]:" ($adapters[11] | Format-List)
Write-Output "adapters[12]:" ($adapters[12] | Format-List)

Output

adapters[10]:
DHCPEnabled      : True
IPAddress        : {223.0.47.7}
DefaultIPGateway :
DNSDomain        :
ServiceName      : XenNet
Description      : Xen Net Device Driver
Index            : 10

adapters[11]:
DHCPEnabled      : False
IPAddress        : {10.1.141.85}
DefaultIPGateway : {10.1.141.81}
DNSDomain        :
ServiceName      : XenNet
Description      : Xen Net Device Driver #2
Index            : 11

adapters[12]:
DHCPEnabled      : False
IPAddress        : {10.1.141.101}
DefaultIPGateway : {0.0.0.0}
DNSDomain        :
ServiceName      : XenNet
Description      : Xen Net Device Driver #3
Index            : 12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment