Setting Network Interface Priority On Windows 8 with PowerShell

Yesterday I posted a blog on Setting Network Interface Priority on Windows 8 with the GUI, today I am going to show you how to do it with PowerShell.

Firstly you are going to have to run PowerShell at an elevated prompt, to do this, simply right click on the icon and click “Run as Administrator”

Type Get-NetIPInterface to get a list of all the network interfaces on your system. The 2 interfaces we are looking for are Ethernet and Wi-Fi, both on IPv4

Get-NetIPInterface


The Interface Metric is set to auto, and have been assigned 10 for the Ethernet and 20 for the Wi-Fi

To change this type the following to set the interface metric on the Ethernet interface to 5

Set-NetIPInterface -InterfaceAlias Ethernet -AddressFamily IPv4 -InterfaceMetric 5


Now change the Wi-Fi interface to 1

Set-NetIPInterface -InterfaceAlias Wi-Fi -AddressFamily IPv4 -InterfaceMetric 1


Now if we check the Get-NetIPInterface you will see that the interface metric for the adaptors Ethernet and Wi-Fi have changed to 5 and 1 respectively


You can also specify either IP4 or IP6 by changing the AddressFamily to either IPv4 or IPv6

Remember: You must do this for all active NICs to make sure they are in the right order.

@PCVirus_AU
Titan Solutions

Advertisements

Setting Network Interface Priority On Windows 8 with the GUI

Since upgrading to Windows 8, I have had problems with applications working with the proxy at work, ISA 2004.

As ISA 2004 is going to be decommissioned in the next couple of months, and the fact I have way too much work on, I opted for the easy way out, get my internet access from the guest wireless while using my wired connection for my domain related activities.

First type “view network connections” and click on the first option. This will throw you out to the Desktop and open the Network Connections window.

ViewNetworkConnections       NetworkConnections

Right click and select Properties for the network adaptor that you wish to change the priority for.

Scroll down to Internet Protocol Version 4 (TCP/IPv4), if that is what your using and click “Properties”

Next click the “Advanced…” button in the bottom right hand corner

EthernetProperties         InternetProtocolVersion4Properties

Untick the “Automatic metric” and type a number in the “Interface metric” box. The lower the number the higher the preference.

AdvancedTCPIPSettings        AdvancedTCPIPSettingsInterfaceMetric

Click “OK” on all the windows to close them out and your done.

In my configuration, I set the wired connection to 5 and the wifi connection to 1.

Remember: You must do this for all active NICs to make sure they are in the right order.

@PCVirus_AU
Titan Solutions

Backup Exec Beta FAQ

BE_128_shadowed

This morning the Backup Exec Beta team posted an update to their blog answering some questions they have been getting surrounding the beta program.

Here are the key points that I took away from this update.

  • You must have Backup Exec 2010 or Backup Exec 2012 already installed on your system. The beta will be delivered as a Service Pack update and should be installed as such (SP3 for Backup Exec 2010 and SP2 for Backup Exec 2012).
  • This initial delivery of the beta will only support remote protection (Agent for Windows) of Windows Server 2012, this means that Backup Exec must be installed on a Windows Server 2008 R2 box or lower.
  • No multi-server jobs will be available in the initial release of the beta, the job monitor will also not be available..

Links to trail version of Backup Exec and Windows Server

Backup Exec 2010 https://www4.symantec.com/Vrt/offer?a_id=91912

Backup Exec 2012 https://www4.symantec.com/Vrt/offer?a_id=142338

Windows Server 2008 R2 http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx

Windows Server 2012 http://technet.microsoft.com/en-au/evalcenter/hh670538.aspx

@PCVirus_AU
Titan Solutions

Calendar sharing is not available with the following entries because of permission settings on your network

A user came up to me this morning and informed me that they couldn’t share their calendar with a colleague, as they keep getting the error message “Calendar sharing is not available with the following entries because of permission settings on your network.”

Basic troubleshooting steps showed that this issue is simular to error is 0x80070057-00000000-00000000 and all that was really required to resolve it was to select the person from the GAL (Global Address List) rather then typing it in manually.

Another factor involved was that this colleague hadn’t been updated in the users Offline Address Book and this was the reason for typing in the email address in the first place. This was resolved by simply downloading the updates to the GAL.

@PCVirus_AU
Titan Solutions

DNS Name Lookup Failure when using Remote Desktop Connection Manager

I use Remote Desktop Connection Manager to RDP to my lab PCs. One particular PC wouldn’t connect via this method even though the PCs was up and running on the network.

Using Remote Desktop Connection (mstsc.exe) to connect via the PCs IP address, I could connect. Further troubleshooting showed me that I couldn’t ping or map a drive to this PC either.

The error I was getting in Remote Desktop Connection Manager was “DNS Name Lookup Failure”. Checking DNS on my domain controller showed that the PC was indeed in DNS.

Ploughing through my network adaptor settings, I came across Control Panel\Network and Internet\Network Connections\Ethernet Connection\Properties\Internet Protocol Version 4 Properties\Advanced\WINS

The default is “Use NetBIOS setting from DHCP server. If static IP address is used or the DHCP server does not provide NetBIOS setting, enable NetBIOS over TCP/IP.”

After enabling NetBIOS over TCP/IP I was able to connect via RDP, map and otherwise communicate with this server properly again.

Enable NetBIOS over TCPIP

You can also change this setting via PowerShell, unfortunately I wasn’t able to find anything in V3 that did this, so you have to use WMI, this blog post goes through the steps on how to do it.

@PCVirus_AU
Titan Solutions

Windows Live Writer – Error Accessing Local Post

Windows Live Writer 2012

I use Windows Live Writer 2012 running on a Windows 8 Pro machine to post my blog posts onto WordPress. In the past I have had no problems with doing this, but when I tried to write up a post yesterday I was stuck with the following error while trying to save a local draft.

Windows Live Writer Error 1

Error Accessing Local Post. Unexpected error occurred while accessing local post (TargetInvocationException). Exception has been thrown by the target of an invocation.

Ok, so I tried to post directly to my blog without saving a draft. This presented me with the following error.

Windows Live Writer Error 2

An unexpected error has occurred while attempting to log in:

The type initializer for ‘WindowsLive.Writer.CoreServices.HttpRequestHelper’ threw an exception.

Well that didn’t work out either, So off to Google I go.

The first hit that I find is from surfing the EtHeR. This post is from November 2007 so I initially has hesitant to look at it as it was so old. Reading through this post I was directed to the MSDN blog Enforcing FIPS Certified Cryptography from 2005.

Navigating through the registry I found HKLM\System\CurrentControlSet\Control\Lsa\FipsAlogorithmPolicy and noted that it was Enabled.

Windows Live Writer Resolution 1

Once I disabled this setting (by changing the REG_DWORD Data value to 0, and restarting Windows Live Writer, I was able to save drafts and publish to my blog once again.

This certainly was a strange once and considering the age of the posts involved I am surprised that it still worked, and that it is still an issue in the first place.

@PCVirus_AU
Titan Solutions

Selecting and Moving Tapes in a Media Set

The nightly backups at work crossed the LTO5 capacity and moved onto a 2nd tape recently, and with the annual disaster recovery test looming over my head, I didn’t want to have to restore 2 tapes to get the critical systems up and running.

What I needed to do was modify the 2 backup jobs that I have running to shuffle what server backs up to what tape. Ok, so what’s the easiest way to do that? Create a 2nd media set, easy right? Of course. Now I need to move the tapes into 1 of the 2 media sets I now have. Ok, ok, that’s pretty easy too. I’m trying to make things sound interesting here!

So if you know anything about me you know I am going to do what I need to do with Backup Exec PowerShell module BEMCLI.

Firstly, I am going to create the new media set (See Modifying media sets in Backup Exec 2012 with PowerShell for my reasoning for setting these overwrite and append times):

New-BEMediaSet -Name "Keep Data for 4 Weeks – Daily Tape 1" -OverwriteProtectionPeriodHours 648 -AppendPeriodHours 12

Next I have to select the tapes that that I want to move to the new media set. The tapes at work are named “MON101″, “TUE101”, etc for the first tapes in the daily backups and “MON102”, “TUE102”, etc for the 2nd tape in the daily backups, so the “01” and “02” are what I want to select. To select all first tapes in the daily I would use this command:

Get-BEMedia -MediaSet "Keep Data for 4 Weeks" | Where-Object {$_.Name -like "*01*"}

Then move the selected tapes into the media set by using the move command.

Move-BEMediaToMediaSet -MediaSet "Keep Data for 4 Weeks – Daily Tape 1"

Unless you use a variable on the Get-BEMedia command, you will need to pipe the 2 commands for it to work like this:

Get-BEMedia -MediaSet "Keep Data for 4 Weeks" | Where-Object {$_.Name -like "*01*"} | Move-BEMediaToMediaSet -MediaSet "Keep Data for 4 Weeks – Daily Tape 1"

Finally, you can rename the original media set.


Rename-BeMediaSet -InputObject "Keep Data for 4 Weeks" -NewName "Keep Data for 4 Weeks – Daily Tape 2"

And there you have it. Comments and questions are always welcome.

@PCVirus_AU
Titan Solutions