SQL Server PowerShell Articles

Using PowerShell to Manage SQL Server

The purpose of this article is to demonstrate a custom scripting framework which enables the management of SQLServer databases from a Windows PowerShell session and also to extend Powershell’s flexibility by creating a set of commands customized to our needs. I will call this framework comprised of a library of modules and functions specialized to manage […]

Invoke-Sqlcmd vs sqlcmd utility

Invoke-Sqlcmd can run many of the scripts which can be run with the sqlcmd utility. However, Invoke-Sqlcmd runs in the PowerShell environment which is different than the command prompt environment sqlcmd runs in. Invoke-Sqlcmd has been modified to work in a PowerShell environment. Not all the sqlcmd commands can be used in Invoke-Sqlcmd. Commands which […]