Manage Tab Completion (SQL Server PowerShell)
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
The SQL Server PowerShell snap-ins introduce three variables ($SqlServerMaximumTabCompletion, $SqlServerMaximumChildItems, and $SqlServerIncludeSystemObjects) to control Windows PowerShell tab completion. Tab completion reduces the amount of typing you must do by returning tables of items whose names start with the string you are typing.
With Windows PowerShell tab-completion, when you have typed part of a path or cmdlet name, you can hit the Tab key to get a list of the items whose names match what you have already typed. You can then select the item you want from the list without having to type the rest of the name.
If you are working in a database that has a lot of objects, the tab-completion lists can become very large. Some SQL Server object types, such as views, also have large numbers of system objects.
The SQL Server snap-ins introduces three system variables that you can use to control the amount of information presented by tab-completion and Get-ChildItem.
For any of the variables you want to change from the default value, set the variable to the new value.
The following example sets all three variables and lists their settings:
$SqlServerMaximumTabCompletion = 20 $SqlServerMaximumChildItems = 10 $SqlServerIncludeSystemObjects = $False dir variable:sqlserver*