< Back
Remove-LdapConnection
Post
NAME Remove-LdapConnection
SYNOPSIS
Closes a provided LdapConnection object.
SYNTAX
Remove-LdapConnection [-LdapConnection] <LdapConnection[]> [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]
DESCRIPTION
This function closes a provided LdapConnection object. It is a convenience function around the .Dispose() method.
PARAMETERS
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Force [<SwitchParameter>]
Never prompt for confirmation before closing the connection.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-LdapConnection <LdapConnection[]>
One or more LdapConnection objects which should be closed.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.DirectoryServices.Protocols.LdapConnection[]
OUTPUTS
System.Object
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> $connection = Get-LdapConnection -Server example.com -Port 389
# Perfom any queries here
PS C:\\> Remove-LdapConnection $connection
This example creates an LdapConnection object, then closes it again. Typically, you would run one or more queries
between these two commands.
RELATED LINKS
Get-LdapConnection
SYNOPSIS
Closes a provided LdapConnection object.
SYNTAX
Remove-LdapConnection [-LdapConnection] <LdapConnection[]> [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]
DESCRIPTION
This function closes a provided LdapConnection object. It is a convenience function around the .Dispose() method.
PARAMETERS
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Force [<SwitchParameter>]
Never prompt for confirmation before closing the connection.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-LdapConnection <LdapConnection[]>
One or more LdapConnection objects which should be closed.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.DirectoryServices.Protocols.LdapConnection[]
OUTPUTS
System.Object
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> $connection = Get-LdapConnection -Server example.com -Port 389
# Perfom any queries here
PS C:\\> Remove-LdapConnection $connection
This example creates an LdapConnection object, then closes it again. Typically, you would run one or more queries
between these two commands.
RELATED LINKS
Get-LdapConnection