Remove-SqlLogin

Removes a login from a SQL Server.

Syntax

Remove-SqlLogin [-sqlserver] <Object> [-name] <String> [<CommonParameters>]

Detailed Description

The Remove-SqlLogin function removes a login from the specified SQL server.

Related Commands

* Remove-SqlLogin

Parameters

Name Description Required? Pipeline Input Default Value
sqlserver    true  false   
name    true  false   

Input Type

None You cannot pipe objects to Remove-SqlLogin

Return Values

None This function does not generate any output.

Examples

EXAMPLE 1

Remove-SqlLogin "Z002\sql2k8" "TestPSUnit"
This command removes the TestPSUnit login from the Z002\sql2k8 server.

EXAMPLE 2

$server = Get-SqlServer "Z002\sql2k8"
Remove-SqlLogin $server "TestPSUnit" This command removes the TestPSUnit login from the Z002\sql2k8 server.