Microsoft Baseline Security Analyzer with xp_cmdshell
From: Dennis Joergensen (anonymous_at_discussions.microsoft.com)
Date: 05/04/04
- Next message: Anith Sen: "Re: What is meant by first normal form?"
- Previous message: EricT: "Re: Nested Query Problem or Grouping Problem"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 4 May 2004 12:41:08 -0700
Hello
I'm trying to import reports from Microsoft Baseline Security Analyzer into a database. I should be maded by a DTS Package, with one Execute SQL Task and one ActiveX Script Task.
The Execute SQL Task should make a cursor for getting the servers from a tabel, and then call Microsoft Baseline Security Analyzer (msbacli.exe) with xp_cmdshell for each server.
The ActiveX Script Task should then import the XML report files via SQLXML 3.0 Bulk Load into a tabel.
(The reason not for just calling msbacli.exe once in hfnetchk mode with a hostfile, is because it only supports 128 servers, even though that the documentation says 256)
Anyway the problem is that I can get MSBACli.exe to work with xp_cmdshell. I'm running with a security context of a user with sysadmin membership. The same user as the SQL Server Service. So it's not a security problem.
Here is the code, and the output:
DECLARE @result int EXEC @result = xp_cmdshell '"C:\Program Files\Microsoft Baseline Security Analyzer\mbsacli.exe"'
Microsoft Baseline Security Analyzer
Version 1.2 (1.2.3316.1)
(C) Copyright 2002-2004 Microsoft Corporation. All rights reserved.
HFNetChk developed for Microsoft Corporation by Shavlik Technologies, LLC.
(C) Copyright 2002-2004 Shavlik Technologies, LLC. www.shavlik.com
No computers were found.
Unable to load XML data.
If i try to specify a computer, it's the same:
DECLARE @result int EXEC @result = xp_cmdshell '"C:\Program Files\Microsoft Baseline Security Analyzer\mbsacli.exe" /i 192.168.0.2'
Microsoft Baseline Security Analyzer
Version 1.2 (1.2.3316.1)
(C) Copyright 2002-2004 Microsoft Corporation. All rights reserved.
HFNetChk developed for Microsoft Corporation by Shavlik Technologies, LLC.
(C) Copyright 2002-2004 Shavlik Technologies, LLC. www.shavlik.com
No computers were found.
Unable to load XML data.
What is the problem? When i run mbsacli.exe in a command prompt with the same parameteres, it works fine.
Please help. You are also welcome if you got another and easy way to scan and import security reports into a database?
Regards Dennis
- Next message: Anith Sen: "Re: What is meant by first normal form?"
- Previous message: EricT: "Re: Nested Query Problem or Grouping Problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|