Today I came across a great script by Andy Mishechkin on MS Technet. The PowerShell script for execution of T-SQL batch files It's a great script for .SQL file execution against a SQL server. It can also run .SQL files which contains GO commands. In short: works like a charm!
Author: Powershell Administrator
Add-WindowsFeature Error: 0x800f0902 – The operation cannot be completed because Windows is currently performing another servicing operation
Today I encountered a problem, for which I couldn't find a solution (which is pretty rare), so thought I'd post a blog about it and maybe someone can help me. I sometimes have a problem with the Add-WindowsFeature. In powershell, overall it works fine, but sometimes it gives me the following error: Add-WindowsFeature: The request … Continue reading Add-WindowsFeature Error: 0x800f0902 – The operation cannot be completed because Windows is currently performing another servicing operation
Creating an ODBC connection
With Powershell 4 on Windows 8 and 2012, they've improve the support for ODBC connections. You just need to import the Wdac module to be able to use the different ODBC functions. Get-Command *ODBC* shows the following functions: Add-OdbcDsn Disable-OdbcPerfCounter Enable-OdbcPerfCounter Get-OdbcDriver Get-OdbcDsn Get-OdbcPerfCounter Remove-OdbcDsn Set-OdbcDriver Set-OdbcDsn For instance, if you were to create a … Continue reading Creating an ODBC connection
Making IT…
Making IT come to life
Quick command to open explorer from the current directory in Powershell
Here is a quick command if you want to open Windows Explorer from the current directory in Powershell: ii . (note the space between the 'i' and the dot) ii is powershell's alias for invoke-item. Adding a dot to that command will open the current directory using the default explorer. Edit: If you'd like to … Continue reading Quick command to open explorer from the current directory in Powershell
Run a powershell script if the computer contains the correct powershell version
Several times I encountered that a computer I was running my scipt on, didn't support a certain parameter or a certain command because it didn't have Powershell 4 installed. Thus I thought it would be time to create a default error-handling for each of my scripts which checks if the computer runs the correct Powershell … Continue reading Run a powershell script if the computer contains the correct powershell version
System Administrators…
System Administrators who don't script, are doing IT wrong
Hi there and welcome
Hi there and welcome to my Powershell blog. I've always loved scripting to automate things or to make things easier. Now that I've encountered Powershell, I fell in love with it. Through this blog I hope to spread the love 😉 But seriously, Powershell is a great way to automate things. Even when you're no … Continue reading Hi there and welcome
Those who forge…
Those who forget to script, are doomed to repeat their work