Archive for the ‘Windows 2008 NLB’ Category
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.
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_MACHINESYSTEMCurrentControlSetservicesTcpipLinkageBind
Open the Bind
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
Your Done
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
If you are Building a Webfarm you need often Test websites and all the Sites needs to be the same
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 Microsofts PowerShell-modules
#Set ExecutionPolicy
#Set-ExecutionPolicy -scope LocalMachine RemoteSigned –force
#Importing Microsofts 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"