Jump to content


  • 0
P@docIT

Consolidating query/report data output

Question

I am completely new to report building and honeslty I can typically fumble my way through basic queries but I have hit a spot where I need a little help. I am trying get the information in the query screen below to output more like what is in the excel screenshot. Right now you get at least two entries per machine for VSE and the agent. There also some machines that have HIPS listed in non 64 installed apps or have the agent in the installed apps 64 list. Is there a way to make the software the header and just the version that is installed on that machine whether its in InstalledApps or InstalledApps_64? Hope that makes sense.

 

post-10749-0-25299900-1445967691.png

 

 

post-10749-0-49798200-1445967306.png

 

Cheers,

Mike

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

I see no reason for you to get this error message.

 

I commented out the McAfee custom mof stuff and the query works great.. How about you?

SELECT
	RV.Netbios_Name0 as 'Computer Name',
--	isnull(EPO.McAfeeVirusScanEnterprise, 'n/a') as 'VirusScan Enterprise',
--	isnull(EPO.McAfeeAgent, 'n/a') as 'McAfee Agent',
--	isnull(HIP.HostIntrusionPrevention, 'n/a') as 'Host Intrusion Prevention',
	isnull(RDNS.EnCaseEnterpriseAgent, 'n/a') as 'EnCase Enterprise Agent'
FROM 
	dbo.v_R_System_Valid RV
/*	LEFT OUTER JOIN (
		SELECT 
			RV.Netbios_Name0 AS 'ComputerName', 
			RV.ResourceID AS 'ResourceID',
			ARP.Version0 AS 'McAfeeVirusScanEnterprise', 
			EPO.Version0 AS 'McAfeeAgent'
		FROM 
			dbo.v_R_System_Valid RV
			INNER JOIN dbo.v_Add_Remove_Programs ARP ON RV.ResourceID = ARP.ResourceID 
			INNER JOIN dbo.v_GS_McAfeeEPO0 EPO ON RV.ResourceID = EPO.ResourceID
		WHERE 
			ARP.DisplayName0 like '%VirusScan%' 
			AND EPO.SoftwareID0 = 'EPOAGENT3000'
	) EPO ON RV.ResourceID = EPO.ResourceID
	LEFT OUTER JOIN (
		SELECT 
			EPO.ResourceID AS 'ResourceID',
			EPO.Version0 AS 'HostIntrusionPrevention'
		FROM 
			dbo.v_GS_McAfeeEPO0 EPO
		WHERE 
			EPO.ProductName0 = 'Host Intrusion Prevention'
	) HIP ON RV.ResourceID = HIP.ResourceID*/
	LEFT OUTER JOIN (
		SELECT 
			SF.ResourceID AS 'ResourceID',
			SF.FileVersion AS 'EnCaseEnterpriseAgent'
		FROM 
			dbo.v_GS_SoftwareFile SF
		WHERE 
			SF.FileName = 'RDNS.exe'
	) RDNS 		ON RV.ResourceID = RDNS.ResourceID
ORDER BY 
	RV.Netbios_Name0

Share this post


Link to post
Share on other sites

  • 0

Oh man the new query is much better as it picks up all machines. My previous query was only picking up machines that had VSE installed this shows the status of all machines and teh NULL fields show as n/a. Perfect. Thanks again for all of your help. I picked up a tremendous amount of knowledge in our two days together. :)

Share this post


Link to post
Share on other sites

  • 0

Not a dumb question at all because I believe that was it. So now that i'm aware of the DB drop down I think my focus was on that drop down when I attempted to scroll in another window, inadvertantly changing the DB.

 

I use this trick. http://www.enhansoft.com/blog/invalid-object-name-in-sql-server-management-studio-ssms ;-)

Share this post


Link to post
Share on other sites

  • 0

Thanks. Made that change so that won't happen again.

 

Hopefully last question. I need some MOF help. So I added the McAfee mof using Sherry K.'s steps in this post http://www.myitforum.com/forums/Mcafee-mof-beginner-issues-m242989.aspx.

 

The issue is that is only looking for HKEY_LOCAL_MACHINE\\SOFTWARE\\Network Associates\\ePolicy Orchestrator\\Application Plugins

 

I need to add HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Network Associates\\ePolicy Orchestrator\\Application Plugins

 

Just now sure how to add, do i need to add a new section to the mof or can I just add a second ClassContext?

 

 

EDIT: I added a second [dynamic, ... section to the "McAfee ePO Plugins Enumeration" section. Do i need to do anything after editing the config.mof to get that change to take effect?

 

EDIT2: That seemed to do the trick. Report running perfectly. Thanks again.

//--------------------------------------------
// Mcafee ePO Plugins Enumeration
//--------------------------------------------
#pragma namespace ("\\\\.\\root\\cimv2")
#pragma deleteclass("Win32Reg_Mcafee_ePO_Plugins", NOFAIL)

[dynamic,
provider("RegProv"),
ClassContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Network Associates\\ePolicy Orchestrator\\Application Plugins")
]
class Win32Reg_Mcafee_ePO_Plugins
{
[PropertyContext("Software ID"), key] string SoftwareID;
[PropertyContext("Version")] string Version;
[PropertyContext("Product Name")] string ProductName;
[PropertyContext("Plugin Path")] string PluginPath;
[PropertyContext("Uninstall Command")] string UninstallCommand;
[PropertyContext("Install Path")] string InstallPath;
[PropertyContext("Installed Path")] string InstalledPath;
[PropertyContext("HotFixVersions")] string HotFixVersions;
[PropertyContext("HotFixInstallDate")] string HotFixInstallDate;
[PropertyContext("DatInstallDate")] string DatInstallDate;
[PropertyContext("DatVersion") ] string DatVersion;
};
[dynamic,
provider("RegProv"),
ClassContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Network Associates\\ePolicy Orchestrator\\Application Plugins")
]
class Win32Reg_Mcafee_ePO_Plugins
{
[PropertyContext("Software ID"), key] string SoftwareID;
[PropertyContext("Version")] string Version;
[PropertyContext("Product Name")] string ProductName;
[PropertyContext("Plugin Path")] string PluginPath;
[PropertyContext("Uninstall Command")] string UninstallCommand;
[PropertyContext("Install Path")] string InstallPath;
[PropertyContext("Installed Path")] string InstalledPath;
[PropertyContext("HotFixVersions")] string HotFixVersions;
[PropertyContext("HotFixInstallDate")] string HotFixInstallDate;
[PropertyContext("DatInstallDate")] string DatInstallDate;
[PropertyContext("DatVersion") ] string DatVersion;
};

#pragma namespace ("\\\\.\\root\\cimv2")

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.