In order to be effective at working with SQL Server and PowerShell, knowing how to explore and discover cmdlets, snap-ins, and modules is in order.
Log in to your SQL Server instance, and launch PowerShell ISE. If you prefer the console, you can also launch that instead.
In this recipe we will list the SQL-Server related commands and cmdlets.
#how many commands from modules that #have SQL in the name Get-Command -Module "*SQL*" | Measure-Object #list all the SQL-related commands Get-Command -Module "*SQL*" | Select CommandType, Name, ModuleName | Sort -Property ModuleName, CommandType, Name ...