25 New SQLServer PowerShell cmdlets

Ayo Olubeko of the SQL Server Blog writes in the SQL PowerShell: July 2016 update. The July update for SSMS includes the first substantial improvement in SQL PowerShell in many years. We owe a lot of thanks for this effort to the great collaboration with our community. We have several new CMDLETs to share with you, but firstly, there is a very important change we had to make to be able to ship monthly updates to the SQL PowerShell component.

Continue reading “25 New SQLServer PowerShell cmdlets”

How to install IIS URL Rewrite Module on Windows Server 2016 & IIS 10

When you start to play with Windows Server 2016 and IIS 10, you’ll receive an error when you try to install the IIS URL Rewrite Module in IIS. The error occurs because the URL Rewrite Module installer contains an invalid version check for the IIS being used. Here is how to install IIS URL Rewrite Module in IIS 10

Continue reading “How to install IIS URL Rewrite Module on Windows Server 2016 & IIS 10”

PowerShell blacklist check script: find an IP address’ blacklist status & reputation

Here’s a blacklist check script written in PowerShell. You can use this to lookup an IP address in various blacklists (DNSBL, RBL). Such a check is a great indicator for an IP address’ reputation. Basically this PowerShell blacklist checker is a translation of my Bash script to check an IP address blacklist status in Linux.

Continue reading “PowerShell blacklist check script: find an IP address’ blacklist status & reputation”

Simple PowerShell introduction for Windows Server administration, automation and scripting

Windows PowerShell (“PS” for short) is an important tool in Windows Server for administrators. You can use PowerShell for Windows Server administration, software installation, automation, and shell/command-line scripting. Here is a small and simple introduction to Windows PowerShell.

Continue reading “Simple PowerShell introduction for Windows Server administration, automation and scripting”

Installing SQL Server Express and Restoring a Database With Powershell

Here’s a PowerShell script, by Microsoft’s Dave Browne, to install SQL Server Express Edition and restore a database from a command line. It’s intended to be used as part of an installation script for an application that needs a local SQL Express instance. But it also demonstrates several SQL Server and Powershell interop features like handling InfoMessages from the server, dealing with resultsets, embedding TSQL commands with Powershell Here Strings.

Continue reading “Installing SQL Server Express and Restoring a Database With Powershell”

How to install Microsoft’s SQL Server Driver for PHP

In this article I’ll show you how to install the Microsoft SQL Server Driver for PHP 5.6 and PHP 7. This makes the use of an SQL Server database back-end for your PHP website easu. If you want to communicatie with an SQL Server database from PHP you need to rely on some additional software and PHP extensions. This post walks you through the steps necessary to install the SQL Server driver and SQLSRV extension for PHP 5.6 and PHP 7, on Windows Server IIS of course.

Continue reading “How to install Microsoft’s SQL Server Driver for PHP”

Monitor Windows services with PowerShell

How to monitor Windows Servers with PowerShell. As a Windows Server and IIS administrator, you want your Windows services to run at all times. One can monitor Windows services in many, many, ways. Some of our customers websites may depend on certain services, which may be hard to monitor externally. For those Windows services that need local monitoring, I like to schedule a PowerShell script. Here is one…

Continue reading “Monitor Windows services with PowerShell”

PowerShell Get-FsrmQuota and Set-FsrmQuota

To get and set File Server Resource Manager NTFS quota, you now have to use PowerShell‘s FileServerResourceManager cmdlets. In the past, I used to get and set NTFS directory quota with the dirquota command, which is deprecated. A behavioral change for me (and you?) I can live with: it’s pretty easy to get directory information with Get-FsrmQuota and change dirquota using Set-FsrmQuota.

Continue reading “PowerShell Get-FsrmQuota and Set-FsrmQuota”

IIS application pool recycle on specific times, not regular time interval

By default, an IIS application pool (an “AppPool” hereinafter) recycles on a regular time interval of 1740 minutes, or 29 hours. One reason for this time interval is that application pools don’t recycle at the same moment every day (every day at 07.00 for example). However, sometimes you may want to change this regular time interval to specific times. And when you try to configure this in IIS Manager, it gives you an error. Luckily, AppCmd and PowerShell come to the rescue!

Continue reading “IIS application pool recycle on specific times, not regular time interval”

Software deployment through WDS

Install software packages during a Windows Deployment Services (WDS) deployment, without Microsoft Deployment Workbench (available in the Microsoft Deployment Toolkit, or MDT). In my environment, I had to set up a new Windows Deployment Services (WDS) configuration for Windows 8.1 Enterprise. To roll out in our office (some 20+ workstations). I wanted to install some additional software at the same time, without using Microsoft Deployment Workbench, because I find the interface too slow. The solution? Read on…

Continue reading “Software deployment through WDS”