diff --git a/Security and Compliance/Database principals should not be mapped sysadmin accounts.sql b/Security and Compliance/Database principals should not be mapped sysadmin accounts.sql index 300a2e8..7d80408 100644 --- a/Security and Compliance/Database principals should not be mapped sysadmin accounts.sql +++ b/Security and Compliance/Database principals should not be mapped sysadmin accounts.sql @@ -35,4 +35,6 @@ CLOSE dbs; DEALLOCATE dbs; SELECT * +, DropUserCommand = N'USE ' + QUOTENAME(DBName) + N'; DROP USER ' + QUOTENAME(UserName) + N';' +, RemoveSysAdminRoleCommand = N'ALTER SERVER ROLE [sysadmin] DROP MEMBER ' + QUOTENAME(LoginName) + N';' FROM @Results \ No newline at end of file