TechOnTip Weblog

Run book for Technocrats

Archive for March, 2010

Powershell: Transfer Output to Txt, CSV, HTML & Variable

Posted by Brajesh Panda on March 30, 2010

Let me summarize all methods on “How to transfer PowerShell Output to HTML for Reporting?

PowerShell Provides Output in multiple formats like Table, List etc. And we can capture these outputs to Txt, CSV, HTML and Variable using below process

# Transfer Output to Text file

è Get-exchangeserver > c:\test1.txt

è Get-exchangeserver | Out-File c:\test2.txt

You’ll notice that the last Colum could not be fully displayed & it is shortened with …. Signs. We have to increase the width of the display screen

è Get-Process | Out-File c:\scripts\test.txt -width 120

# Transfer Output to CSV file

è Get-exchangeserver | Export-Csv c:\test1.csv -NoTypeInformation -force

-NoTypeInformation removes headers

# Transfer Output to HTML file

è Get-exchangeserver | ConvertTo-Html | Set-Content c:\exchange.html

Note: However this command will capture all outputs into the HTML file; I know you will not like that. We can define filter to transfer specific columns to our HTML File

è Get-exchangeserver | ConvertTo-Html name, ExchangeVersion | Set-Content c:\exchange1.html

In this case the HTML file Title will be look like HTML TABLE. Let’s change the HTML file title using below commands;

è Get-exchangeserver | ConvertTo-Html name, ExchangeVersion –title “Exchange Server List” | Set-Content c:\exchange1.html

è Get-exchangeserver | Select-Object name, ExchangeVersion | ConvertTo-Html | Set-Content c:\exchange1.html

# Transfer Output to Variable

è $Variablename = <PowerShellCMDLet>

è PowerShellCMDLet | tee-object -variable <variablename>

Let’s do some beautification to our HTML page by adding our company logo, name etc. It includes create a HTML Style Sheet & Transfer your output to the Style Sheet.

~~~~~~~~Note: Styles to be placed in the header of the HTML file

$a = “<style>”

$a = $a + “BODY{font-family: Verdana, Arial, Helvetica, sans-serif;font-size:10;font-color: #000000}”

$a = $a + “TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}”

$a = $a + “TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color: #E8E8E8}”

$a = $a + “TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black}”

$a = $a + “</style>”

#Body text, pretty much just the report title:

$b = “<img src=’‘ height=’80’ width=’100′><H2>List of All Exchange Servers</H2>”

Get-exchangeserver | Select-Object name, ExchangeVersion | ConvertTo-Html -head $a -body $b | Set-Content c:\exchange3.html



Posted in Uncategorized | Tagged: , , | 7 Comments »

Rapid Transition Guide from Exchange 2003 to 2010

Posted by Brajesh Panda on March 19, 2010

Nice document posted by Milind;

Cheers Milind!

Posted in Exchange2010 | Leave a Comment »

Microsoft VDI Future Model

Posted by Brajesh Panda on March 17, 2010

Here is a nice article published by Bridget Botelho!,289142,sid194_gci1417203,00.html

Posted in Microsoft VDI, Virtual Desktop Solution | Tagged: | Leave a Comment »

Tech-ED Africa 2009

Posted by Brajesh Panda on March 16, 2010

Go & grab your copy of presentation from here 😉 of course on Ms Technologies

Posted in Mix & Match | Tagged: | Leave a Comment »

Fine tune Windows 2008 (R2) Networking Config

Posted by Brajesh Panda on March 11, 2010

In a vanilla installation of Windows 2008 (R2) you will able to see lots of configuration like ISATAP adapters, Topology Discovery stuff… Personally I don’t like them ;-). Specially if your organisation is not going to migrate the internal network to IPv6. Microsoft ISATAP  stands for inter site automatic tunneling address protocol. And ISATAP adapter helps to encapsulate IPv6 packets inside IPv4 header. This helps in IPv4 to v6 transition easily. Either you can use below command line to disable ISATAP or you may like to disable IPv6 completely using registry key, which will disable all related stuff in your machine.

Here are some steps to clean them up…

Disable Tunnel adapter isatap virtual adapters

Use “netsh int isa set state disabled” command to disable ISATAP adapters

After you run this command check with ipconfig command

Disable Link-Layer Topology*

Link-layer topology discovery Mapper I\O Driver

Link-layer topology discovery Responder


– Link-layer topology discovery Mapper I\O Driver: Show network map showing all devices which are using this protocol. To me it is like Cisco Discovery Protocol

– Link-layer topology discovery Responder:- While above driver shows all devices, responder pulls out device informations in detail

Disable All IpV6 components using Registry (

Under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters] create new Hexadecimal DWORD key as “DisabledComponents”=dword:ffffffff

