Browse by Tags

All Tags » SQL Queries (RSS)

SQL Query To List Add And Remove Programs For A Specified Machine Excluding Updates And Hot Fixes

This SQL Query will allow you to list the installed applications registered in the Add and Remove Applications applet for a specified machine excluding those applications such as Security Updates and Hot...
Posted by dhite | with no comments
Filed under:

SQL Query To Find Machines Rebooted More Than A Month Ago

This SQL Query will list all of the machines in your database that have a reboot date timestamp of more than a month or 30 days. It will write the Machine Name, Last Boot Date timestamp and Last Boot in...
Posted by dhite | with no comments
Filed under:

ConfigMgr 2007 SQL Query To Find Failed Client Deployments

This SQL query will allow you to find machines that have not been successfully deployed. SQL Query: Select NetBiosName 'Machine Name' , DeploymentBeginTime 'Start Time' , LastMessageStateID...
Posted by dhite | with no comments
Filed under:

SQL Query To Retrieve Network Operating System Information For XP Workstations

This SQL query will allow you to gather the following information for all of the XP workstations in your database: Machine Name, Operating system (Caption and Version concatenated), install date, description...
Posted by dhite | with no comments
Filed under:

SQL Query To Find Add And Remove Programs Installed In The Last Week

This SQL query will return all of the machines that have had an application installed in the last week or seven days as recorded in Add and Remove Applications. The Script will not list any security updates...
Posted by dhite | with no comments
Filed under:

SQL Query To Find When Collections Were Last Updated

