June, 2014

  • Get and Set the compilation debug flag in web.config

    Since the main technology I support as a PFE is IIS, I often find myself writing scripts for IIS or ASP.NET management. For example, one of the first things I check when troubleshooting ASP.NET applications is the debug flag in the web.config. For this...
  • PowerShell scripting best practices

    For the past few years, I’ve picked up a several best practices for PowerShell scripting. Some of them are “borrowed” from Ed Wilson (aka the Microsoft Scripting Guy ), Don Jones , and other PowerShell MVPs and PFEs @ Microsoft. Start your scripts with...
  • Dynamic ValidateSet in a Dynamic Parameter

    A colleague of mine needed a way to have a parameter accept only a specific set of paths. I told him this can be accomplished easily with the ValidateSet decoration on the parameter , but he then explained that what the actually needed, is to have the...
  • Get Excel data without Excel

    In a specific scenario, I needed to be able to query an Excel file and get data from a worksheet but I didn’t (and couldn’t) have the Office suite (or even Excel only) installed on the machine. If the Excel file is and xlsx file (the new Microsoft Open...