Posted in WindowsServer | Tagged: , , , | 8 Comments »

Microsoft Forefront Identity Manager 2010 RTM – released

Posted by Brajesh Panda on March 11, 2010

Microsoft Forefront Identity Manager 2010 RTM has been released, successor to Identity Lifecycle Manager 2007

In past personally I have used MIIS 2003… & know the pain for the administrator when MS asked to write provisioning DLLs.

But now with FIM we can do a lots of automation out of the box … I am eager to test it in my lab!

Posted in Mix & Match | Tagged: | 1 Comment »

Migration Path for Exchange 2010

Posted by Brajesh Panda on March 10, 2010

When you are planning to migrate from Exchange 2000/2003/2007 to Exchange 2010, make sure you are considering below parameters;

– Exchange Upgradation Path

– Supported operating systems

– Active Directory Domain & Forest level

A. Exchange Upgradation Path

-No co-existence with exchange 2000. Hence migrate all 2000 mailboxes to either Exchange 2003/7

-Exchange 2003/7 must be patched till latest version of service pack i.e. Service Pack 2

-Exchange 2007 & onwards (Exchange 2010) need completely x64bit hardware

-Due to x64bit architecture now your exchange server can be

Provisioned with much more memory (2 to power 64). It will help to

reduce disk IOPS, Swapping resulting maximum number of mailboxes

in a single mailbox server

Read the rest of this entry »

Posted in exchange 2010, Exchange2010 | Tagged: , | 11 Comments »

Exchange 2010 Stretch Cluster – 1

Posted by Brajesh Panda on March 10, 2010

Here is my 1st
Architecture Diagram for Exchange 2010 Stretched Cluster. Expect my step by step guide to build this environment. I will keep improving my architecture… you guys too buzz me if there is a place for improvement ;-).

For this scenario I am considering single stretched DAG & active mailboxes only in Primary site. If we keep active mailboxes in both sites with single stretched DAG, in case of WAN failure, mailboxes in secondary site will go down. If we want to put active mailboxes in other sites too, take a look at my next article.

As this architecture contains 3 nodes (Odd number), we don’t need a File Share Witness Share folder for Quorum. We can just use Node Set Majority quorum.  In this architecture I am stretching the DAG between both sites, so in case one node goes down (let suppose from primary site) there are still 2 nodes online, which helps to maintain the Cluster Quorum.  Let suppose two nodes goes down, now you have just one node online. Hence DAG cluster will  go down. But you can manually run switch over process & activate the secondary site DAG member using Alternate File Share witness.  So in this case you are changing your quorum model to FSW, but you may like came back after other two nodes came back online. One thing to note, even if we are using Node Set Majority we can mention file share witness & alternate witness – only cluster will not be using them actively.  In above scenario now we have a active server with an alternate file share witness in secondary site. What happen when Primary site servers come back online before WAN link? There are two nodes in primary site, which can provide quorum & try to mount databases. Resulting Split Brain. To avoid this there is another mechanism called Data Center Activation. If this configuration is on, before they mount the databases, they will check the status of DAG from every node using Data Center Activation Protocol & then decision will be taken if Active Manager should mount the database.

Other key thing is client access name space designing. If both sites are hosted in two different AD sites, we will be having Two different CAS Array (RPCClientServerAccess) FQDN. And if in case both CAS servers or load balancer failed in Primary site, we have to manually change the DNS IP Address of Primary Site CAS Array to secondary site CAS Array IP.

Well I just love Geo/Stretched Cluster….

Posted in Exchange2010 | Tagged: , | 3 Comments »

Envision Right Scope – Enterprise IT Consolidation

Posted by Brajesh Panda on March 9, 2010

In some of my recent engagments I was meeting customers & understanding their requriement & roadmap for Enterprise IT Consolidation; But realised most of us are doing cosolidaiton but in a fragmented way. In course of my brainstroms found all enterprises should take the right path to get benifited out of this kind of exercise optimally.

If we don’t follow an enterprise road map may be at the end of the day IT team will be consolidating servers to virtual machines but application team will be continuing adding large number of small application servers creating virtual sprawl resulting more use of physical servers & storage space. In current industry SQL & other database sprawl is one of the brightest example.

So I believe before kicking off the Enterprise IT Consolidation project, we should envision our scope rightly!

Posted in Enterprise IT Consolidation | Tagged: , | 1 Comment »

Dell Infrastructure Sizing Tools

Posted by Brajesh Panda on March 9, 2010

If you are interested in DELL Solutions these are some of the infrastructure sizing tools available for customers.

I will try my best to keep this sheet updated with new Dell Sizing Tools.. Let me know if there is any interesting tools available from Dell!

Dell Server Advisor

· Dell Storage Advisor

· Dell Energy Smart Solution Advisor

