/dbaSecurityScanBasics.ps1 Secret
Last active
March 29, 2020 09:54
Star
You must be signed in to star a gist
dbaSecurityScanBasics - blog post 29/03/2020
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-module DssSecurityScan | |
--Create config and test against a new database | |
$config = New-DssConfig -SqlInstance server1\sql2017 -Database oldProd | |
Invoke-DssTest -SqlInstance server2\sql2019 -Database newProd -Config $config | |
--Save a config, and then use it audit after a change | |
New-DssConfig -SqlInstance server1\sql2017 -Database oldProd -ConfigPath ~/git/dbSourceControl/permissions.json | |
Start-Sleep -Seconds 10080 | |
$config = ConvertFrom-Json -InputObject (Get-Content ~/git/dbSourceControl/permissions.json -raw) | |
Invoke-DssTest -SqlInstance server2\sql2019 -Database newProd -Config $config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment