production network card is not the first bound network card

Often when you do a validation health check the first nic is not the first nic and you did check it in the network options. There is a way to change this or to checkit.

You can change it in the advanced settings with the up down arrow.

image

OR

Do this with WMI

Open a admin Command prompt in the search/run  type CMD and instead of hitting the Enter key, use Ctrl+Shift + Enter this opens the Admin CMD.

Now Run :

wmic nicconfig get description, SettingID > C:\nicguidconfig.txt

Lookup the nicguidconfig.txt

It looks like this :

 

Description                                  SettingID                              
WAN Miniport (SSTP)                          {E28D896F-9EA8-433A-9C10-66C97C19A921} 
WAN Miniport (IKEv2)                         {DEA99649-B5BF-4318-B16E-A36317939C93} 
WAN Miniport (L2TP)                          {483C9FF8-503D-414B-B402-E4C1F1F568CB} 
WAN Miniport (PPTP)                          {C0DE3E38-8BA7-479F-8B75-833F294C5AA8} 
WAN Miniport (PPPOE)                         {DB2B4279-B5CF-4626-9DBA-32D0ECE44C87} 
WAN Miniport (IPv6)                          {F3229805-869E-479E-BA76-DD643F1D1B80} 
WAN Miniport (Network Monitor)               {72DD97A9-E544-4915-88D8-44E829C34F68} 
Intel(R) 82566MM Gigabit Network Connection  {39F6A82E-D18C-4642-A721-61BB49CC894B} 
WAN Miniport (IP)                            {7C5653F0-144A-4534-9E34-28AC99CBA85E} 
Broadcom 802.11 Multiband-netwerkadapter     {C4A5D563-B776-40BB-BA44-FF01E000D37B} 
RAS Async Adapter                            {E2F8A220-AF88-446C-9A55-453E58DD3A33} 
Microsoft ISATAP Adapter                     {D70E80B8-8684-4391-AAE8-F7104BBD5749} 
Microsoft ISATAP Adapter                     {5EAB7E38-392E-42DD-AF36-3540D3265724} 
Bluetooth-apparaat (Personal Area Network)   {EBFF2180-B91D-409C-B983-3DD788A7F3BC} 
Microsoft ISATAP Adapter                     {A0E7C614-5C66-4A1F-8C5E-E41F81C0A5C2} 
Microsoft 6to4 Adapter                       {4749EF9C-66DA-499B-BA8D-43AA8D76422A} 

 

Now that we have the Guid we go to the Register and look it up :

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Linkage\Bind

image

Open the Bind

image

 

Cut and paste GUID’s so that production network card (or NIC team) is at the top of the list.

Save key and confirm binding is correct via ipconfig /all

image

 

Your Done

Change IIS 7.5 Website ID

If you are building a Webfarm just make sure Your Website ID is the same on your farm.

To change the ID just run the APPCMD

the Sample below I have 3 websites that I want to change the ID

Just change the Web01 with your website and ID I Change the Web01 form ID 40 to 10

appcmd set site Web01 /id:40
appcmd set site Web02 /id:50
appcmd set site Web03 /id:60
appcmd set site Web01 /id:10
appcmd set site Web02 /id:20
appcmd set site Web03 /id:30

Create IIS NLB Copy Full Website Resource Windows 2008R2 With Powershell

If you are Building a Webfarm you need often Test websites and all the Sites needs to be the same Winking smile

Well below is a powershell Scripts that copy the Site and Creates a new one On the Same Server.

 

# NAME: Copy-Website.ps1
#
# AUTHOR: Robert Smit
# EMAIL: robert.smit@aca-computers.nl
#
# COMMENT: Script to create a Copy-Website.
#   
# You have a royalty-free right to use, modify, reproduce, and
# distribute this script file in any way you find useful, provided that
# you agree that the creator, owner above has no warranty, obligations,
# or liability for such use.
#
# VERSION HISTORY:
# 1.0 4.06.2011 – Initial release
#
###########################################################################
ImportSystemModules
#Importing Microsoft`s PowerShell-modules

#Set ExecutionPolicy
#Set-ExecutionPolicy -scope LocalMachine RemoteSigned –force

#Importing Microsoft`s PowerShell-module for administering IIS
Import-Module WebAdministration

#List website
Write-Host "List IIS Website…" -ForegroundColor yellow
get-Item IIS:\Sites\*

#Variables for creating the new Website
#
#
$sourceweb = Read-Host "Enter the Website to Copy"
$destinationweb = Read-Host "Enter the New Websitename"
$ChangedDemoSiteBinding = Read-Host "Enter the Hostheader of the website"
$LogDir = Read-Host "Enter the website path of the new website"

#Copy website
Write-Host "copy IIS Website…" -ForegroundColor yellow
copy-Item IIS:\Sites\$sourceweb -destination IIS:\Sites\$destinationweb

#Create Application pool
Write-Host "Create Application pool…" -ForegroundColor yellow
New-WebAppPool $destinationweb

#Link Application pool
Write-Host "Link Application pool…" -ForegroundColor yellow
get-ItemProperty IIS:\Sites\$destinationweb
Set-ItemProperty IIS:\Sites\$destinationweb -name applicationPool -value "$destinationweb"

#Set nieuwe Host name
Write-Host "Set nieuwe Host name…" -ForegroundColor yellow
get-Item IIS:\Sites\$destinationweb
Set-ItemProperty IIS:\Sites\$destinationweb -Name bindings -Value @{protocol="http";bindingInformation="192.168.123.1:80:$ChangedDemoSiteBinding"} #change the IP here

#Set new Path
Write-Host "Set new Path…" -ForegroundColor yellow
get-Item IIS:\Sites\$destinationweb
Set-ItemProperty IIS:\Sites\$destinationweb -Name physicalPath -Value "$LogDir"

#Scopy site
#Write-Host "Scopy site …" -ForegroundColor yellow
#Copy-Item "C:\Put your folder here\*" $LogDir # change The Filepath here

#Set user account
Write-Host "Set user account…" -ForegroundColor yellow
Set-ItemProperty IIS:\Sites\$destinationweb -Name Username -Value "Username"
Set-ItemProperty IIS:\Sites\$destinationweb -Name Password -Value "Password"

How To Windows 2008 NLB Part 1

 

Using NLB is very handy on several configurations ( but remember there is a lot of broadcast trafic ) so the nlb network should be in a different subnet than your own production network.

First add the feature in windows 2008 , start up the NLB mmc on the server.

clip_image002 clip_image004 clip_image006

In my care I have 3 nic , one production , two DHCP.

I did new cluster and the wizzard starts. I did pick the second nic.

 

clip_image008 clip_image010 clip_image012

The warning is I NEED a fixed IP !!  so i put in a fix IP and added the cluster IP address

 

clip_image016 clip_image018 clip_image020

Most of the times You don’t need every port on the nic , for webservers it is only one or two ports. I my case I used the opsmgr webconsole basic port 51908.

clip_image022 clip_image024 

Now One host is ready to go.

I went to my IIS 7 MMC

clip_image028 clip_image030 clip_image032

For changing the IP you do on the website edit bindings get the default. And Edit the settings.

 

clip_image034 clip_image036 clip_image038

As you can see the NLB cluster IP is there I did not config a second IP for the NLB . So I put in the NLB IP and now the website is listening on the NLB IP. AND NOT on the default IP from the server.

 

So
If you want to add a second IP to the NLB go back to the NLB config an do edit on the cluster properties

clip_image042 as you can see the IIS config shows the second IP clip_image044

This could be handy for large webfarms that uses hostheaders.

For Setting up the Second , thirth node just add the machine in the cluster Add host and settings are deployed to the other server.

Fixed IP is needed !!

Technorati Tags: ,,,