· Dell Datacenter Capacity Planning Advisor

· Dell Systems Management Advisor

· Dell Exchange Advisor Tool

· MS SQL 2005 Upgrade Advisor

· PowerMatch SQLTM Server 2000

· MS Windows® 2000 AD Sizer

· PeopleSoft® /JDEdwards Sizing

· SAP Sizing Tool

Posted in Dell OEM, server sizing | Tagged: , | 2 Comments »

Best Practices for Exchange 2007 CCR Stretched Cluster

Posted by Brajesh Panda on March 8, 2010

In course of my SI Projects I found these are should be the best practices for a Exchange CCR Stretched Cluster. Let me know if anything I should include in my list.

Decision Making Factors

  • Is automated failover is required in unplanned site outage?
  • How frequently you are facing situation like complete site disaster?
  • Where is the major user base located? Is at Prod Site or DR Site?
  • Do we have enough bandwidth between these two sites?


AD Sites

  • Both CCR Hosts must be in same AD Site

    N.B:    Typically, Active Directory communication is controlled based on the AD Site design. Since both datacenters are using the same AD site, there is a risk that servers and clients in 1 datacenter may be communicating to domain controllers in the secondary datacenter. Cross authentication may leads slow response in Directory Server Access!

    –    Plan two domain controllers in each site


  • Encase of Windows 2003 Server we have stretch the subnets across datacenters
  • Windows 2008 Stretch cluster can span across different subnets; however we have to consider below points;
    • Latency must not be more than 50ms
    • Two different subnets should be available for Cluster Private & Public Communication
    • Read the rest of this entry »

Posted in Clustering, Exchange2007, MsClustering, MsFailOverClustering | Tagged: , , , | 1 Comment »

Before you start installing SQL 2005 Cluster

Posted by Brajesh Panda on March 8, 2010

Here is some best practices you should aware of before you start installing Windows Cluster. I will be keep updating this list….. Let me know if I am missing something most important.

Applicable Product: Windows Cluster & SQL 2005

  • Make sure you have installed Advanced/Enterprise/Data Center Edition of Windows OS on all servers
  • Deployment User account is added to local admin groups
  • Deployment User account must have all Active Directory permissions to create Computer accounts for Virtual SQL Node
  • If you’re IT policy is preventing you to get computer account creation rights for deployment user account please go through KB articles how cluster computer accounts can be staged before you start installation
  • Verify Task Scheduler is running on all cluster nodes (For SQL Clustering)
  • Verify Windows Cryptographic Service is running on all cluster nodes (For SQL Clustering)
  • Verify NTLM Security Provider Service is running on all cluster nodes (For SQL Clustering)
  • Verify Remote Registry Service is running without any error on all cluster nodes (For SQL Clustering)
  • Verify you can access media location from other nodes by using UNC path (For SQL Clustering)
  • Apart from SQL Clustering you have to install software individually on all other nodes. Hence make sure all media you are using are of same version & cluster aware.
  1. SQL Clustering use Task Scheduler to install the SQL software on all nodes at the same time.
  2. Apart from SQL Standard Edition, you need Enterprise Edition software for Clustering. SQL Standard edition support only 2 Node clusters
  • Make sure you have the right software media
  • Better to keep handy SMSTrace tool to verify Installation logs encase of any problem
  • File Systems must be formatted as NTFS. Read the rest of this entry »

Posted in Clustering, MsClustering, MsFailOverClustering | Tagged: , | Leave a Comment »

Decision Making Process between TS & VDI

Posted by Brajesh Panda on March 8, 2010

On Need

  • What User needs to work?
    • Application
      • Then Session Solution is best i.e. Windows RDS/TS , Citrix XenApp
    • Desktop
      • Then individual Physical Desktop/Blade PC/VDI Solution is best


  • What IT Strategy is expecting?
    • Easy Administration & Base required Control with bare minimum features
      • Windows Remote Desktop Services
    • Advance Administration & More Control with competitive features
      • 3rd Party solutions
  • Solution Pros & Cons
    • Dedicated Desktop
    • Isolated Security
    • Isolated Processes
    • Application Conflict

On Financial

  • Another major decision making factor is whether we are looking for purely VDI, TS or Hybrid environment by mixing both of them to gain mileage on existing investment
  • Any infrastructure need two types of investment for new infrastructure
    • Hardware Equipment
      • VDI need much more fat & heavy hardware equipments as comparison to TS environments
      • Exact size can be determined in sizing phase
      • Other Infrastructure investment like Power, Cooling & Management is generally less in TS environment as comparison to VDI environment
    • Software Licensing
      • Software Licensing is one of most confusing & critical investment factor in this kind of scenario. TS & VDI has their unique licensing proposition which is discussed under below.



