Thursday, August 29, 2013

IP address already assigned to another adapter

This issue occurs if a network adapter with the same IP address is in the Windows registry but is hidden in the Device Manager (My Computer > Properties > Hardware > Device Manager). This hidden adapter is called a ghosted network adapter.

  • You may see this if you recently performed a P2V and the resulting virtual machine still has the physical NICs and drivers for those NICs present. These ghost NICs have the old IP address and the virtual NIC cannot be assigned the same IP address.

Using the Show hidden devices option in the Device Manager (View > Show hidden devices) does not always show the old virtual NIC (ghosted adapter) to which that IP Address is assigned.
To resolve this issue, make the ghosted network adapter visible in the Device Manager and uninstall the ghosted network adapter from the registry:
  1. Click Start > Run.
  2. Type cmd and press Enter.
  3. At the command prompt, run this command:
    Note: In Windows 2008 and Windows 7, open the command prompt using the Run as Administrator option.

    set devmgr_show_nonpresent_devices=1
    Note: If this command does not work (a possibility in Windows Server 2000 and 2003), you may need to add the parameter to Windows and set its value:

    1. Right-click the My Computer desktop icon and choose Properties.
    2. Click the Advanced tab and select Environment Variables.
    3. In the System variables section, click New.
    4. Set the Variable name to devmgr_show_nonpresent_devices and set the Variable value to 1 to enable the parameter.
    5. Click OK to add the variable to Windows.
  4. Start the Device Manager by running this command from the same command prompt:

    start devmgmt.msc
  5. Click View > Show Hidden Devices.
  6. Expand the Network Adapters tree (click the plus sign next to the Network adapters entry).
  7. Right-click the dimmed network adapter, then click Uninstall.
  8. Once all of the grayed out NICs are uninstalled, assign the IP address to the virtual NIC.

    Note: To assign the IP address to the virtual NIC on the command line, run the command:

    netsh interface ip set address "Local Area Connection #" static IP_Address Subnet_Mask Default_Gateway

    For example:

    netsh interface ip set address "Local Area Connection 2" static

  9. Close the Device Manager
Source of this article: VMware KB1179 

Wednesday, August 28, 2013

How to manually push update if Global Address Book Exchange 2010 Taking time to update new user

  1. Get-GlobalAddressList | Update-GlobalAddressList
  2. Get-OfflineAddressBook | Update-OfflineAddressBook
  3. Get-ClientAccessServer | Update-FileDistributionService
  4. Download Full OAB in outlook
  5. On the Tools menu, point to Send/Receive, and then click Download Address Book.
  6. In the Offline Address Book dialog box, make sure that the Download changes since last Send/Receive check box is checked.
  7. Click OK.

Tuesday, August 13, 2013

Query interface information on remote machines

I found a nice script for this task that can be found by following link:
Scrip Source

The powershell command to run in order to query list of computers from text file list would be as follows:
$computers = Get-Content -Path c:\scripts\servers.txt
.\getipinfo.ps1 -ComputerName $computers | ft -AutoSize

This is the actual script:
param (
    [string[]]$ComputerName = $env:computername

begin {}
process {
foreach ($Computer in $ComputerName) {
  if(Test-Connection -ComputerName $Computer -Count 1 -ea 0) {
   $Networks = Get-WmiObject Win32_NetworkAdapterConfiguration -ComputerName $Computer | ? {$_.IPEnabled}
   foreach ($Network in $Networks) {
    $IPAddress  = $Network.IpAddress[0]
    $SubnetMask  = $Network.IPSubnet[0]
    $DefaultGateway = $Network.DefaultIPGateway
    $DNSServers  = $Network.DNSServerSearchOrder
    $IsDHCPEnabled = $false
    If($network.DHCPEnabled) {
     $IsDHCPEnabled = $true
    $MACAddress  = $Network.MACAddress
    $OutputObj  = New-Object -Type PSObject
    $OutputObj | Add-Member -MemberType NoteProperty -Name ComputerName -Value $Computer.ToUpper()
    $OutputObj | Add-Member -MemberType NoteProperty -Name IPAddress -Value $IPAddress
    $OutputObj | Add-Member -MemberType NoteProperty -Name SubnetMask -Value $SubnetMask
    $OutputObj | Add-Member -MemberType NoteProperty -Name Gateway -Value $DefaultGateway
    $OutputObj | Add-Member -MemberType NoteProperty -Name IsDHCPEnabled -Value $IsDHCPEnabled
    $OutputObj | Add-Member -MemberType NoteProperty -Name DNSServers -Value $DNSServers
    $OutputObj | Add-Member -MemberType NoteProperty -Name MACAddress -Value $MACAddress

end {}

Controll Exchange 2010 mail delivery using cost and hub site

Set-ADSiteLink, this command would be very useful in cases where one wants to favor one site  for queuing  over another. The lower the cost more likely site will be used. Keep in mind that direct delivery is always attempted first and only if it fails site cost is used to queue messages in a different hub server in different site.

Set-ADSiteLink -Identity fromtositelink -ExchangeCost 5

Set-AdSite is a command that is used to enable particular hub in site to force all email to pass through it.

Set-AdSite -Identity 'sitename' -HubSiteEnabled $true

Set-AdSite -Identity 'sitename' -HubSiteEnabled $false

Modifying exchange 2010 receive connector using EMS

To modify existing receive connector by adding banner message and increasing size of messages allowed Set-ReceiveConnector command is used

Set-ReceiveConnector -Name 'Name of existing receive connector' -Banner '220 Custom application connector' -MaxMessageSize '20MB'

Creating exchange 2010 receive connector using EMS

Following command creates a connector to accept messages only from internal application server with IP

New-ReceiveConnector -Name 'New Receive Connector Name' -Usage Custom - bindings -RemoteIPRanges '' -Server 'Server Name' -AuthMechanism 'None'

Modifying exchange 2010 send connector using EMS

This command would enable protocol logging and increase message size to 20MB.

Set-SendConnector -Name 'Name of the connector' -ProtocolLoggingLevel 'Verbose' -MaxMessageSize '20MB'