commands

^

Set-DbatoolsInsecureConnection

Availability Windows, Linux, macOS

 

Want to see the source code for this command? Check out Set-DbatoolsInsecureConnection on GitHub.
Want to see the Bill Of Health for this command? Check out Set-DbatoolsInsecureConnection.

Synopsis

Sets the default connection settings to trust all server certificates and not require an encrypted connection.

Description

Microsoft changed the default connection settings in the SQL Server connection libraries
to require an encrypted connection and not trust all server certificates.

This command reverts those defaults and sets the default connection settings to trust all server
certificates and not require encrypted connections.

You can read more here: https://dbatools.io/newdefaults

Syntax

Set-DbatoolsInsecureConnection
    [-SessionOnly]
    [[-Scope] {UserDefault | UserMandatory | SystemDefault | SystemMandatory | FileUserLocal | FileUserShared | FileSystem}]
    [-Register]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Set-DbatoolsInsecureConnection

Sets the default connection settings to trust all server certificates and not require encrypted connections.

Example: 2
PS C:\> Set-DbatoolsInsecureConnection -SessionOnly

Sets the default connection settings to trust all server certificates and not require encrypted connections.
Does not persist across sessions so the default will return if you close and reopen PowerShell.

Optional Parameters

-SessionOnly

Does not persist across sessions so the default will return if you close and reopen PowerShell.

Alias
Required False
Pipeline false
Default Value False
-Scope

The configuration scope it should be registered under. Defaults to UserDefault.
Configuration scopes are the default locations configurations are being stored at.

Alias
Required False
Pipeline false
Default Value UserDefault
-Register

Deprecated.

Alias
Required False
Pipeline false
Default Value False