SQL Network Interfaces, error: 25 - Connection string is not valid in Powershell

后端 未结 6 618
天命终不由人
天命终不由人 2021-01-12 10:36
$SQLconnection = New-Object System.Data.SqlClient.SqlConnection
$SQLconnection.ConnectionString = \"Server = MySQLservername\\MSSQLSERVER; Database = \"MYSQLDB\"; In         


        
6条回答
  •  借酒劲吻你
    2021-01-12 11:38

    One way you will get this error is if you have your Network Profile is set to "Public". It needs to be "Private".

    To change (or check).

    Click Start->Settings->Network & Internet

    Click Status
    Click Change connection properties
    Under Network Profile select "Private"

提交回复
热议问题