This is a quick script I’ve used to add and remove hosts entries to the windows hosts file. It ignores commented lines (lines starting with a hash (#)), and it also doesn’t validate the format of the host or IP...
My current client uses the standalone InstallShield repackager to snapshot applications on virtual machines. When we copy the captured project back to the host machine and try to build the project, we sometimes see an error where InstallShield could not...
Sometimes I need to search for a file inside a merge module (MSM). Since I don’t know which specific merge module I’m looking for, I wrote this script to iterate through every merge module in a specific folder to find...
Sometimes after installing a setup.exe with limited command line switches, we may want to clean up the Windows start menu. Usually as part of our Application Packaging best practises we remove ‘Uninstall’ shortcuts, ‘Update’ shortcuts, and shortcuts to readme’s and...
This is a simple example of using a Hashtable to store key/value pairs. Rather than referencing a value in an array using a numeric index, we now have named (the key) human-readable values that we can use to reference a...
This post continues from part 1 of the driver signing series found here and part 2 of the series found here. Part 3 of our driver signing guide deviates slightly from the self-signed certificate approach. My current client uses Active Directory...
[catlist name=”PowerShell ADSI and Active Directory” conditional_title=”Other Posts in this Series:” numberposts=5 pagination=yes customfield_orderby=”series_post_order” order=”asc”] This post provides an example of how we can use ADSI to check if a computer is a member of an AD Group using the...
This isn’t the most interesting of blog posts admittedly. But I was using the SQL Server Management Objects (SSMO) in my PowerShell script to return a result set from a stored procedure in SQL server. The data set returned from...
This post explains how to export to CSV using PowerShell and dynamic data. I find that hashtables are quite useful for various scenarios when scripting in PowerShell. We can also utilise them when exporting data using Export-CSV. I provide two...
I’ve been using Visual Studio 2013 Express to make a C# website that uses SOAP to request services from another company. Everything was working fine, until one day I suddenly started getting HTTP 500 errors. Naturally the service provider said...