PsDac

PsDac connects DacFx and PowerShell. It gives you PowerShell Cmdlets with the power of Microsoft.SqlServer.DacFx.

View the Project on GitHub abbgrade/PsDac

Disconnect-DacService

SYNOPSIS

Closes the connection to a database server.

SYNTAX

Disconnect-DacService [-Service <DacServices>] [<CommonParameters>]

DESCRIPTION

EXAMPLES

Example 1

PS C:\> Connect-DacService -DataSource '(LocalDb)\MSSQLLocalDB'
PS C:\> Disconnect-DacService

Closes an open connection to localdb.

PARAMETERS

-Service

Specifies the service to disconnect. Default is the latest connected service.

Type: DacServices
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

None

NOTES

DacServices