Welcome to MSDN Blogs Sign in | Join | Help

Reading IIS.NET Blogs (or any RSS) with Powershell

Being a member of the IIS team, I often find myself checking blog posts to see what the members of the product team are blogging about.  However, since Powershell came out, I find myself doing more and more work on my scripts. It's a bit annoying to have to jump out of Powershell to go read blog posts.  As such, I've written a few quick scripts to help me read IIS.NET from my pretty blue shell. For those of you who are already familiar with powershell and don't want to read the long blog post, you can download my blog script from the DownloadCENTER: http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1387

 (continued)

Posted by Tobin Titus | 0 Comments

IIS 7 Logging UI For Vista - Download Now

As many of you already know, the management console for IIS 7.0 on Windows Vista does not have a UI for logging.  Since this was a pain point for several customers, I decided to test out the extensibility APIs by creating a logging UI module. 

( continued )

Extending Microsoft.Web.Administration through PowerShell (Part II)

In my previous post, I showed you how easy it was to leverage your knowledge of the IIS 7 managed SDK in Windows PowerShell.  We loaded the IIS 7 managed assemblies and then traversed the object model to display site information and stop application pools.  While this in itself was pretty cool, I don't think I quite got my point across about how powerful IIS 7 and PowerShell are together. As such, I wanted to show you some more fun things to do with PowerShell in the name of easy IIS 7 administration.

First, our examples still required a great deal of typing and piping and filtering.  Let's modify our profile script from my previous post by adding at least one new global variable that will give us access to the ServerManager without much typing.  Add the following line to your profile script from my previous post.

new-variable iismgr -value (New-Object Microsoft.Web.Administration.ServerManager) -scope "global"

(if you don't have a profile script yet, go back to my previous post to learn how to create one). 

Note: If you signed your script before, you'll have to do it again after modifying the script

Open a new instance of PowerShell and now you can access the site collection just by typing:

PS C:\> $iismgr.Sites

 That's considerably smaller than our previous examples.  But let's not stop there.  What happens if I want to search the site collection? PowerShell has some fun syntax for this as well. I simply pipe the output of my SiteCollection to a "Where-Object" cmdlet and then specify what site I'm looking for:

$iismgr.Sites | Where-Object {$_.Name -match "Default*"}

( blog post continued on IIS.NET ... )

Posted by Tobin Titus | 0 Comments
Filed under: , , ,

Accessing Microsoft.Web.Administration through PowerShell (Part I)

I've caught the PowerShell bug. In between stints with my ever-expanding code samples, I play with PowerShell a lot.  I thought I'd share a quick example of how to load Microsoft.Web.Administration.dll and use it to perform some basic tasks.

Note: I'm running these samples on Windows Vista RTM, but I have no reason to believe this will not work on the PowerShell release candidates for the Vista RC* builds that are available now

So let's get started.

First, PowerShell has no idea where Microsoft.Web.Administration.DLL is so you have to tell it how to load it. Anyone who has written code to dynamically load an assembly should be familiar with this syntax.  Type the following command

PS C:\> [System.Reflection.Assembly]::LoadFrom( "C:\windows\system32\inetsrv\Microsoft.Web.Administration.dll" )

The path to your assembly may change depending on your install.  I'll show you later how to use environment variables to calculate the correct path.  In the mean time the out put of the line above display something like the following:

GAC  Version    Location
---  -------    --------
True v2.0.50727 C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Administration\7.0.0.0__31bf3856ad364e35\Microsoft....

Once the assembly is loaded you can use PowerShell's "New-Object" command to create a ServerManager object that is defined in Microsoft.Web.Administration.

PS C:\> (New-Object Microsoft.Web.Administration.ServerManager)

( blog post continued on IIS.NET ... )

Posted by Tobin Titus | 0 Comments
Filed under: , , ,

Where can I find <feature x> in IIS 7.0 ?

Question: Where can I find Windows Authentication in IIS 7.0

I've seen this question or questions like this asked numerous times so I thought it would make a nice quick -- and hopefully useful -- blog post.

In previous versions of IIS, administrators were able to enable or disable features on their servers by simply checking or unchecking a box in the IIS management console.  However, when an administrator unchecked a feature in IIS, the feature still existed on the machine and was even loaded.  Unchecking a box allowed the administrator to disable a feature -- but it didn't physically remove anything from the machine.

(continue)

Posted by Tobin Titus | 0 Comments
Filed under:

Steve Wozniak ... at Microsoft?

I know it may sound very strange coming from a Microsoft employee, but last Friday I found myself in awe while I sat directly in front of Steve Wozniak while he gave a presentation ... on Microsoft campus. 

(continue)

Posted by Tobin Titus | 0 Comments
Filed under:

Unsafe thread safety

As I stated in my last post, for the past two days I've been sitting in Jeffrey Richter's threading class. The class is near the end and I can't say that a lot of new concepts have been taught. Another student and I have decided that the class should have been renamed, "Threading Basics". That's not to say anything of Richter's teaching skill or the content of the class.  It just goes to show that if the architecture of a product is right, the threading code should be extremely simple to use.

However, what I love about this class is that it reminds me how much I enjoy this topic.  The theory of the perfect architecture doesn't exist. Additionally, many times the developer has little-to-no ability to push back on a bad architecture. It's in these cases that you must use your bag of concurrency tricks to work out of the whole the architect(s) put you in.  That sound easy enough, but what if the architecture included - *gasp* - "less-than-optimal" decisions in the actual .NET framework classes?  What if those decisions were made in the very methods that are supposed to help you with these synchronization problems?  These problems perplexed me when I first encountered them and I never really thought to blog about them (I was actually just scared I was doing something wrong).  Taking this class gave me the perfect excuse to bring the topic up.

(continue)

Posted by Tobin Titus | 0 Comments
Filed under: ,

Back in business...

I haven't blogged for some time now.  This in large part has been due to heavy workload, close deadlines, and the fact that I was alone in my workload.  Over the past few weeks, I've been able to get my head above water.  While our open position on the team is still "open", we've filled our contractor position. Not only have we "filled" it, we've actually brought in one of our old contractors who is more than capable.  He is definitely helping to alieviate my workload already.  I've finished my Vista RTM handoffs and that has taken off some more pressure.  I've also completed my first review at Microsoft and, while I definitely see much room for improvement in the process, I was pretty pleased with the outcome.

All three of these events have helped me free up time to start blogging again.  In fact, this new found freedom has given me some time to start taking some classes at Microsoft. As we speak, I'm typing this blog post up during a break of a class on managed code threading.  Those of you that know me may be saying, "Didn't you write books on threading? Why would you sit in a class on that very topic?"  Well, I'm attending for two reasons. The first of these reasons is that the class is being taught by Jeffrey Richter.  No matter how much you think you know about anything, I guarantee you that Jeffrey Richter can make you feel like a "n00b". OK, there may be a small percentage of you out there that know more about obscure printer driver hacks, but even there, I'd defer to Mr Richter.  If you ever get a chance to sit in on one of Wintellect's classes, I recommend you take advantage of that opportunity.  If you can't afford it, I'd recommend you read the many books published by Wintellect employees.  The second reason I'm sitting in this class is because I think threading is increasingly important. When I co-authored my first book on this topic, I believed that the multi-core and multi-processor industry would be growing by leaps and bounds making threading knowledge extremely valuable.  This is proving true as Intel has just announced that they will have 80 core processors by 2011.  If you don't know how to use multi-threading techniques PROPERLY, I highly suggest you start learning.  Despite my involvement in three books on the topic of threading, Richter's class, in my opinion, is one of the best means to get solid, current multi-threading advice today.

I hope you'll forgive the silence on my blog from the past few months.  I also hope you'll come back often and trust me to provide you with some relevant articles on a more regular basis.

Posted by Tobin Titus | 1 Comments
Filed under:

Why am I smiling?

I moved to Redmond just over four months ago.  In the time I have been here, my rental car was side-swiped, my truck was broken into, my headlight and bumper were damaged by someone in our own parking garage, someone stole my copy of "Professional Visual C++/CLI" from my office today (clearly someone missed the "corporate values" talk at New Employee Orientation), and my relocation to the great Pacific Northwest has been less than smooth or swift -- waiting for the insurance company to assess and pay my claim for the furniture damaged by the movers.   I'm the only PW in my group and we've been unable to find anyone else that can fill the shoes for our open position. I have deadlines looming with tons of work to do and not enough time to do it all by myself.  Bill Gates has announced he is reducing his role here, both Windows and Office have announced schedule changes and Microsoft's stock has dropped over four dollars since I arrived on campus.

So why am I smiling?

In four month's time I've learned so much.  I've been able to look at the technologies we will implement in the future before most people even know they are in the pipeline. I sit in on meetings and get to give real feedback that can influence products used by more people than I could have ever imagined.  I have taken over ownership of an internal tool our team uses and have written a few of my own.  I've gathered customer feedback and helped several customers personally or got them in touch with others who could help them. The amount of responsibility piled on me is less of a burdon and more of a compliment, in my opinion.  Who puts that amount of pressure on someone if they feel they can't handle it?

Apart from all the benefits provided by Microsoft there are other reasons I'm happy to be working here. I'm in a technological heaven.  The people are brilliant and open-minded (except when it comes to "Red State" ideas, but give me time -- I'm still working on it).  I pass those same brilliant people in the halls every day.  If I have a question about something, I can go hit our Global Address Book and track down the person who owns the feature to discuss the matter with them personally. 

I also get to see the company make huge changes in the way it delivers software.  With the industry changing so quickly, its awesome to see a company of this size roll with the punches and adapt. 

It's hard to explain why I'm so happy to work here. The only thing I can say is that you can tell that the majority of people working here love working here and finding new ways to make customers happy.  That reason alone is enough to make me love working at Microsoft.

Enjoy the weekend!

Posted by Tobin Titus | 3 Comments

Looking left and turning right: management style

Today, I was returning from my manager's office to my own when I nearly collided with another manager-type in the hall.  As I was approaching a hallway intersection, a manager emerged in a bit of a hurry looking to the left while she was turning to the right.  She prolonged her view to the left for so long that her path was diverging directly into mine.  In motorcycle safety course several years ago we were taught while taking a corner that we should look in the direction of the curve. Looking to the opposing direction could often cause us to veer off course toward the direction of our gaze. Referring back to my manager-turned-missile, of course, I scrambled to get out of her way before she hit me. This was rather awkward to do and by the time the manager looked back at me shuffling around, she look at me like I was the stupid one and didn't as much as say "oops, sorry".

Nothing in this world enrages me more than managers with an inflated view of their own self-importance.  But this is rather indicative of the problem I think we face in our company.  We know where we want to go, and if we just focused on our own goals, we would get there in spectacular fashion.  This isn't the case, however. We fixate on what other companies are doing and what else we could be doing instead of directing our gaze at what we are working on until it is completed.  Couple these misguiding glances with all of our team meetings, morale events, office sharing and quarterly group/org/company ra-ra meetings that do nothing more than tell us what we already know -- or tell us more than we care to know -- and it's no wonder we cannot get anything done.

I encourage Microsoft to start training our managers -- and our non-management employees for that matter -- to stay focused on the direction of our company. Stop worrying about what every other company out there is doing and start worrying about what we are NOT getting done on time.  Our customers depend on us.  You want to drive up customer satisfaction rates?  How about delivering a product for them to be satisfied with!  You want to drive up revenue?  How about filling some warehouses with some freshly minted retail bits!

Obsessing over our career options at myMicrosoft and worrying about work-life balance cannot continue to be our main focus.  Putting our focus in that direction will only take us off course from our real goals. Trust me, when we deliver quality products to our customers on time and under budget, our career options will open up for themselves. And nothing makes work-life balance easier than getting performance bonuses that we can spend on our nights, weekends and vacations or put toward our children's college education fund.

Edit:
I should clarify that I am also guilty of this very same problem.  While re-reading my annual review, my commitments are filled with goals that aren't in my direct line of responsibility.  This is as much of a criticism of myself as it is of anyone else.  Furthermore, my managers up my direct line have been pretty wonderful, supportive and have kept me fairly focused on my tasks.

Posted by Tobin Titus | 0 Comments
Filed under:

SDK Sample: Programmatically change the runtime version of an application pool in IIS 7

I have posted a new sample on IIS.NET demonstrating how to programmatically change the managed runtime version of an application pool in IIS 7.0.  I have posted code in VB.NET and C#.  Enjoy.

Posted by Tobin Titus | 0 Comments
Filed under: ,

Communication breakdown: internal spam affects productivity

When I interviewed with Microsoft, I was asked, "What is one thing we can count on you to do at Microsoft?" 

My reply was brief: "You can count on me to complain." 

My interviewer suddenly took on the puzzled look that an interviewee would normally take when presented with an unfamiliar scenario.  The facial expression of my inquisitor demanded an explanation.  I decided to end the torment by presenting further detail;  “When something is wrong, I’m going to bring it up and someone will hear me.  I’m not going to just complain, but I’m going to offer at least one alternative solution.”  Apparently, my explanation cured the torment of my initial declaration. I was hired and here I sit; typing my 23rd Microsoft blog post to an audience that has graced me with tens of thousands of views.  This particular post is a follow-up on my promise to complain and provide an alternative solution.

As many have said in the past, email is the life-blood of our company. We communicate everything in email.  That’s why our anti-spam measures that counteract external tormenters are so critical to our business.  But what are we doing about the measures to counteract internal spammers?  Adam Barr made light of the need for Microsoft Outlook rules in his short story, “The Microsoft Code”, but the premise is 100% genuine.  Internally, we have people who just LOVE to toot their own horns and, as you might guess, these horn-tooters are typically the management way up the line.  They do this horn-tooting in a barrage of email that cripples productivity.  This is fine, I suppose, but it comes from the internal culture that supports working toward better reviews each year rather than making meaningful contributions to their teams, organizations, the company and (hopefully) the customers.  When a director sends you a “professional” email that contains exclamation points and smiley faces, you can almost assuredly delete the email – can anyone make an Outlook rule for that?
 
I've been at Microsoft for less than 4 months now and I've been swamped with work since I came to Redmond.   I am the only worker of my particular discipline in my particular group.  I have deadlines; big ones; looming ones. I sincerely mean no offense here, but I don’t have time to listen to everybody in our company talk about what they did and what they are going to do.  To take that one step further, I don’t care to know everything that’s going on. I lose my focus as I try to decipher the email and understand how that particular communication affects my day-to-day work.  If our upper management stopped to think about the opportunity cost of each email they sent out, we might actually have time to stop reading email and start getting products shipped on time.  Seriously, I wonder how many people send out these emails to distribution lists that “appear” correct (apparently based on the name of the group) without actually looking to see who is involved in the distribution.  Those distribution lists in the GAL can be nested so many levels deep, I venture to say that no one knows who is going to receive a particular email with any degree of specificity.
 
If upper management is going to send email to everyone, what is intermediate management meant to do?  I personally prefer a military style approach where one level talks directly to the level above them and the level below them with rare communications in between.  If those particular levels above or below think the information is important to the next level up or down, they can forward that communication accordingly.  Dissemination of information in this particular manner assures that the appropriate people get the data, and everyone else doesn’t suffer from information overload.  Each management level can also summarize the information and parse out the pieces that they feel are important for their group – a human Outlook rule, if you will.  That's obviously not the culture we have here at Microsoft. 
 
One idea I tossed about in my head was the idea that everyone internally should have their own RSS feed or VLOG.  When someone wants to toot their own horn, they can do so on their blog; their managers can see those accolades, their team can see it, and the people who really care about it can see it.  If that particular employee keeps blogging about stuff that doesn’t affect me, I can unsubscribe and stop wasting my time reading/watching that feed – providing incentive for everyone to keep their topics relevant or risk humiliation with low agg-view participation.  In this approach, new employees or employees who transfer to groups could then subscribe to manager-recommended OPMLs that generally contain information that you will want so you can be effective in your new role.   Furthermore, RSS feeds can be much more easily tagged than email can.  I can subscribe to “John Doe’s IIS posts” but filter out “John Doe’s Accomplishments” (much like my own blog that will allow some of you to ignore this particular “Microsoft Culture” post if you so desire).  Sure, this is not a perfect solution, but it's a start.
 
I have tons of important data to keep track of.  Communication is very important to the company – too important to gum up with internal spam.  We need to find a solution or we will forever find ourselves bogged down in self-congratulatory expression and no real work getting done.

Posted by Tobin Titus | 1 Comments
Filed under:

Security: There's incompetence, and there's major incompetence

It's one type of incompetence to keep the personal identifiers and financial data of customers on your laptop and then lose it -- twice;  It's an entirely different type of incompetence that allows government data to be compromised through a network.  Last year at TechEd, a demo showed how a completely patched network could be compromised using an exploit in a web site.  The best part of the exploit was made possible due to turning on more functionality than was necessary. Namely, one issue in the demo was that the router configuration allowed port 80 and port 443 traffic -- despite the fact that SSL was not in use on the web site. 

Regardless of the platform being used, many of these compromises are possible these days not due to the operating system itself, but due to assumptions made about users, lack of planning, or pure laziness of administrators and developers.  This is one major reason why I'm not a big fan of agile. Despite the best arguments I've heard for agile software development, I have witnessed too much emphasis on feature completion without regard to overall system security. I would encourage you all to read Michael Howard's new book on the security development lifecycle (link provided below).

Whatever the case -- whatever the cause -- I would urge the community to pay attention to the recent news stories, learn to start protecting important data and please stop putting personal and financial information that doesn't belong to you on your laptop!

For more Microsoft resources on security please check out the following:

General Security Websites:
http://www.microsoft.com/security/default.mspx

Developer Security:
http://msdn.microsoft.com/security/securityreskit/default.aspx
http://msdn.microsoft.com/security/securecode/default.aspx

Blogs:
http://blogs.technet.com/msrc/default.aspx
http://blogs.msdn.com/michael_howard/

Books:
http://books.mcgraw-hill.com/getbook.php?isbn=0072260858
http://www.microsoft.com/MSPress/books/5957.asp
http://www.microsoft.com/MSPress/books/8753.asp
http://www.microsoft.com/mspress/books/6893.asp
http://www.microsoft.com/mspress/books/6788.asp
http://www.microsoft.com/mspress/books/6892.asp
http://www.microsoft.com/mspress/books/6432.asp

Posted by Tobin Titus | 4 Comments

ADO.NET 2.0 Boot Camp

Sahil Malik, a prolific speaker, Microsoft MVP and author of "Professional ADO.NET 2.0" is holding a one-day ADO.NET boot camp in Charlotte next month.  If you are in the area, I think this class will definitely give you your money's worth.  Sahil has a very unique way of teaching that is easy to follow and highly effective.  If you are going to be in the area on July 21st, and want to master ADO.NET, I would encourage you to take a look at this great opportunity in the Charlotte, NC.

Posted by Tobin Titus | 0 Comments

Workaround: Adding a script map in IIS 5.1

I was contacted by a customer who commented that he could not add a Script Map to IIS 5.1.  After selecting his executable for the script map and adding his extension, the "OK" button was still disabled -- preventing him from committing the script map change.

To work around this issue, once you have selected the executable and set the extension, click inside the "Executable" text box to expand the full path to the executable.  Doing so will enable the OK button and you will be able to commit your script map change.

Posted by Tobin Titus | 1 Comments
Filed under:
More Posts Next page »
 
Page view tracker