PowerShell Write-Error Without Writing Stack Trace

,
April 16, 2018 / No Comment

Recently, I was trying to display the errors and warning from a DotNet Build. While the warnings all displayed correctly, the errors always included the stack trace:

I was able to control the error output slightly by varying the global $ErrorView variable, but the only two options were NormalView or CategoryView, neither of which gave me the clean, message-only, look […]
Read more

AUTHOR: CATEGORY: .Net, Blog, PowerShell

How I Installed Software on a Server using PowerShell

,
May 1, 2017 / No Comment

I was tasked with installing custom and generic software on a dozen new servers. As an SDET, I have never done this type of task before, so I googled some methods for automating this process since manually installing each server was time-consuming. PowerShell seemed to be the logical tool for running through my list of tasks. I was able to install all the necessary […]
Read more

AUTHOR: CATEGORY: About, Blog, DevOps, PowerShell, SQL, Test

Moving Quickly Among Branches With PowerShell Dynamic Parameters

,
February 7, 2017 / No Comment

I am currently working on a large integration project that uses a PowerShell script within each sub-module to manage building, deploying and even launching Visual Studio. Due to a reliance on code namespaces matching with folder structures, these PowerShell scripts are sprinkled all over a large directory structure. Fortunately, they are well-named and exist in a predictable sub folder. Working […]
Read more

AUTHOR: CATEGORY: Blog, PowerShell

Deploying Windows Services With Psake and Web Deploy

,
June 29, 2015 / No Comment

At IntelliTect, a common pattern of our client solutions are windows services that process work on either a scheduled basis or watch a file location. We often use a combination of the Topshelf framework with the TopShelf.Quartz job scheduling package to solve these problems. These packages expose a useful fluent interface to schedule multiple jobs in a service instance and […]
Read more

AUTHOR: CATEGORY: PowerShell

MSCORELIB Classes that work with using static in C# 6.0

,
November 15, 2014 / No Comment

While writing another MSDN magazine article on C# 6.0 (the third because the language continues to improve) I was looking for a good example of when to use the new “using static” feature.  Towards this effort, I used PowerShell to crawl through all the MSCORELIB types and output the ones meeting the following criteria:

The type is public
The […]
Read more

AUTHOR: CATEGORY: .Net, Blog, C#, PowerShell

Removing Duplicate Entries from %PATH%

,
June 30, 2012 / 2 Comments

As developers, we frequently end up with duplicate entries in our path. From the command line you can clean up your path using pathman.exe. Here’s a PowerShell Script to find the duplicates and remove them using Pathman.exe:

$extraPath=(($path.Split(“`;”) | group | ?{$_.Count -gt 1}).Values | %{$_[0]}
pathman.exe /ru $extrapath

Disclaimer: Works for us.

AUTHOR: CATEGORY: PowerShell, Windows

IntelliTect Presents at the Seattle Code Camp 2012

,
June 15, 2012 / No Comment

Asynchronous Programming with C# 5.0 – Mark Michaelis
In C# 5.0 there is really only one significant syntax addition – support for asynchronous programming that is embedded into the language. In this session we go over the is and is-nots of what C# 5.0 enables in the way of parallel processing – both for the UI and for the server […]
Read more

Where'd that Team Foundation Build drop?

,
June 8, 2012 / No Comment

Recently I came across a need to know where a Team Foundation Server 2010 build definition dropped the files after a successful build.  I probably could have written a custom Activity and queried TFS in C# code, but the build definition in question heavily leverages PowerShell and the Psake domain specific language, so I wanted to keep it in PowerShell […]
Read more

AUTHOR: CATEGORY: ALM, Blog, Headlines, PowerShell, TFS