Installing sqlcmd without SQL Server

I just ran into a need for sqlcmd without SQL Server. I'm on Windows Server 2016 Datacenter. I installed Microsoft® ODBC Driver 11 for SQL Server - Windows, with filename  msodbcsql.msi Installed from This is a dependency for Microsoft Command Line Utilities 11 for SQL Server, with filename MsSqlCmdLnUtils.msi  I installed from I chose the 64-bit versions of both. Restarted my console session and able to run sqlcmd without SQL Server!
Read More

Set up an SMTP Replay (or smarthost) in Windows 2012 R2 with PowerShell

I just set up for our servers that need to send mail, we have a smart host relay to sendgrid. Part of the setup is done via PowerShell, part through the GUI. If you can direct me on how to configure the additional steps via PowerShell I would be keenly interested and would update this site. Start by setting up the SMTP Server, which is managed by the IIS 6 Admin console, with these commands from an elevated PowerShell prompt: Import-Module ServerManager Add-WindowsFeature SMTP-Server,Web-Mgmt-Console,WEB-WMI Then follow the steps 2-8 on this SpiceWorks Post I would test from every server that must send email. Here's the PowerShell way to send a test email, using splatting by building $params as a hash table for the parameters then passing in @params. Note that…
Read More

Install SQL Express 2014 or 2016 from PowerShell

PowerShell, SQL
This may be useful for some folks out there. While the documentation on SQL Books online for command line installs is extensive, the examples there are limited, and the troubleshooting steps are not described clearly. You will need to download the SQL installer iso or files and mount or extract them, and locate the setup.exe. For SQL 2014 Take note that: This is installing SQL Express, a /FEATURES parameter was not required. Changes will be required if using a different distribution. This creates a default instance of SQL, change MSSQLSERVER to your desired instance name. Local Windows administrators will have SQL access by default The line of PowerShell code below that defines $params has no carriage returns between the single quotes. The results of a successful or failed install can…
Read More

Presenting PowerShell for the DBA, Part 2 – Objects and Tools – for the PASS DBA Virtual Chapter

Wednesday March 8, 2017 will be presenting online  for the PASS DBA Virtual Chapter. The topic is PowerShell for the DBA, Part 2 - Objects and Tools If you'd like to join us, here is the attendee link! Here's the link to part 1 of the talk, including videodownloadable scripts, and resources to learn more. Link to part 2 content on the PASS DBA Virtual Group - Meeting Archive page. Link to the event page, with video and zip of demo scripts. Hope to see you there!
Read More