Terminal Licensing Walkthrough

Microsoft Terminal/Remote Desktop Services

Citrix Metaframe/Presentation/XenApp

Windows Terminal Servers OS Licenses

Citrix Server Windows OS License

Windows TS/RDS CAL

Citrix Infrastructure Component Licenses


Windows TS CAL


Citrix Concurrent Licenses

  1. 100 User Environment for Microsoft Terminal Services
    1. Individual TS/RDS CAL:        100 x $120 =$12000
    2. Plus other infrastructure server license costs.
  2. 100 User Environment for 3rd Party Terminal Services like Citrix
    1. Individual TS/RDS CAL:        100 x $120 = $12,000
    2. Citrix Concurrent Licenses:     100 x $400 = $40,000
    3. Plus other infrastructure server license costs.

    Advantage:    In Terminal Services environment TS CAL or RDS CALs are one time purchase along with OS Licenses. No renewals required. Citrix provides Software Assurance renewal agreements for support but it is optional. Citrix concurrent license cost depends on features & editions we are purchasing. Over here we have considered base standard edition.

Virtual Desktop Licensing Walkthrough

Microsoft Remote Desktop Services (For VDI)

3rd Party VDI Infrastructure

Windows RDS Infrastructure Windows Server OS Licenses

VDI Infrastructure Windows Server OS Licenses

Virtualization Infrastructure Licenses

Virtualization Infrastructure Licenses

Windows RDS CAL

VDI Client Licenses

If Client OS is Covered under MS Software Assurance Agreement – Need Windows VECD for SA Licenses

for all client devices

If Client OS is Thin Client – Need Windows VECD
License for all client devices


  • VDI environment can be accessed from a Full Fledged PC, Laptop or from Thin Client & to access VDI environment we need VECD Licenses
  • All Client PCs or Laptops (from where we are accessing VDI environment) running with Windows OS must be covered under Software Agreement with MS. After these devices get covered under SA, we need Windows VECD for SA License to access VDI environment.
  • All Thin Clients must have Windows VECD Licenses to access VDI environment
  • Windows VECD for SA cost $23/year & Windows VECD cost $110/year
  • In a enterprise environment VECD can be purchased for part of desktops/thin clients but only these desktops will be used to access VDI environment
  • From each VECD licensed devices you can access 4 Virtual Machines from your VDI Farm
  • You can run unlimited VMs inside the Virtual environment
  • VECD provide Home Use rights (Access VMs from home). In case of shared VECD Devices only primay named user will able to access.

    VDI Scenario

  • Current Number of PCs: 200
    • VDI Client PCs (From where users will access VDI) = 150
      • PCs covered under SA: 50
      • PCs not covered under SA: 100
  • Current Number of Thin Clients: 250
    • VDI Client Thin Clients (From where users will access VDI) = 200
  • Number of VDI Users: 500
  • Max Concurrent users: 350

    Yearly License Requirement for MS VDI

  • Windows VECD for SA = 50 x $23/year
  • SA Upgradation for PCs = 100 x SA Price/year
  • Windows VECD for SA for SA upgraded PCs = 100 x $ 23/year
  • Windows VECD for thin clients = 200 x $110/year
  • Perpetual Windows RDS License= 500 x $120
  • Plus Infrastructure Server OS Licenses

    N.B:    RDS Licenses can be purchased under standalone perpetual purchase or under volume license key with VDI suite offering. RDS CALs are Named User or Device based licenses.

    Yearly License Requirement for VMware, Citrix VDI

  • Windows VECD for SA = 50 x $23/year
  • SA Upgradation for PCs = 100 x SA Price/year
  • Windows VECD for SA for SA upgraded PCs = 100 x $ 23/year
  • Windows VECD for thin clients = 200 x $110/year
  • Concurrent VMware View/XenDesktop Client Packs for concurrent Users
  • Plus Infrastructure Server OS Licenses
  • Plus VDI Infrastructure Standalone Software licenses

TS & VDI Hybrid Solutions

  • Windows RDS CAL provides access to VDI (Remote Virtualization Host) & Terminal Servers (Remote App Servers) through Remote Connection Manager & Session Host Severs.
  • XenDesktop Enterprise provides access to XenApp for Virtual Desktops inside VDI infrastructure

If current infrastructure is using both Windows Terminal & Citrix Presentation Server, as low capital investment Windows RDS service can be kicked off, where both Windows Terminal Service & VDI Facility can be utilized under a single CAL! As Citrix XenDesktop Supports MS Virtualization Farm In future as per requirement XenDesktop Infra can be introduced to the environment for rich features & better control.

Posted in Citrix XenDesktop, Microsoft VDI, Virtual Desktop Solution | Tagged: , , , | 1 Comment »

%d bloggers like this: