Winget

Linux based operating systems have always had a package manager for installing software. In Ubuntu you have Apt and Centos/Red Hat have Yum. For Windows there was no such thing. So if you want to install software you had to make your scripts, figure out how to do the silence installs, keep all the binaries up to date and make them available on a central location. Then a few years ago Chocolatey was born. [Read More]

Tips for using OpenSSL

When you work at a hosting provider to have to deal with SSL certificates. We create our certificate signing request from a central Linux server. This means that when there is a certificate for a a website on a Windows server that I need to use OpenSSL to create a pfx file. Pfx files are needed to import the certificates and the private key in IIS for example. With OpenSSL it is easy to create a pfx file. [Read More]

Hello Hugo

When I started this site I decided to continue using WordPress. The predecessor of this site was hosted by wordpress.com and is still available at https://danvers72.wordpress.com. But WordPress is just overkill for a website that has mostly static content. But WordPress itself needs some regular maintenance also. On a regular base you need to update your WordPress instance, the plugins that you are using, the themes you are using. And you really need to this to keep your website secure. [Read More]

Use PowerShell to find IP Geolocation

In log files from web servers you often find strange requests. For example requests for wp-login.php on server that don’t have PHP or WordPress installed. Or that someone is requesting the same page over and over. Most of the times this is not a real problem. But it gets a problem or at least annoying when you get hundreds or thousands of these requests from the same IP address. If I see things like that happening the first step is to find out where the request is coming from. [Read More]

Edit firewall rule scope with PowerShell

One of our managed server customer frequently asked me to add an IP address to the scope of a firewall. Specially when they were still testing and did not want HTTP/HTTPS to be open for everyone. Recent versions of PowerShell have Cmdlets that you can use to manage firewall rules. To set the scope you can use Set-NetFirewallAddressFilter Cmdlet. You use it like this. Get-NetFirewallrule -DisplayName 'Test-Rule' | Get-NetFirewallAddressFilter | Set-NetFirewallAddressFilter -RemoteAddress 192. [Read More]

Disable IIS Server Headers

For security reasons some administrators want to hide what web server they are using. Personally I am not convinced that it would stop hackers to attack your server. But is is good practice to expose as little information as possible and security audits also require not to expose these pieces of information in the response headers. In this post I will show you how to disable some common and not so common headers in Windows Server 2016 and higher. [Read More]

Disable PowerShell beep on backspace

One thing that I have found very annoying of the recent PowerShell versions is the beep that you hear when you press <BackSpace> and hit the beginning of the line. First I thought it was a setting in Windows 10 but I could not find it. And apparently that is the wrong place to look for it. The beep sound is actually provided by the PSReadLine module which is used by default and also gives us these time saving keyboard shortcuts. [Read More]

PowerShell Shortcuts

Unix Shells have many shortcuts that make life easier when using the shell. What people often forget is that de good old Command Prompt also had shortcuts. HowToGeek wrote a good article about it. You can find it here. Recent versions of PowerShell also have even more powerful keyboard shortcuts. This are implemented by the PSReadLine Module. This module is included with PowerShell 5 and higher. The documentation can be found here. [Read More]

New site, new start

I have been writing about IT stuff on and off on my blogĀ danvers72.wordpress.com. Lately it has been mostly off because I was busy with other things. I used to use my old blog as a sort of notebook for myself so I could easily find things that I learned and were important enough to write down. Of course I have written down things I did not want to forget in a notebook, in my case I used One Note from Microsoft. [Read More]