This SQL query will allow you to see the timestamps for when your sites collections were last updated or modified. SQL Query: Select CC . CollectionID , CN . CollectionName , Convert ( VarChar ( 10 ),...
Posted by dhite | with no comments
Filed under:

SQL Query To Retrieve Advanced Clients Assigned Site Code And Client Version

This SQL Query will allow you to list the assigned site code and client version numbers for your advanced client resources. SQL Query: Select SD . Name0 'Machine Name' , SC . SMS_Assigned_Sites0...
Posted by dhite | with no comments
Filed under:

SQL Query To Gather Video Card Memory Information

This SQL query will gather video card memory information in Megabytes (Mb) for the machines in your database. SQL Query: Select SD . Name0 'Machine Name' , VC . Name0 'Video Card' , Convert...
Posted by dhite | with no comments
Filed under:

SQL Query To See When Collections Were Last Updated

This SQL Query will list all of the collections on the site server from which the query is executed on and will write the collection ID, Collection Name and the time stamp for when the collection was last...
Posted by dhite | with no comments
Filed under:

SQL Query To Get Members Of A Specified Collection

This SQL Query will retrieve the machine names from a specified collection. SQL Query: Select Members . Name 'Collection Members:' From CollectionMembers Members Join Collections Coll on Members...
Posted by dhite | with no comments
Filed under:

SQL Query Get User Information From A Specified OU

This SQL query will return the following information from a specified Organizational Unit (OU): Machine name, User Name, Full name, Users OU and its Subnet. SQL Query: Select Distinct CS . Name0 'Machine...
Posted by dhite | with no comments
Filed under:

SQL Query For Windows Media Player Versions

This SQL query will allow you to retrieve Windows Media Player Version information for resources in your database. SQL Query: Select Distinct v_R_System . Name0 , v_GS_SoftwareFile . FileName , v_GS_SoftwareFile...
Posted by dhite | with no comments
Filed under:

SQL Query To Enumerate ConfigMgr 2007 Boundaries

This SQL query will enumerate your ConfigMgr 2007 site boundaries and will use Case statements for the Boundary Type, Connection and if it is protected or not. SQL Query: Select Value , SiteCode , 'Boundary...
Posted by dhite | with no comments
Filed under:

SQL Query Get Machine and User Information From A Specified Collection

This SQL query will return machine and user information from a specified collection. Included will be the Machine name, Resource domain name, Login user ID, the account use domain, user’s full name...
Posted by dhite | with no comments
Filed under:

Creating A Web Report To Get Machine and User Information From A Specified Collection

This post is based on a previous post entitled: SQL Query Get Machine and User Information From Specified Collection which was a SQL query that would return machine and user information from a specified...
Posted by dhite | with no comments
Filed under:

SQL Query To Retrieve Clients Last Boot up Date

This SQL Query will return machine names and their last boot up date timestamp. Tip: To query an individual machine Change the line that reads Order By 'Machine Name' to Where SD . Name0 = 'MachineName'...
Posted by dhite | with no comments
Filed under:

SQL Query To List Machines With IIS , FTP Or Telnet Installed

This SQL query will list all of the machines that have the World Wide Web Publishing Service, the FTP Publishing Service or the Telnet server services installed by their Service name. SQL Query: Select...
Posted by dhite | with no comments
Filed under:

SQL Query To Count The Number Of Client Machines With McAfee Virus Scan Installed

This SQL query was written as a request from a reader wanting to know how to count the number of machines that have McAfee VirusScan Enterprise installed by using the Add And Remove Programs applet. SQL...
Posted by dhite | with no comments
Filed under:

VBS Script To Open A Web Page

This simple little VBS script can be used as a desktop link or shortcut to open your favorite web page. VBS Script: strURL = "http://myitforum.com" Set objShell = CreateObject( "Wscript...
Posted by dhite | 1 comment(s)
Filed under:

Advertisement Status For Multiple Advertisement IDs

This SQL query will allow you to retrieve Advertisement information for multiple advertisement ID’s. SQL Query: Select OfferName Name , Recieved , Failures , ProgramsStarted Started , ProgramsFailure...
Posted by dhite | with no comments
Filed under:

SQL Query To List Roaming Boundary IP Subnets

This SQL query will return all of the Roaming IP subnet boundaries for a specified site code. SQL Query : Select IPSubnet From RoamingBoundaryIPSubnet Where SiteCode = 'XXX' Order by SiteCode
Posted by dhite | with no comments
Filed under:

SQL Query To Locate Full User Names From A Specified Collection

This SQL query will allow you to retrieve the full user name and login ID name for all machines in a specific collection. SQL Query: Select SD . Name0 'Machine Name' , SD . User_Name0 'Login...
Posted by dhite | with no comments
Filed under:

SQL Query To Find Machines In A Specified Collection Having A Specified Application Installed

This SQL query will allow you to find machines in a specified collection that have a specified application installed. SQL Query: Select SD . Name0 'Machine Name' , SD . Resource_Domain_OR_Workgr0...
Posted by dhite | with no comments
Filed under:

SQL Query To View Web Reports By Category

This SQL Query will allow you to view Web Reports by category for your reference. SQL Query: Select Name , Comment , ReportId , Category From v_Report Where Category = 'Asset Intelligence' Order...
Posted by dhite | with no comments
Filed under:

SQL Query To Retrieve A Users Full Name

This SQL Query will allow you to find the Full Name for a specified users Logon name. SQL Query: Select SD . Name0 'Machine Name' , SD . User_Name0 'Logon Name' , UD . Full_User_Name0 'Full...
Posted by dhite | with no comments
Filed under:

SQL Queries To Locate Client Resources For A Specified Subnet

Provided here are SQL queries that will allow you to locate client resources from a specified subnet. The first example specifies (=) a subnet, the second one uses a wildcard (Like) and finally the third...
Posted by dhite | with no comments
Filed under:

SQL Query To Count Microsoft Office Versions From Add And Remove Programs

This SQL Query will allow you to get a count of the Microsoft Office versions deployed. SQL Query: Select Count ( ResourceID ) Counts , DisplayName0 , Publisher0 , Version0 From v_Add_Remove_Programs Where...
Posted by dhite | with no comments
Filed under:

SQL Query To Enumerate ConfigMgr 2007 Web Reports Information

This SQL Query will list all of the installed Web Reports information for the sever on which the script is executed on. The following information will be displayed: ReportID, Name, Category, Comment and...
Posted by dhite | with no comments
Filed under:

SQL Query To Count Assigned And Installed Resources By Site Code

This SQL Query will allow you to count the assigned and installed resources for a specified site code. SQL Query: Select SC . SiteCode 'Site Code' , ( Select Count ( ResourceId ) From v_RA_System_SMSAssignedSites...
Posted by dhite | with no comments
Filed under:

SQL Quick Counting Script Examples

Provided here are some quick SQL counting scripts to get you started in creating your own count scripts. The first script counts all of the records in the System Discovery table. The second script counts...
Posted by dhite | with no comments
Filed under:
More Posts Next page »