July 2018
Beginner
552 pages
13h 18m
English
The SqlServer module also contains plenty of commands around security-related features. For the code samples, we will be using a connection object, as follows:
$server = Get-SqlInstance -ServerInstance sql2017
Using the Get-SqlCredential and Set-SqlCredential commands, you can check and update credentials the Sql Instance is using. This makes rotating service account configurations simple to automate:
# Check on credential$server | Get-SqlCredential -Name "AD\ser_SqlPowerShell" | fl *# Update Credential$cred = Get-Credential$server | Set-SqlCredential -Name "AD\ser_SqlPowerShell" -Secret $cred.Password
Moving on, you can also set up the AlwaysEncrypted feature which keeps columns in a permanently encrypted ...
Read now
Unlock full access