File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -9939,11 +9939,11 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
99399939 /* had to use a different table name because SQL Server/SSMS complains when parsing that the table still exists when it gets to the create part*/
99409940 IF OBJECT_ID (' tempdb..#localadminsag' ) IS NOT NULL DROP TABLE #localadminsag;
99419941 CREATE TABLE #localadminsag (cmdshell_output NVARCHAR (1000 ));
9942- INSERT INTO #localadmins
9942+ INSERT INTO #localadminsag
99439943 EXEC /**/ xp_cmdshell/**/ N ' net localgroup administrators' /* added comments around command since some firewalls block this string TL 20210221 */
99449944
99459945 IF EXISTS (SELECT 1
9946- FROM #localadmins
9946+ FROM #localadminsag
99479947 WHERE LOWER (cmdshell_output) = ( SELECT LOWER ([service_account])
99489948 FROM [sys].[dm_server_services]
99499949 WHERE [servicename] LIKE ' SQL Server%Agent%'
You can’t perform that action at this time.
0 commit comments