SQL Server PowerShell

When you first get into SQL Server PowerShell, you might notice that this is a restricted version of the default PowerShell console. In other words, several of the core cmdlets are not available in SQL Server PowerShell, and others might not work exactly the same way. For example, invoking the Get-Command cmdlet alone with no other arguments does not list all the available commands.

Note

Running Get-Command in SQL Server PowerShell without any parameters might generate the following message:

Get-Command : Object reference not set to an instance of an object.

However, other invocations of this command work fine (such as the other examples of Get-Command in this section). Microsoft has identified this issue but as of this ...

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.