This post is heavily plagiarised from here. But sometimes I see an interesting nugget of code and like to make sure I never lose it, and this piece on charting for PowerShell is no different! I’ve made a few tweaks … Continue reading →
Selenium is a portable software-testing framework for web applications. It’s pretty cool (in a geeky way) and is primarily used to test web applications. In this instance we’re using it to launch Internet Explorer, load a web-based helpdesk dashboard on the intranet, log into … Continue reading →
I’ve been performing some SQL queries recently using PowerShell and Invoke-SqlCmd, but I’ve noticed that by default Invoke-Sqlcmd returns columns RowError and HasErrors. Here is a simple example of returning a list of devices (a single column of data) from … Continue reading →
A couple of days ago I wanted to check which products were installed on a computer using PowerShell. And throughout my journey I discovered how we can format the output of returned data by using Select-Object with PowerShell. Take this … Continue reading →
A while ago I needed to wait for a process in a batch file to finish before the script continued. I did it by using an If statement to create a ‘spoof’ loop, with a delay between each loop iteration … Continue reading →
There are many occasions where I need to move or copy Active Directory users from one group to another. Usually this occurs when an application has been updated to a new version, and we need to migrate users from the … Continue reading →
This is a quick script I’ve used to add and remove service entries to the windows services file. It ignores commented lines (lines starting with a hash (#)), and it also doesn’t validate the format of the host or port/protocol … Continue reading →
This is an example of how to install and uninstall an MSI using PowerShell. It passes in a string array as the msiexec arguments. So you can add more arguments as you see fit. Pay close attention to the quotes … Continue reading →
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 … Continue reading →
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 … Continue reading →