dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Remove-DbaClientAlias

Removes a SQL Server alias by altering HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client.

Screenshots

dbatools-Remove-DbaClientAlias

Examples

Removes the sqlps SQL client alias on workstationx.

Remove-DbaClientAlias -ComputerName workstationx -Alias sqlps

Removes all SQL Server client aliases on the local computer.

Get-DbaClientAlias | Remove-DbaClientAlias

Author

This command was created by Chrissy LeMaire. You can find Chrissy on Twitter.

Get-Help

From PowerShell, execute Get-Help Remove-DbaClientAlias -Detailed for more information on this function.

Source Code

Want to see the source code? View Remove-DbaClientAlias.ps1 on GitHub
 

Related commands