PowerShell script for toggling network configuration between dynamic and static on Windows 7

Changing network configuration can be a real pain if you use your computer, a notebook for example, in more than one different network where you need a static configuration instead of a dynamic. Although Windows offers one alternate configuration it is quite circumstantial to access. The following PowerShell script will change network configurations with only ... Read more

Returnvalue: 2147749891 in wmi EnableStatic method

Successfully using the EnableStatic method for example in powershell always gives the Returnvalue 0. If that is not the case, something will most likely have gone wrong. If you are returned the value 2147749891, this is a sign for a lack of administrative rights. The action you want to perform with your script most likely ... Read more

Windows Returnvalue: 2147786788 in wmi EnableStatic method

Successfully using the EnableStatic method for example in powershell always gives the Returnvalue 0. If that is not the case, something will most likely have gone wrong. If you are returned the value 2147786788, this is a sign for a write lock of some sort, meaning you have to look for running processes that are ... Read more

Monitor Processes With Windows PowerShell

Maybe you have already come across applications that require you to rearrange things on your desktop for optimal visibility or which you only use in combination with other programs or items - an automated startup or rearrangement would come handy in those situation. The following little PowerShell script allows just this - automatical actions on ... Read more

How to Execute PowerShell Scripts Without Pop-Up Window

PowerShell scripts are hard to run without any kind of popup. Without a small workaround, it may even be impossible, even if you specify the -WindowStyle Hidden switch - this will only result in the PowerShell window blinking up for a split second and disappearing afterwards. You can circumvent this issue by launching the PowerShell ... Read more

Windows Powershell Script to Export and Import Sound Schemes

Windows 7 offers the possibility to switch between preinstalled sound schemes and also create new ones and delete those again. What it does not provide however is a way to export and import those schemes to use them on other systems. There is a way to do this but it involves copying over all the ... Read more

Windows Powershell Script to Sort Music From Folder to Library

The aim of the following script was to take music from a single folder with unsorted but tagged audio files and sort them into the music library according to artist and album. It often happens that you have audio files in your browser's download folder or your instant messenger's received files folder where they usually ... Read more

Automatically Delete Older Folder Contents with Powershell on Windows 7

The aim of this guide is to create a folder whose content is deleted if the contained files have not been accessed longer than a specific time (this process is applied to single files, not the whole folder). I will choose two weeks for demonstration purposes (= 14 days). Such a folder can be used ... Read more

How to Call Functions in Powershell (Windows)

Functions in Powershell are called without any comma or parenthesis, although they are defined using them. The correct way to call a function with two variable parameters would be: test $local1 $local2 The wrong way is: test($local1, $local2) If you put parentheses around your parameters, your input is treated as array and thus the processing ... Read more