Changing authentication mode
In this recipe, we will change the SQL Server authentication mode.
Getting ready
Confirm which authentication mode your instance is running.
Go to SQL Server Management Studio, and log in to your instance. Once logged in, right-click on the instance and go to Properties, and to Security, similar to what we did in the previous recipe:
In this recipe, we will change the authentication mode from Mixed to Integrated.
How to do it...
Let's explore the steps required to complete the task:
Open the PowerShell console by going to Start | Accessories | Windows PowerShell | Windows PowerShell ISE.
Import the
SQLPS
module, and create a new SMO Server object as follows:#import SQL Server module Import-Module SQLPS -DisableNameChecking #replace this with your instance name $instanceName = "KERRIGAN" $server = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Server -ArgumentList $instanceName
Add the following script and run:
#according to MSDN, there are four (4) possible...