Wednesday, August 24, 2016

Windows 10 Network Devices Disappear

Recently after Windows 10 updates all of my physical and wireless network devices disappeared. I could not connect even with a new USB to GB network adapter. I tried deleting and reinstalling the drivers to no avail. The devices showed in device manager, however they were not accessible in network and sharing center. The Windows updates would not uninstall as they were now part of the OS.

After researching I found that forcing a reset of the network settings appeared to fix the issue. To do so open a command prompt as an administrator and run the following commands:

Netcfg -v -u dni_dne

Netcfg -d

Then restart the system

Tuesday, August 2, 2016

PowerShell for Domain Systems Information Reports

With normal network maintenance and hardware replacement cycles it is a good idea to keep an eye on the age and other information of the computers on your network. There are lots of third party tools to run more detailed reports, but if you want a quick report why not use PowerShell on Server 2012 and export to a CSV file.

Open up PowerShell as an administrator and review the Get-ADComputer commands

Get-ADComputer -Filter *

Will show you basic AD attributes of the systems:

clip_image002[4]

Get-ADComputer -Filter * -Properties * will give you way too much information but shows you all the possible variables you can choose from. Below are some of the more common properties you would likely want to query for reports:

clip_image004[4]

clip_image006[4]

clip_image008[4]

Now to run the following command to see the fully qualified computer names, the date and time they were created in AD, along with last logon date and time:

Get-ADComputer -Filter * -Properties "DNSHostName","Created","LastLogonDate" |select dnshostname,created,lastlogondate

clip_image010[5]

Note: This just shows when created/joined to the domain it is not a confirmation of the computers true age. That will require further research but typically this will provide the ballpark needed.

Now to run the command again but this time export the data we want to a CSV file in C:\Temp\ that can be more easily viewed, edited and sorted in Excel.

Get-ADComputer -Filter * -Properties "DNSHostName","Created","LastLogonDate" |select dnshostname,created,lastlogondate |Export-csv C:\temp\computerdata.csv

clip_image011[5]

Note: It creates a “#TYPE Selected.Microsoft.ActiveDirectory.Management.ADComputer” field on Line 1A you can delete.

Using the example above you can add or remove properties to your report. For example I will add operating system information and change the fully qualified computer name to the shorter “Name”:

Get-ADComputer -Filter * -Properties "Name","Created","LastLogonDate",”OperatingSystem” |select name,created,lastlogondate, operatingsystem |Export-csv C:\temp\computerdata.csv

clip_image013[5]

This should provide you quick answers you need regarding your systems

Happy Querying!

Reference: Ed Buford

Windows 10 Network Binding Order

So you are using wireless or a physical connection on your Windows 10 system and you want to use one or the other as the default for gateway/WAN traffic routes.

Example:
I am plugged in at a sites physical connection working on the local network which goes through strict external routing/content rules. Those rules block me from using my remote access programs, Skype voice, Pandora…

I enable my wireless and use my Iphone hotspot or other MiFi device, however even though it connects, traffic by default is still (bound) routed to the physical connection.

Open Powershell as Administrator and run the following commands to locate your WiFi and Ethernet “ifIndex” (interfaceindex)
get-netipinterface

Review the results listed and revise the one you want to be the default gateway/WAN traffic routes “InterfaceMetric” to be the lowest number as shown below for the “Wifi” interface 7.

The command in the example below is:
set-netipinterface -interfaceindex “7” -InterfaceMetric “3”

image

Alternatively, you can revise the other to a higher number to change the order as well.

To confirm your setting saved simply run the “get-netipinterface” again to review status

Note: Remember this change is “Persistent” meaning it will stay this way till you change it. Your “ifindex” number may change, but the interface metric should stay.

CAUTION: Make sure using a mifi or other wireless device is not a violation of your companies compliance, security practices, and/or other policies.