├── favicon.ico ├── images ├── 301.GIF ├── ripple.gif ├── sortdn.png ├── sortup.PNG ├── bsearch.png ├── bsearchx.png ├── warning.png ├── cmwt_check.png ├── cmwtlogo5.PNG ├── icon_add1.png ├── icon_add2.png ├── icon_del1.png ├── icon_del2.png ├── icon_del3.png ├── icon_edit1.png ├── icon_edit2.png ├── ams_btn_search.png └── ams_btn_search2.png ├── CMWT Installation Guide.pdf ├── scripts └── cmwt_db_sqlreports.sql ├── docs ├── CMWT Installation Guide.docx └── LICENSE.txt ├── dp.asp ├── ps.asp ├── reload.asp ├── error.asp ├── dbdefrag.asp ├── services.asp ├── _banner.asp ├── cmroles.asp ├── cmqueries.asp ├── customreports.asp ├── cmaccounts.asp ├── dpgroups.asp ├── cmquery.asp ├── health.asp ├── discoveries.asp ├── test.htm ├── bgroups.asp ├── reportrun.asp ├── LICENSE ├── cmscopes.asp ├── activeusers.asp ├── LICENSE.txt ├── adkcomps.asp ├── models.asp ├── oslist.asp ├── clientsummary.asp ├── vmhosts.asp ├── cmtask.asp ├── boundaries.asp ├── bootimages.asp ├── osimages.asp ├── summarytasks.asp ├── siteconfig.asp ├── wsfb.asp ├── getreports.asp ├── adk.asp ├── _panel1.asp ├── cmtasks.asp ├── ie.asp ├── _config.txt ├── _config.txt.bak ├── _protectedgroups.txt ├── delrec.asp ├── tasksequences.asp ├── model.asp ├── sitedef.asp ├── packages.asp ├── os.asp ├── applications.asp ├── noteedit2.asp ├── _panel4.asp ├── noteadd2.asp ├── _cmwt.js ├── sqlrepadd2.asp ├── sqlreports.asp ├── ie2.asp ├── depsummary.asp ├── clientpush.asp ├── discovery.asp ├── cmrole.asp ├── adrs.asp ├── depsummary2.asp ├── mfrs.asp ├── oulist.asp ├── test.asp ├── _sm.asp ├── sqlrepexp.asp ├── noteadd.asp ├── chassistype.asp ├── logins.asp ├── sqlrepedit2.asp ├── bgroup.asp ├── admin.asp ├── reportsave.asp ├── confirm.asp ├── adr.asp ├── products.asp ├── deployments.asp ├── dupefiles.asp ├── updates.asp ├── sqlrepadd.asp ├── reports.asp ├── sqlrun.asp ├── noteedit.asp ├── reportedit2.asp ├── test2.asp ├── cmwtlogclear2.asp ├── dpgroup.asp ├── _panel3.asp ├── cmtools.asp ├── app.asp ├── mydevice.asp ├── about.asp ├── clients.asp ├── cmwtlog.asp ├── adtools.asp ├── notes.asp ├── sqlrepdel.asp ├── colltools.asp ├── adprinter.asp ├── appvendors.asp ├── adgpos.asp ├── admod.asp ├── vendorapps.asp ├── sqlrepedit.asp ├── cmwtlogclear.asp ├── diag.asp ├── _panel2.asp ├── addc.asp ├── _panel5.asp ├── config.vbs ├── compstatus2.asp ├── sitelogs.asp ├── service.asp ├── adprinters.asp ├── cmwtlogs.asp ├── _chart2.asp ├── cmusers.asp ├── assets.asp └── adsites.asp /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/favicon.ico -------------------------------------------------------------------------------- /images/301.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/301.GIF -------------------------------------------------------------------------------- /images/ripple.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/ripple.gif -------------------------------------------------------------------------------- /images/sortdn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/sortdn.png -------------------------------------------------------------------------------- /images/sortup.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/sortup.PNG -------------------------------------------------------------------------------- /images/bsearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/bsearch.png -------------------------------------------------------------------------------- /images/bsearchx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/bsearchx.png -------------------------------------------------------------------------------- /images/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/warning.png -------------------------------------------------------------------------------- /images/cmwt_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/cmwt_check.png -------------------------------------------------------------------------------- /images/cmwtlogo5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/cmwtlogo5.PNG -------------------------------------------------------------------------------- /images/icon_add1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/icon_add1.png -------------------------------------------------------------------------------- /images/icon_add2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/icon_add2.png -------------------------------------------------------------------------------- /images/icon_del1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/icon_del1.png -------------------------------------------------------------------------------- /images/icon_del2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/icon_del2.png -------------------------------------------------------------------------------- /images/icon_del3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/icon_del3.png -------------------------------------------------------------------------------- /images/icon_edit1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/icon_edit1.png -------------------------------------------------------------------------------- /images/icon_edit2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/icon_edit2.png -------------------------------------------------------------------------------- /CMWT Installation Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/CMWT Installation Guide.pdf -------------------------------------------------------------------------------- /images/ams_btn_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/ams_btn_search.png -------------------------------------------------------------------------------- /images/ams_btn_search2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/images/ams_btn_search2.png -------------------------------------------------------------------------------- /scripts/cmwt_db_sqlreports.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/scripts/cmwt_db_sqlreports.sql -------------------------------------------------------------------------------- /docs/CMWT Installation Guide.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Skatterbrainz/CMWT/HEAD/docs/CMWT Installation Guide.docx -------------------------------------------------------------------------------- /dp.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /ps.asp: -------------------------------------------------------------------------------- 1 | <% 2 | On Error Resume Next 3 | Set objshell = Server.CreateObject("Wscript.Shell") 4 | 'response.write objShell.ExpandEnvironmentStrings("%USERNAME%") 5 | 'cmdStatement = "powershell.exe -ExecutionPolicy ByPass -Command Stop-Service MpsSvc -Force" 6 | 'exitCode = objShell.Run( cmdStatement, 0, True ) 7 | 'response.write exitCode 8 | x = objShell.run("powershell -executionpolicy bypass -windowstyle hidden -file f:\cmwt\scripts\test.ps1") 9 | response.write x 10 | %> -------------------------------------------------------------------------------- /reload.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: reload.asp 5 | ' Date......: 03/20/2016 6 | ' Purpose...: reload session state 7 | '**************************************************************** 8 | 9 | 'Application.Lock 10 | 'Application.Contents.RemoveAll() 11 | 'Application.Unlock 12 | 'Session.Contents.RemoveAll() 13 | 'Session.Abandon() 14 | 15 | caption = "Reloading Application" 16 | 17 | CMWT_PageRedirect "./", 2 18 | 19 | %> 20 | -------------------------------------------------------------------------------- /error.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | Msg = CMWT_GET("m", "Unknown Error") 4 | time1 = Timer 5 | PageTitle = "Error Report" 6 | 7 | CMWT_NewPage "", "", "" 8 | %> 9 | 10 | 11 | 12 | 13 | 14 | 30 | 31 |
15 | 16 |

Error / Exception Report

17 | 18 | 19 | 20 | 24 | 25 |
21 |

<%=Msg%>

22 |

<%=Request.ServerVariables("HTTP_REFERRER")%>

23 |
26 | 27 |

Go Back

28 | 29 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /dbdefrag.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... dbdefrag.asp 5 | ' lastupdate..... 12/04/2016 6 | ' description.... defragment site sql server database index 7 | '----------------------------------------------------------------------------- 8 | confirm = CMWT_GET("x", "") 9 | IF Not CMWT_ADMIN() Then 10 | CMWT_STOP "Access Denied!" 11 | End If 12 | 13 | If confirm = "yes" Then 14 | caption = "Defragmenting SQL Database indexes" 15 | query = "EXEC sp_MSforeachtable @command1=""print '?' DBCC DBREINDEX ('?', ' ', 80)"";" 16 | Set conn = Server.CreateObject("ADODB.Connection") 17 | On Error Resume Next 18 | conn.ConnectionTimeOut = 5 19 | conn.Open Application("DSN_CMDB") 20 | conn.Execute query 21 | conn.Close 22 | Set conn = Nothing 23 | Else 24 | caption = "No confirmation code provided." 25 | End If 26 | 27 | CMWT_PageRedirect "dbstatus.asp", 5 28 | %> 29 | -------------------------------------------------------------------------------- /services.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... services.asp 5 | ' lastupdate..... 05/23/2017 6 | ' description.... site system windows services status 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | SortBy = CMWT_GET("s", "DisplayName") 10 | QueryON = CMWT_GET("qq", "") 11 | 12 | PageTitle = "Services" 13 | PageBackLink = "cmsite.asp" 14 | PageBackName = "Site Hierarchy" 15 | CMWT_NewPage "", "", "" 16 | %> 17 | 18 | 19 | <% 20 | wmi_columns = "DisplayName,Name,StartMode,State,StartName" 21 | wmi_class = "Win32_Service" 22 | query = "SELECT " & wmi_columns & " FROM " & wmi_class 23 | CMWT_WMI_TABLEGRID ".", wmi_columns, wmi_class, "", sortby, "Name=service.asp?sn=" 24 | CMWT_SHOW_QUERY() 25 | CMWT_Footer() 26 | Response.Write "" 27 | %> 28 | -------------------------------------------------------------------------------- /_banner.asp: -------------------------------------------------------------------------------- 1 | <% 2 | '----------------------------------------------------------------------------- 3 | ' filename....... _banner.asp 4 | ' lastupdate..... 03/01/2017 5 | ' description.... CMWT heading banner page 6 | '----------------------------------------------------------------------------- 7 | %> 8 | 9 | 10 | 13 | 20 | 21 |
11 | CMWT - Configuration Manager Web Tools :: Today is <%=FormatDateTime(Now,vbLongDate)%> 12 | 14 |
15 | 16 | 17 | 18 |
19 |
22 | -------------------------------------------------------------------------------- /cmroles.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... cmroles.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... security roles 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | PageTitle = "Site Roles" 10 | PageBackLink = "cmsite.asp" 11 | PageBackName = "Site Hierarchy" 12 | SortBy = CMWT_GET("s", "RoleName") 13 | QueryOn = CMWT_GET("qq", "") 14 | 15 | CMWT_NewPage "", "", "" 16 | %> 17 | 18 | 19 | <% 20 | 21 | query = "SELECT RoleName,RoleDescription,NumberOfAdmins AS Members " & _ 22 | "FROM dbo.vRBAC_Roles " & _ 23 | "ORDER BY " & SortBy 24 | 25 | Dim conn, cmd, rs 26 | CMWT_DB_QUERY Application("DSN_CMDB"), query 27 | CMWT_DB_TABLEGRID rs, "", "cmroles.asp", "" 28 | CMWT_DB_CLOSE() 29 | CMWT_SHOW_QUERY() 30 | CMWT_Footer() 31 | %> 32 | 33 | 34 | -------------------------------------------------------------------------------- /cmqueries.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: cmqueries.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 12/10/2016 7 | ' Purpose...: configmgr queries 8 | '**************************************************************** 9 | time1 = Timer 10 | SortBy = CMWT_GET("s", "Name") 11 | QueryON = CMWT_GET("qq", "") 12 | 13 | PageTitle = "Queries" 14 | PageBackLink = "cmsite.asp" 15 | PageBackName = "Site Hierarchy" 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | <% 22 | 23 | query = "SELECT DISTINCT " & _ 24 | "QueryID, Name, Comments, TargetClassName " & _ 25 | "FROM dbo.v_Query " & _ 26 | "ORDER BY " & SortBY 27 | Dim conn, cmd, rs 28 | CMWT_DB_QUERY Application("DSN_CMDB"), query 29 | CMWT_DB_TABLEGRID rs, "", "cmqueries.asp", "" 30 | CMWT_DB_CLOSE() 31 | CMWT_SHOW_QUERY() 32 | CMWT_Footer() 33 | Response.Write "" 34 | %> 35 | -------------------------------------------------------------------------------- /customreports.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... customreports.asp 5 | ' lastupdate..... 12/03/2016 6 | ' description.... custom reports list 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "ReportName") 11 | QueryON = CMWT_GET("qq", "") 12 | 13 | PageTitle = "Custom Reports" 14 | PageBackLink = "reports.asp" 15 | PageBackName = "Reports" 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT DISTINCT ReportID,ReportName,Comment,DateCreated " & _ 23 | "FROM dbo.Reports " & _ 24 | "ORDER BY " & SortBy 25 | 26 | Dim conn, cmd, rs 27 | CMWT_DB_QUERY Application("DSN_CMWT"), query 28 | CMWT_DB_TABLEGRID rs, "", "customreports.asp", "" 29 | CMWT_DB_CLOSE() 30 | CMWT_SHOW_QUERY() 31 | CMWT_FOOTER() 32 | %> 33 | 34 | 35 | -------------------------------------------------------------------------------- /cmaccounts.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... cmaccounts.asp 5 | ' lastupdate..... 12/10/2016 6 | ' description.... site accounts 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "FeatureName") 11 | QueryOn = CMWT_GET("qq", "") 12 | 13 | PageTitle = "Site Accounts" 14 | PageBackLink = "cmsite.asp" 15 | PageBackName = "Site Hierarchy" 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | <% 22 | 23 | query = "SELECT UsageName AS FeatureName,UserName " & _ 24 | "FROM dbo.vSMS_SC_AccountUsage " & _ 25 | "ORDER BY " & SortBy 26 | 27 | Dim conn, cmd, rs 28 | CMWT_DB_QUERY Application("DSN_CMDB"), query 29 | CMWT_DB_TABLEGRID rs, "", "cmaccounts.asp", "" 30 | CMWT_DB_CLOSE() 31 | CMWT_SHOW_QUERY() 32 | CMWT_Footer() 33 | Response.Write "" 34 | %> 35 | -------------------------------------------------------------------------------- /dpgroups.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... dpgroups.asp 5 | ' lastupdate..... 12/09/2016 6 | ' description.... distribution point groups report 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "Name") 11 | QueryOn = CMWT_GET("qq", "") 12 | PageTitle = "Distribution Point Groups" 13 | PageBackLink = "cmsite.asp" 14 | PageBackName = "Site Hierarchy" 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | 23 | query = "SELECT Name AS DPGroup,Description,MembersCount " & _ 24 | "FROM dbo.vSMS_DPGroupInfo " & _ 25 | "ORDER BY " & SortBy 26 | 27 | Dim conn, cmd, rs 28 | CMWT_DB_QUERY Application("DSN_CMDB"), query 29 | CMWT_DB_TABLEGRID rs, "", "dpgroups.asp", "" 30 | CMWT_DB_CLOSE() 31 | CMWT_SHOW_QUERY() 32 | CMWT_Footer() 33 | Response.Write "" 34 | %> 35 | -------------------------------------------------------------------------------- /cmquery.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: cmquery.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 11/27/2016 7 | ' Purpose...: configmgr query details 8 | '**************************************************************** 9 | time1 = Timer 10 | 11 | KeyValue = CMWT_GET("id", "") 12 | SortBy = CMWT_GET("s", "Name") 13 | QueryON = CMWT_GET("qq", "") 14 | 15 | PageTitle = "Query: " & KeyValue 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | <% 22 | 23 | query = "SELECT " & _ 24 | "Name,QueryKey,Comments,Architecture," & _ 25 | "Lifetime,QryFmtKey,QueryType, " & _ 26 | "CollectionID,WQL,SQL " & _ 27 | "FROM dbo.Queries " & _ 28 | "WHERE QueryKey = '" & KeyValue & "'" 29 | 30 | Dim conn, cmd, rs 31 | CMWT_DB_QUERY Application("DSN_CMDB"), query 32 | CMWT_DB_TABLEROWGRID rs, "", "", "" 33 | CMWT_DB_CLOSE() 34 | CMWT_SHOW_QUERY() 35 | CMWT_Footer() 36 | %> 37 | 38 | 39 | -------------------------------------------------------------------------------- /health.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: health.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 03/01/2017 7 | ' Purpose...: site server windows services status 8 | '**************************************************************** 9 | time1 = Timer 10 | SortBy = CMWT_GET("s", "DisplayName") 11 | QueryON = CMWT_GET("qq", "") 12 | 13 | PageTitle = "Services" 14 | PageBackLink = "cmsite.asp" 15 | PageBackName = "Site Hierarchy" 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | wmi_columns = "DisplayName,Name,StartMode,State,StartName" 22 | wmi_class = "Win32_Service" 23 | 'query = "SELECT " & wmi_columns & " FROM " & wmi_class & " WHERE (StartMode='Auto' AND State='Stopped')" 24 | CMWT_WMI_TABLEGRID2 ".", wmi_columns, wmi_class, "StartMode='Auto' AND State='Stopped'", "", "DisplayName", "Name=service.asp?sn=" 25 | CMWT_SHOW_QUERY() 26 | CMWT_Footer() 27 | Response.Write "" 28 | %> 29 | -------------------------------------------------------------------------------- /discoveries.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: discoveries.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 11/30/2016 7 | ' Purpose...: site discovery settings summary 8 | '**************************************************************** 9 | time1 = Timer 10 | 11 | PageTitle = "Discovery Methods" 12 | PageBackLink = "cmsite.asp" 13 | PageBackName = "Site Hierarchy" 14 | SortBy = CMWT_GET("s", "Discovery") 15 | QueryON = CMWT_GET("qq", "") 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | <% 22 | 23 | query = "SELECT DISTINCT ComponentName AS Discovery " & _ 24 | "FROM dbo.vSMS_SC_Component " & _ 25 | "WHERE ComponentName LIKE '%DISC%' " & _ 26 | "ORDER BY " & SortBY 27 | 28 | Dim conn, cmd, rs 29 | CMWT_DB_QUERY Application("DSN_CMDB"), query 30 | CMWT_DB_TABLEGRID rs, "", "", "DISCOVERY=discovery.asp?dm=" 31 | CMWT_DB_CLOSE() 32 | CMWT_SHOW_QUERY() 33 | CMWT_Footer() 34 | %> 35 | 36 | 37 | -------------------------------------------------------------------------------- /test.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | CMWT Test Page 4 | 5 | 6 | 7 | 8 | 9 | ConfigMgr Web Tools 10 | 11 | 12 | 13 | 35 | 36 |
14 |
15 |

Welcome to CMWT!

16 | 17 |

CMWT Site Testing Process

18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
HTMLPassed!
ASP
Database(pending)
33 | 34 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /bgroups.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... bgroups.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... site boundary groups 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | PageTitle = "Boundary Groups" 10 | PageBackLink = "cmsite.asp" 11 | PageBackName = "Site Hierarchy" 12 | SortBy = CMWT_GET("s", "BoundaryGroup") 13 | QueryOn = CMWT_GET("qq", "") 14 | 15 | CMWT_NewPage "", "", "" 16 | 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT Name AS BoundaryGroup,GroupID,Description,DefaultSiteCode," & _ 23 | "MemberCount,SiteSystemCount,Shared " & _ 24 | "FROM dbo.vSMS_BoundaryGroup " & _ 25 | "ORDER BY " & SortBy 26 | 27 | Dim conn, cmd, rs 28 | CMWT_DB_QUERY Application("DSN_CMDB"), query 29 | CMWT_DB_TABLEGRID rs, "", "bgroups.asp", "NAME^bdp.asp?gn=" 30 | CMWT_DB_CLOSE() 31 | CMWT_SHOW_Query() 32 | CMWT_Footer() 33 | %> 34 | 35 | 36 | -------------------------------------------------------------------------------- /reportrun.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... reportrun.asp 5 | ' lastupdate..... 12/09/2016 6 | ' description.... run a custom report 7 | '----------------------------------------------------------------------------- 8 | ReportID = CMWT_GET("id", "") 9 | RunMode = CMWT_GET("rm", "1") 10 | 11 | CMWT_VALIDATE ReportID, "Report ID value was not provided" 12 | 13 | query = "SELECT TOP 1 SearchField, SearchValue, SearchMode, DisplayColumns " & _ 14 | "FROM dbo.Reports " & _ 15 | "WHERE ReportID=" & ReportID 16 | 17 | Dim conn, cmd, rs 18 | CMWT_DB_QUERY Application("DSN_CMWT"), query 19 | 20 | SearchField = rs.Fields("SearchField").value 21 | SearchValue = rs.Fields("SearchValue").value 22 | SearchMode = rs.Fields("SearchMode").value 23 | OutputFields = rs.Fields("DisplayColumns").value 24 | 25 | CMWT_DB_CLOSE() 26 | 27 | TargetURL = "report1.asp?id=" & ReportID & "&fn=" & SearchField & "&fv=" & SearchValue & "&m=" & SearchMode & "&of=" & OutputFields & "&rm=" & RunMode 28 | Response.Redirect TargetURL 29 | %> -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2017 David M. Stein 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 David M. Stein 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /cmscopes.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... cmscopes.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... security scopes 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | PageTitle = "Site Security Scopes" 10 | PageBackLink = "cmsite.asp" 11 | PageBackName = "Site Hierarchy" 12 | SortBy = CMWT_GET("s", "ScopeName") 13 | QueryOn = CMWT_GET("qq", "") 14 | 15 | CMWT_NewPage "", "", "" 16 | %> 17 | 18 | 19 | <% 20 | 21 | query = "SELECT DISTINCT CategoryName AS ScopeName, " & _ 22 | "CategoryDescription AS Description,SourceSite AS SiteCode, " & _ 23 | "NumberOfAdmins AS Admins,NumberOfObjects AS Objects " & _ 24 | "FROM dbo.vRBAC_SecuredCategories " & _ 25 | "ORDER BY " & SortBy 26 | 27 | Dim conn, cmd, rs 28 | CMWT_DB_QUERY Application("DSN_CMDB"), query 29 | CMWT_DB_TABLEGRID rs, "", "cmscopes.asp", "" 30 | CMWT_DB_CLOSE() 31 | CMWT_SHOW_QUERY() 32 | CMWT_Footer() 33 | %> 34 | 35 | 36 | -------------------------------------------------------------------------------- /activeusers.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... activeusers.asp 5 | ' lastupdate..... 12/03/2016 6 | ' description.... current user sessions 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | IF Not CMWT_ADMIN() Then 10 | CMWT_STOP "Access Denied!" 11 | End If 12 | 13 | PageTitle = "Active Site Users" 14 | PageBackLink = "admin.asp" 15 | PageBackName = "Administration" 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | Response.Write "" 23 | 24 | ucount = 0 25 | For each sv in Split(Application("CMWT_USERLIST"),",") 26 | Response.Write "" & _ 27 | "" & _ 28 | "" 29 | ucount = ucount + 1 30 | Next 31 | 32 | Response.Write "
UserID
" & sv & "
" & ucount & " active users found
" 33 | 34 | CMWT_Footer() 35 | %> 36 | 37 | 38 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2017 David M. Stein 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /adkcomps.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: adkcomps.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 12/10/2016 7 | ' Purpose...: windows adk components 8 | '**************************************************************** 9 | time1 = Timer 10 | 11 | PageTitle = "Boot Image Components" 12 | PageBackLink = "software.asp" 13 | PageBackName = "Software" 14 | 15 | SortBy = CMWT_GET("s", "Name") 16 | QueryON = CMWT_GET("qq", "") 17 | 18 | CMWT_NewPage "", "", "" 19 | %> 20 | 21 | 22 | <% 23 | 24 | query = "SELECT DISTINCT " & _ 25 | "DeploymentKitVersion AS ADKVersion, " & _ 26 | "UniqueID,Architecture,ComponentID,Name," & _ 27 | "MsiComponentID,Size " & _ 28 | "FROM dbo.vSMS_OSDeploymentKitWinPEOptionalComponents " & _ 29 | "ORDER BY " & SortBy 30 | 31 | Dim conn, cmd, rs 32 | CMWT_DB_QUERY Application("DSN_CMDB"), query 33 | CMWT_DB_TABLEGRID rs, "", "adkcomps.asp", "" 34 | CMWT_DB_CLOSE() 35 | CMWT_SHOW_Query() 36 | CMWT_Footer() 37 | Response.Write "" 38 | %> 39 | -------------------------------------------------------------------------------- /models.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '----------------------------------------------------------------------------- 5 | ' filename....... models.asp 6 | ' lastupdate..... 11/30/2016 7 | ' description.... distinct hardware models in hw inventory 8 | '----------------------------------------------------------------------------- 9 | time1 = Timer 10 | 11 | PageTitle = "Computer Models" 12 | PageBackLink = "assets.asp" 13 | PageBackName = "Assets" 14 | 15 | SortBy = CMWT_GET("s", "Model0") 16 | QueryOn = CMWT_GET("qq", "") 17 | 18 | CMWT_NewPage "", "", "" 19 | %> 20 | 21 | 22 | <% 23 | 24 | query = "SELECT DISTINCT Model0 AS ModelName, COUNT(*) AS QTY " & _ 25 | "FROM (" & q_devices & ") AS T1 " & _ 26 | "WHERE (T1.Model0 IS NOT NULL) " & _ 27 | "GROUP BY T1.Model0 " & _ 28 | "ORDER BY " & SortBy 29 | 30 | Dim conn, cmd, rs 31 | CMWT_DB_QUERY Application("DSN_CMDB"), query 32 | CMWT_DB_TABLEGRID rs, "", "models.asp", "" 33 | CMWT_DB_CLOSE() 34 | 35 | CMWT_SHOW_QUERY() 36 | CMWT_Footer() 37 | %> 38 | 39 | 40 | -------------------------------------------------------------------------------- /oslist.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '----------------------------------------------------------------------------- 5 | ' filename....... oslist.asp 6 | ' lastupdate..... 12/03/2016 7 | ' description.... operating systems inventory counds 8 | '----------------------------------------------------------------------------- 9 | time1 = Timer 10 | 11 | SortBy = CMWT_GET("s", "Caption0") 12 | QueryON = CMWT_GET("qq", "") 13 | tcount = CMWT_CM_CLIENTCOUNT() 14 | PageTitle = "Operating Systems Summary" 15 | PageBackLink = "software.asp" 16 | PageBackName = "Software" 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | <% 22 | query = "SELECT COALESCE(Caption0, 'UNKNOWN') AS OSCaption, COUNT(DISTINCT Name0) AS QTY " & _ 23 | "FROM (" & q_devices & ") AS T1 " & _ 24 | "GROUP BY T1.Caption0 " & _ 25 | "ORDER BY " & SortBy 26 | 27 | Dim conn, cmd, rs 28 | CMWT_DB_QUERY Application("DSN_CMDB"), query 29 | CMWT_DB_TABLEGRID rs, "", "oslist.asp", "" 30 | CMWT_DB_CLOSE() 31 | CMWT_SHOW_QUERY() 32 | CMWT_FOOTER() 33 | 34 | %> 35 | 36 | -------------------------------------------------------------------------------- /clientsummary.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '**************************************************************** 5 | ' Filename..: clientsummary.asp 6 | ' Date......: 11/30/2016 7 | ' Purpose...: client agent deployment summary 8 | '**************************************************************** 9 | time1 = Timer 10 | 11 | PageTitle = "Computers by Client Status" 12 | SortBy = CMWT_GET("s", "Caption0") 13 | QueryON = CMWT_GET("qq", "") 14 | 15 | tcount = CMWT_CM_CLIENTCOUNT() 16 | 17 | CMWT_NewPage "", "", "" 18 | PageBackLink = "cmsite.asp" 19 | PageBackName = "Site Hierarchy" 20 | %> 21 | 22 | 23 | <% 24 | 25 | query = "SELECT CASE WHEN Client0 = 1 THEN 'Client Installed' " & _ 26 | "ELSE 'No Client' END AS ItemName, COUNT(DISTINCT ResourceID) AS QTY " & _ 27 | "FROM dbo.v_R_System " & _ 28 | "GROUP BY Client0 ORDER BY ItemName" 29 | 30 | Dim conn, cmd, rs 31 | CMWT_DB_QUERY Application("DSN_CMDB"), query 32 | CMWT_DB_TABLEGRID rs, "", "", "" 33 | CMWT_DB_CLOSE() 34 | CMWT_SHOW_QUERY() 35 | CMWT_Footer() 36 | %> 37 | 38 | 39 | -------------------------------------------------------------------------------- /vmhosts.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... vmhosts.asp 5 | ' lastupdate..... 12/04/2016 6 | ' description.... virtual machine hosts 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | QueryOn = CMWT_GET("qq", "") 10 | SortBy = CMWT_GET("s","VMHost") 11 | 12 | PageTitle = "Virtual Hosts" 13 | PageBackLink = "assets.asp" 14 | PageBackName = "Assets" 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT DISTINCT Virtual_Machine_Host_Name0 AS VMHOST, COUNT(ResourceID) AS Guests " & _ 23 | "FROM dbo.v_R_System " & _ 24 | "WHERE (Virtual_Machine_Host_Name0 IS NOT NULL) AND (LTRIM(Virtual_Machine_Host_Name0) <> '') " & _ 25 | "GROUP BY Virtual_Machine_Host_Name0 " & _ 26 | "ORDER BY " & SortBy 27 | Dim conn, cmd, rs 28 | CMWT_DB_QUERY Application("DSN_CMDB"), query 29 | CMWT_DB_TABLEGRID rs, "", "vmhosts.asp", "" 30 | CMWT_DB_CLOSE() 31 | CMWT_SHOW_QUERY() 32 | CMWT_Footer() 33 | Response.Write "" 34 | %> -------------------------------------------------------------------------------- /cmtask.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: cmtask.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 11/30/2016 7 | ' Purpose...: site maintenance task details 8 | '**************************************************************** 9 | time1 = Timer 10 | 11 | TaskName = CMWT_GET("tn", "") 12 | SortBy = CMWT_GET("s", "TaskName") 13 | QueryON = CMWT_GET("qq", "") 14 | PageTitle = "Maintenance Task" 15 | 16 | CMWT_NewPage "", "", "" 17 | PageBackLink = "cmtasks.asp" 18 | PageBackName = "Maintenance Tasks" 19 | %> 20 | 21 | 22 | <% 23 | 24 | 25 | query = "SELECT [TaskName]," & _ 26 | "[TaskType],[IsEnabled],[NumRefreshDays],[DaysOfWeek]," & _ 27 | "[BeginTime],[LatestBeginTime],[BackupLocation],[DeleteOlderThan] " & _ 28 | "FROM [dbo].[vSMS_SC_SQL_Task] " & _ 29 | "WHERE TaskName='" & TaskName & "'" 30 | 31 | Dim conn, cmd, rs 32 | CMWT_DB_QUERY Application("DSN_CMDB"), query 33 | CMWT_DB_TABLEGRID rs, "", "", "" 34 | CMWT_DB_CLOSE() 35 | CMWT_SHOW_QUERY() 36 | CMWT_Footer() 37 | %> 38 | 39 | 40 | -------------------------------------------------------------------------------- /boundaries.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... boundaries.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... site boundaries report 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "DisplayName") 11 | QueryOn = CMWT_GET("qq", "") 12 | PageTitle = "Site Boundaries" 13 | PageBackLink = "cmsite.asp" 14 | PageBackName = "Site Hierarchy" 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | query = "SELECT DISTINCT BoundaryID, DisplayName, " & _ 22 | "CASE WHEN BoundaryType=1 THEN 'Site' " & _ 23 | "WHEN BoundaryType=3 THEN 'IP Range' " & _ 24 | "ELSE '' END AS BoundaryTypeName, " & _ 25 | "Value, GroupCount " & _ 26 | "FROM dbo.vSMS_Boundary " & _ 27 | "ORDER BY " & SortBy 28 | 29 | Dim conn, cmd, rs 30 | CMWT_DB_QUERY Application("DSN_CMDB"), query 31 | CMWT_DB_TABLEGRID rs, "", "boundaries.asp", "" 32 | CMWT_DB_CLOSE() 33 | CMWT_SHOW_QUERY() 34 | CMWT_Footer() 35 | %> 36 | 37 | 38 | -------------------------------------------------------------------------------- /bootimages.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... bootimages.asp 5 | ' lastupdate..... 12/12/2016 6 | ' description.... boot images report 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | QueryOn = CMWT_GET("qq", "") 10 | SortBy = CMWT_GET("s","Name") 11 | 12 | PageTitle = "Boot Images" 13 | PageBackLink = "software.asp" 14 | PageBackName = "Software" 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | query = "SELECT DISTINCT " & _ 22 | "PackageID AS PkgID, " & _ 23 | "Name," & _ 24 | "Version," & _ 25 | "Language," & _ 26 | "PkgSourcePath AS SourcePath," & _ 27 | "SourceVersion," & _ 28 | "CONVERT(varchar(10),SourceDate,101)," & _ 29 | "SourceSite " & _ 30 | "FROM dbo.v_BootImagePackage " & _ 31 | "ORDER BY " & SortBy 32 | Dim conn, cmd, rs 33 | CMWT_DB_QUERY Application("DSN_CMDB"), query 34 | CMWT_DB_TABLEGRID rs, "", "", "" 35 | CMWT_DB_CLOSE() 36 | CMWT_SHOW_QUERY() 37 | CMWT_Footer() 38 | Response.Write "" 39 | %> -------------------------------------------------------------------------------- /osimages.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... osimages.asp 5 | ' lastupdate..... 01/02/2017 6 | ' description.... operating system images 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "Name") 11 | QueryON = CMWT_GET("qq", "") 12 | 13 | PageTitle = "OS Images" 14 | PageBackLink = "software.asp" 15 | PageBackName = "Software" 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT PackageID, " & _ 23 | "Name, " & _ 24 | "OSVersion, " & _ 25 | "Language, " & _ 26 | "ProductType, " & _ 27 | "ROUND(Size/1024/1024/1024,8,3) AS [SIZE] " & _ 28 | "FROM dbo.vSMS_ImageInformation " & _ 29 | "WHERE Name NOT LIKE '%Windows PE%' " & _ 30 | "ORDER BY " & SortBy 31 | 32 | Dim conn, cmd, rs 33 | CMWT_DB_QUERY Application("DSN_CMDB"), query 34 | CMWT_DB_TABLEGRID rs, "", "osimages.asp", "" 35 | CMWT_DB_CLOSE() 36 | CMWT_SHOW_QUERY() 37 | CMWT_FOOTER() 38 | 39 | Response.Write "" 40 | %> 41 | -------------------------------------------------------------------------------- /summarytasks.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: summarytasks.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 11/30/2016 7 | ' Purpose...: summary tasks detail report 8 | '**************************************************************** 9 | time1 = Timer 10 | 11 | PageTitle = "Summary Tasks" 12 | PageBackLink = "cmsite.asp" 13 | PageBackName = "Site Hierarchy" 14 | SortBy = CMWT_GET("s", "TaskName") 15 | QueryON = CMWT_GET("qq", "") 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | <% 22 | 23 | query = "SELECT DISTINCT " & _ 24 | "TaskName,TaskCommand,RunInterval,LastRunDuration," & _ 25 | "LastSuccessfulCompletionTime,LastRunResult," & _ 26 | "CASE WHEN([Enabled]=1) THEN 1 " & _ 27 | "ELSE 0 END AS [IsEnabled] " & _ 28 | "FROM dbo.v_SummaryTasks " & _ 29 | "ORDER BY " & SortBy 30 | 31 | Dim conn, cmd, rs 32 | CMWT_DB_QUERY Application("DSN_CMDB"), query 33 | CMWT_DB_TABLEGRID rs, "", "summarytasks.asp", "" 34 | CMWT_DB_CLOSE() 35 | CMWT_SHOW_QUERY() 36 | CMWT_Footer() 37 | %> 38 | 39 | 40 | -------------------------------------------------------------------------------- /siteconfig.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... siteconfig.asp 5 | ' lastupdate..... 05/23/2017 6 | ' description.... site configuration table report 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | SortBy = CMWT_GET("s", "RoleName") 10 | QueryON = CMWT_GET("qq", "") 11 | KeyValue = CMWT_GET("id", "") 12 | KeySet = CMWT_GET("ks", "1") 13 | 14 | PageTitle = "Site Configuration" 15 | 16 | CMWT_NewPage "", "", "" 17 | PageBackLink = "cmsite.asp" 18 | PageBackName = "Site Hierarchy" 19 | %> 20 | 21 | 22 | <% 23 | query = "SELECT RoleName AS Role_Name,SiteCode,RoleID,State,Configuration," & _ 24 | "MessageID,LastEvaluatingTime,Param1,Param2,Param3,Param4,Param5,Param6 " & _ 25 | "FROM dbo.vCM_SiteConfiguration " & _ 26 | "ORDER BY " & SortBy 27 | Dim conn, cmd, rs 28 | CMWT_DB_QUERY Application("DSN_CMDB"), query 29 | CMWT_DB_TABLEGRID rs, "", "app.asp?pn=" & pn, "" 30 | CMWT_DB_CLOSE() 31 | CMWT_SHOW_QUERY() 32 | CMWT_Footer() 33 | %> 34 | 35 | 36 | -------------------------------------------------------------------------------- /wsfb.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... wsfb.asp 5 | ' lastupdate..... 01/02/2017 6 | ' description.... windows store for business configurations 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "TenantID") 11 | QueryON = CMWT_GET("qq", "") 12 | 13 | PageTitle = "Windows Store for Business" 14 | PageBackLink = "cmsite.asp" 15 | PageBackName = "Site Hierarchy" 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT TOP 1 " & _ 23 | "TenantID, " & _ 24 | "ClientID, " & _ 25 | "ContentLocation, " & _ 26 | "DefaultLocale, " & _ 27 | "LastSyncStatus, " & _ 28 | "LastSyncTime, " & _ 29 | "LastSuccessfulSyncTime " & _ 30 | "FROM dbo.vWSfBConfigurationData " 31 | 32 | Dim conn, cmd, rs 33 | CMWT_DB_QUERY Application("DSN_CMDB"), query 34 | CMWT_DB_TABLEROWGRID rs, "", "wsfb.asp", "" 35 | CMWT_DB_CLOSE() 36 | CMWT_SHOW_QUERY() 37 | CMWT_FOOTER() 38 | 39 | Response.Write "" 40 | %> 41 | -------------------------------------------------------------------------------- /getreports.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... getreports.asp 5 | ' lastupdate..... 12/07/2016 6 | ' description.... custom reports list 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "ReportName") 11 | QueryON = CMWT_GET("qq", "") 12 | 13 | PageTitle = "Custom Reports" 14 | PageBackLink = "reports.asp" 15 | PageBackName = "Reports" 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT DISTINCT " & _ 23 | "ReportID, ReportType, ReportName, " & _ 24 | "CreatedBy, DateCreated, Comment " & _ 25 | "FROM dbo.Reports2 " & _ 26 | "ORDER BY " & SortBy 27 | 28 | Dim conn, cmd, rs 29 | CMWT_DB_QUERY Application("DSN_CMWT"), query 30 | CMWT_DB_TABLEGRID rs, "", "customreports.asp", "" 31 | CMWT_DB_CLOSE() 32 | Response.Write "
" 33 | CMWT_SHOW_QUERY() 34 | CMWT_FOOTER() 35 | 36 | Response.Write "" 37 | %> 38 | -------------------------------------------------------------------------------- /adk.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: adk.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 03/21/2016 7 | ' Purpose...: windows adk installation information 8 | '**************************************************************** 9 | time1 = Timer 10 | 11 | pageTitle = "ADK Properties" 12 | SortBy = CMWT_GET("s", "Name") 13 | QueryON = CMWT_GET("qq", "") 14 | 15 | CMWT_NewPage "", "", "" 16 | %> 17 | 18 | 19 | <% 20 | 21 | query = "SELECT DeploymentKitVersion AS ADKVersion,NetBiosName,FQDN " & _ 22 | "FROM dbo.vSMS_OSDeploymentKitInstalled" 23 | 24 | Dim conn, cmd, rs 25 | CMWT_DB_QUERY Application("DSN_CMDB"), query 26 | CMWT_DB_TABLEGRID rs, "", "adk.asp", "" 27 | CMWT_DB_CLOSE() 28 | 29 | query = "SELECT DISTINCT DeploymentKitVersion,ProductType,Name " & _ 30 | "FROM dbo.vSMS_OSDeploymentKitSupportedPlatforms " & _ 31 | "ORDER BY " & SortBy 32 | 33 | CMWT_DB_QUERY Application("DSN_CMDB"), query 34 | CMWT_DB_TABLEGRID rs, "", "adk.asp", "" 35 | CMWT_DB_CLOSE() 36 | CMWT_SHOW_Query() 37 | CMWT_Footer() 38 | %> 39 | 40 | 41 | -------------------------------------------------------------------------------- /_panel1.asp: -------------------------------------------------------------------------------- 1 | <% 2 | '----------------------------------------------------------------------------- 3 | ' filename....... _panel1.asp 4 | ' lastupdate..... 02/28/2017 5 | ' description.... CMWT home page dashboard panel 6 | '----------------------------------------------------------------------------- 7 | Response.Write "

" 8 | q = "SELECT SiteCode,SiteName,Version," & _ 9 | "ServerName,InstallDir FROM dbo.v_Site " & _ 10 | "ORDER BY Type DESC, SiteCode" 11 | CMWT_DB_QUERY Application("DSN_CMDB"), q 12 | Response.Write "" 13 | For i = 0 to rs.Fields.Count - 1 14 | Response.Write "" 15 | Next 16 | Response.Write "" 17 | Response.Write "" 18 | Do Until rs.EOF 19 | Response.Write "" 20 | For i = 0 to rs.Fields.Count - 1 21 | Response.Write "" 22 | Next 23 | Response.Write "" 24 | Response.Write "" 25 | rs.MoveNext 26 | Loop 27 | CMWT_DB_CLOSE() 28 | Response.Write "
" & rs.Fields(i).Name & "Branch Name
" & rs.Fields(i).Value & "" & CMWT_CM_BuildName(rs.Fields("Version").value) & "
" 29 | %> 30 | -------------------------------------------------------------------------------- /cmtasks.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... cmtasks.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... site maintenance tasks report 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "TaskName") 11 | QueryOn = CMWT_GET("qq", "") 12 | PageTitle = "Maintenance Tasks" 13 | 14 | CMWT_NewPage "", "", "" 15 | PageBackLink = "cmsite.asp" 16 | PageBackName = "Site Hierarchy" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT T1.TaskName, " & _ 23 | "CASE WHEN T1.VX LIKE '%IsEnabled=_1_ %' THEN 'YES' ELSE 'NO' END AS Enabled " & _ 24 | "FROM " & _ 25 | "(SELECT ItemName AS TaskName, " & _ 26 | "CONVERT(VARCHAR(255),[Value]) AS VX " & _ 27 | "FROM dbo.SC_MISCItem) " & _ 28 | "AS T1 " & _ 29 | "ORDER BY " & SortBy 30 | 31 | Dim conn, cmd, rs 32 | CMWT_DB_QUERY Application("DSN_CMDB"), query 33 | CMWT_DB_TABLEGRID rs, "", "cmtasks.asp", "TASKNAME=cmtask.asp?tn=" 34 | CMWT_DB_CLOSE() 35 | CMWT_SHOW_QUERY() 36 | CMWT_Footer() 37 | %> 38 | 39 | 40 | -------------------------------------------------------------------------------- /ie.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... ie.asp 5 | ' lastupdate..... 12/09/2016 6 | ' description.... microsoft Internet Explorer versions and install counts for each 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | PageTitle = "IE Version Installs" 11 | PageBackLink = "software.asp" 12 | PageBackName = "Software" 13 | SortBy = CMWT_GET("s", "ProductVersion") 14 | QueryON = CMWT_GET("qq", "") 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT DISTINCT " & _ 23 | "ProductName AS BrowserName, ProductVersion, COUNT(*) AS Installs " & _ 24 | "FROM dbo.v_GS_SoftwareProduct " & _ 25 | "WHERE (ProductName LIKE '%Internet Explorer%') " & _ 26 | "GROUP BY ProductName, ProductVersion " & _ 27 | "ORDER BY " & SortBy 28 | Dim conn, cmd, rs 29 | CMWT_DB_QUERY Application("DSN_CMDB"), query 30 | CMWT_DB_TABLEGRID rs, "", "ie.asp", "PRODUCTVERSION=ie2.asp?v" 31 | CMWT_DB_CLOSE() 32 | CMWT_SHOW_QUERY() 33 | CMWT_FOOTER() 34 | Response.Write "" 35 | %> 36 | -------------------------------------------------------------------------------- /_config.txt: -------------------------------------------------------------------------------- 1 | ; CMWT Configuration Settings File 2 | CMWT_DOMAIN~<> 3 | CMWT_DOMAINSUFFIX~<>.<> 4 | CMWT_ADMINS~sccmadmin,yourname 5 | DSN_CMDB~DRIVER=SQL Server;SERVER=<>;DATABASE=CM_<>;Trusted_Connection=True; 6 | DSN_CMWT~DRIVER=SQL Server;SERVER=<>;database=CMWT;Trusted_Connection=True; 7 | DSN_CMM~DRIVER=SQL Server;SERVER=<>;database=CMMonitor;Trusted_Connection=True; 8 | CMWT_PhysicalPath~F:\CMWT 9 | CMWT_SiteServer~<> 10 | CMWT_DomainPath~dc=<>,dc=<> 11 | CMWT_MailServer~smtp.<>.<> 12 | CMWT_MailSender~cmwtalerts@<>.<> 13 | CMWT_SupportMail~ds0934@gmail.com 14 | CMWT_ENABLE_LOGGING~TRUE 15 | CMWT_MAX_LOG_AGE_DAYS~90 16 | CM_SITECODE~<> 17 | CM_AD_TOOLS~TRUE 18 | CM_AD_TOOLS_SAFETY~TRUE 19 | CM_AD_TOOLS_ADMINGROUPS~Domain Admins,Enterprise Admins,Schema Admins,Domain Users,Authenticated Users,Protected Users,Domain Computers,Domain Controllers,DnsUpdateProxy,Allowed RODC Password Replication Group,Denied RODC Password Replication Group,Cloneable Domain Contollers,Cert Publishers,RAS and IAS Servers,WinRMRemoteWMIUsers__,Read-only Domain Controllers 20 | CM_AD_TOOLUSER~<>\<> 21 | CM_AD_TOOLPASS~<> 22 | -------------------------------------------------------------------------------- /_config.txt.bak: -------------------------------------------------------------------------------- 1 | ; CMWT Configuration Settings File 2 | CMWT_DOMAIN~<> 3 | CMWT_DOMAINSUFFIX~<>.<> 4 | CMWT_ADMINS~sccmadmin,yourname 5 | DSN_CMDB~DRIVER=SQL Server;SERVER=<>;DATABASE=CM_<>;Trusted_Connection=True; 6 | DSN_CMWT~DRIVER=SQL Server;SERVER=<>;database=CMWT;Trusted_Connection=True; 7 | DSN_CMM~DRIVER=SQL Server;SERVER=<>;DATABASE=CMMonitor;Trusted_Connection=True; 8 | CMWT_PhysicalPath~F:\CMWT 9 | CMWT_SiteServer~<> 10 | CMWT_DomainPath~dc=<>,dc=<> 11 | CMWT_MailServer~smtp.<>.<> 12 | CMWT_MailSender~cmwtalerts@<>.<> 13 | CMWT_SupportMail~ds0934@gmail.com 14 | CMWT_ENABLE_LOGGING~TRUE 15 | CMWT_MAX_LOG_AGE_DAYS~90 16 | CM_SITECODE~<> 17 | CM_AD_TOOLS~TRUE 18 | CM_AD_TOOLS_SAFETY~TRUE 19 | CM_AD_TOOLS_ADMINGROUPS~Domain Admins,Enterprise Admins,Schema Admins,Domain Users,Authenticated Users,Protected Users,Domain Computers,Domain Controllers,DnsUpdateProxy,Allowed RODC Password Replication Group,Denied RODC Password Replication Group,Cloneable Domain Contollers,Cert Publishers,RAS and IAS Servers,WinRMRemoteWMIUsers__,Read-only Domain Controllers 20 | CM_AD_TOOLUSER~<>\<> 21 | CM_AD_TOOLPASS~<> 22 | -------------------------------------------------------------------------------- /_protectedgroups.txt: -------------------------------------------------------------------------------- 1 | ;CM_AD_ProtectedGroups 2 | Access Control Assistance Operators 3 | Account Operators 4 | Administrators 5 | AdsyncAdmins 6 | AdsyncBrowse 7 | AdsyncOperators 8 | AdsyncPasswordSet 9 | Allowed RODC Password Replication Group 10 | Backup Operators 11 | Cert Publishers 12 | Certificate Service DCOM Access 13 | Cloneable Domain Controllers 14 | Cryptographic Operators 15 | Denied RODC Password Replication Group 16 | DHCP Administrators 17 | Distributed COM Users 18 | Domain Computers 19 | Domain Controllers 20 | DnsAdmins 21 | DnsUpdateProxy 22 | Domain Admins 23 | Domain Guests 24 | Domain Users 25 | Enterprise Admins 26 | Enterprise Key Admins 27 | Enterprise Read-only Domain Controllers 28 | Group Policy Creator Owners 29 | Guests 30 | IIS_IUSRS 31 | Incoming Forest Trust Builders 32 | Key Admins 33 | Network Configuration Operators 34 | Pre-Windows 2000 Compatible Access 35 | Print Operators 36 | Protected Users 37 | RAS and IAS Servers 38 | RDS Endpoint Servers 39 | RDS Management Servers 40 | RDS Remote Access Servers 41 | Read-only Domain Controllers 42 | Replicator 43 | Schema Admins 44 | Server Operators 45 | Storage Replica Administrators 46 | System Managed Accounts Group 47 | Terminal Server License Servers 48 | Users 49 | Windows Authorization Access Group -------------------------------------------------------------------------------- /delrec.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... delrec.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... delete database record (generic handler) 7 | '----------------------------------------------------------------------------- 8 | RecordID = CMWT_GET("id", "") 9 | IDColumn = CMWT_GET("pk", "") 10 | TableName = CMWT_GET("tn", "") 11 | TargetURL = CMWT_GET("t", "") 12 | 13 | CMWT_VALIDATE RecordID, "Table Row ID was not provided" 14 | CMWT_VALIDATE TableName, "Database Table name was not specified" 15 | CMWT_VALIDATE TargetURL, "Target landing document was not specified" 16 | 17 | TargetURL = Replace(Replace(TargetURL, "|", "?"), "^", "&") 18 | 19 | query = "DELETE FROM dbo." & TableName & " WHERE " & IDColumn & "=" & RecordID 20 | 21 | On Error Resume Next 22 | Set conn = Server.CreateObject("ADODB.Connection") 23 | conn.ConnectionTimeOut = 5 24 | conn.Open Application("DSN_CMWT") 25 | If err.Number <> 0 Then 26 | CMWT_STOP "database connection failure" 27 | End If 28 | conn.Execute query 29 | conn.Close 30 | Set conn = Nothing 31 | 32 | Caption = "Deleting Record" 33 | PageTitle = "ConfigMgr Web Tools" 34 | 35 | CMWT_PageRedirect TargetURL, 1 36 | 37 | '---------------------------------------------------------------- 38 | %> -------------------------------------------------------------------------------- /tasksequences.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... tasksequences.asp 5 | ' lastupdate..... 12/29/2016 6 | ' description.... task sequences report 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "Name") 11 | QueryON = CMWT_GET("qq", "") 12 | 13 | PageTitle = "Task Sequences" 14 | PageBackLink = "software.asp" 15 | PageBackName = "Software" 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT ALL SMS_TASKSEQUENCEPACKAGE.NAME, " & _ 23 | "SMS_TASKSEQUENCEPACKAGE.PKGID AS TSPKGID, " & _ 24 | "SMS_TASKSEQUENCEPACKAGE.DESCRIPTION, " & _ 25 | "SMS_TASKSEQUENCEPACKAGE.SOURCEDATE, " & _ 26 | "SMS_TASKSEQUENCEPACKAGE.SOURCESITE, " & _ 27 | "CASE WHEN SMS_TASKSEQUENCEPACKAGE.TS_TYPE=1 THEN 'GENERIC' ELSE 'OSD' END AS TS_TYPE " & _ 28 | "FROM VSMS_TASKSEQUENCEPACKAGE AS SMS_TASKSEQUENCEPACKAGE " & _ 29 | "ORDER BY " & SortBy 30 | 31 | Dim conn, cmd, rs 32 | CMWT_DB_QUERY Application("DSN_CMDB"), query 33 | CMWT_DB_TABLEGRID rs, "", "tasksequences.asp", "" 34 | CMWT_DB_CLOSE() 35 | CMWT_SHOW_QUERY() 36 | CMWT_FOOTER() 37 | 38 | Response.Write "" 39 | %> 40 | -------------------------------------------------------------------------------- /model.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '----------------------------------------------------------------------------- 5 | ' filename....... model.asp 6 | ' lastupdate..... 11/30/2016 7 | ' description.... computers by specified model name 8 | '----------------------------------------------------------------------------- 9 | time1 = Timer 10 | 11 | mn = CMWT_GET("m", "") 12 | QueryOn = CMWT_GET("qq", "") 13 | CMWT_VALIDATE mn, "No model name was provided" 14 | 15 | PageTitle = mn 16 | PageBackLink = "models.asp" 17 | PageBackName = "Computer Models" 18 | 19 | CMWT_NewPage "", "", "" 20 | %> 21 | 22 | 23 | <% 24 | 25 | query = "SELECT DISTINCT " & _ 26 | "Name0 AS ComputerName, " & _ 27 | "ResourceID, " & _ 28 | "AD_Site_Name0 AS ADSiteName, " & _ 29 | "SystemType0 AS SystemType, " & _ 30 | "Client0 AS Client, " & _ 31 | "Caption0 AS WindowsVersion, " & _ 32 | "Full_Domain_Name0 AS DomainName, " & _ 33 | "UserName0 AS UserName " & _ 34 | "FROM (" & q_devices & ") AS T1 " & _ 35 | "WHERE T1.Model0='" & mn & "'" 36 | 37 | Dim conn, cmd, rs 38 | CMWT_DB_QUERY Application("DSN_CMDB"), query 39 | CMWT_DB_TABLEGRID rs, "", "model.asp", "" 40 | CMWT_DB_CLOSE() 41 | CMWT_SHOW_QUERY() 42 | CMWT_Footer() 43 | %> 44 | 45 | 46 | -------------------------------------------------------------------------------- /sitedef.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... sitedef.asp 5 | ' lastupdate..... 12/10/2016 6 | ' description.... site definition settings 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | QueryOn = CMWT_GET("qq", "") 10 | DebugOn = CMWT_GET("debug", "") 11 | 12 | PageTitle = "Site Definition" 13 | PageBackLink = "cmsite.asp" 14 | PageBackName = "Site Hierarchy" 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT [SiteNumber],[SiteType],[SiteCode],[SiteName]," & _ 23 | "[ParentSiteCode] AS Parent,[SiteServerName] AS Server," & _ 24 | "[SiteServerDomain] AS Domain," & _ 25 | "[SiteServerPlatform] AS CPU,[InstallDirectory] AS InstallPath," & _ 26 | "[SQLServerName] AS SQLHost,[SQLDatabaseName] AS SQL_DB " & _ 27 | "FROM dbo.v_SC_SiteDefinition" 28 | if DebugOn = "1" Then 29 | response.write "

query: " & query & "

" 30 | response.write "

" & Application("DSN_CMDB") & "" 31 | response.end 32 | end If 33 | Dim conn, cmd, rs 34 | CMWT_DB_QUERY Application("DSN_CMDB"), query 35 | CMWT_DB_TABLEGRID rs, "", "", "" 36 | CMWT_DB_CLOSE() 37 | CMWT_SHOW_QUERY() 38 | CMWT_Footer() 39 | Response.Write "" 40 | %> 41 | -------------------------------------------------------------------------------- /packages.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... packages.asp 5 | ' lastupdate..... 11/27/2016 6 | ' description.... package library 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | objPfx = CMWT_GET("ch", "ALL") 10 | QueryOn = CMWT_GET("qq", "") 11 | SortBy = CMWT_GET("s","Name") 12 | 13 | PageTitle = "Packages" 14 | PageBackLink = "software.asp" 15 | PageBackName = "Software" 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | <% 22 | CMWT_CLICKBAR objPfx, "packages.asp?ch=" 23 | 24 | If objPFX <> "ALL" Then 25 | query = "SELECT Name, PackageID, Version, Manufacturer, SourceVersion " & _ 26 | "FROM dbo.v_Package " & _ 27 | "WHERE (Name LIKE '" & objPfx & "%') " & _ 28 | "AND (PackageType=0) " & _ 29 | "ORDER BY " & SortBy 30 | Else 31 | query = "SELECT Name, PackageID, Version, Manufacturer, SourceVersion " & _ 32 | "FROM dbo.v_Package " & _ 33 | "WHERE PackageType=0 " & _ 34 | "ORDER BY " & SortBy 35 | End If 36 | 37 | Dim conn, cmd, rs 38 | CMWT_DB_QUERY Application("DSN_CMDB"), query 39 | CMWT_DB_TABLEGRID rs, "", "packages.asp", "PackageID~package.asp?id=" 40 | CMWT_DB_CLOSE() 41 | CMWT_SHOW_QUERY() 42 | CMWT_Footer() 43 | %> 44 | 45 | 46 | -------------------------------------------------------------------------------- /os.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '----------------------------------------------------------------------------- 5 | ' filename....... os.asp 6 | ' lastupdate..... 12/03/2016 7 | ' description.... operating systems inventory summary 8 | '----------------------------------------------------------------------------- 9 | time1 = Timer 10 | 11 | OSName = CMWT_GET("on", "") 12 | SortBy = CMWT_GET("s", "Name0") 13 | QueryON = CMWT_GET("qq", "") 14 | 15 | CMWT_VALIDATE OSName, "Operating System Name was not specified" 16 | PageTitle = OSName 17 | PageBackLink = "software.asp" 18 | PageBackName = "Software" 19 | 20 | CMWT_NewPage "", "", "" 21 | %> 22 | 23 | 24 | <% 25 | 26 | query = "SELECT DISTINCT Name0 AS ComputerName, " & _ 27 | "Client0 AS Client, " & _ 28 | "AD_Site_Name0 AS ADSiteName, " & _ 29 | "Manufacturer0 AS Manufacturer, " & _ 30 | "Model0 AS ModelName, " & _ 31 | "TotalPhysicalMemory0 AS Memory, " & _ 32 | "SystemType0 AS CPUType " & _ 33 | "FROM (" & q_devices & ") AS T1 " & _ 34 | "WHERE T1.Caption0='" & OSName & "' " & _ 35 | "ORDER BY " & SortBy 36 | 37 | Dim conn, cmd, rs 38 | CMWT_DB_QUERY Application("DSN_CMDB"), query 39 | CMWT_DB_TABLEGRID rs, "", "os.asp?on=" & OSName, "" 40 | CMWT_DB_CLOSE() 41 | CMWT_SHOW_QUERY() 42 | CMWT_FOOTER() 43 | %> 44 | 45 | 46 | -------------------------------------------------------------------------------- /applications.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... applications.asp 5 | ' lastupdate..... 12/04/2016 6 | ' description.... applications library 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | objPfx = CMWT_GET("ch", "ALL") 10 | QueryOn = CMWT_GET("qq", "") 11 | SortBy = CMWT_GET("s","Name") 12 | 13 | PageTitle = "Applications" 14 | PageBackLink = "software.asp" 15 | PageBackName = "Software" 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | <% 22 | CMWT_CLICKBAR objPfx, "applications.asp?ch=" 23 | 24 | If objPFX <> "ALL" Then 25 | query = "SELECT Name, PackageID AS AppID, Version, Manufacturer, SourceVersion " & _ 26 | "FROM dbo.v_Package " & _ 27 | "WHERE (Name LIKE '" & objPfx & "%') " & _ 28 | "AND (PackageType=8) " & _ 29 | "ORDER BY " & SortBy 30 | Else 31 | query = "SELECT Name, PackageID AS AppID, Version, Manufacturer, SourceVersion " & _ 32 | "FROM dbo.v_Package " & _ 33 | "WHERE (PackageType=8) " & _ 34 | "ORDER BY " & SortBy 35 | End If 36 | 37 | Dim conn, cmd, rs 38 | CMWT_DB_QUERY Application("DSN_CMDB"), query 39 | CMWT_DB_TABLEGRID rs, "", "applications.asp", "" 40 | CMWT_DB_CLOSE() 41 | 42 | CMWT_SHOW_QUERY() 43 | CMWT_Footer() 44 | %> 45 | 46 | 47 | -------------------------------------------------------------------------------- /noteedit2.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... noteedit2.asp 5 | ' lastupdate..... 12/04/2016 6 | ' description.... update and existing custom note 7 | '----------------------------------------------------------------------------- 8 | Response.Expires = -1 9 | NoteID = CMWT_GET("id", "") 10 | ItemID = CMWT_GET("iid", "") 11 | ItemType = CMWT_GET("type", "") 12 | NoteText = CMWT_GET("comm", "") 13 | 14 | CMWT_VALIDATE ItemID, "Item Name or ID was not provided" 15 | CMWT_VALIDATE NoteID, "Note record ID was not provided" 16 | CMWT_VALIDATE ItemType, "Item Class or Type was not specified" 17 | CMWT_VALIDATE NoteText, "Note Comment was not provided" 18 | 19 | query = "UPDATE dbo.Notes " & _ 20 | "SET Comment='" & Replace(NoteText, "'", "''") & "'," & _ 21 | "CreatedBy='" & CMWT_USERNAME() & "'," & _ 22 | "DateCreated='" & NOW & "' " & _ 23 | "WHERE NoteID=" & NoteID 24 | 25 | On Error Resume Next 26 | Set conn = Server.CreateObject("ADODB.Connection") 27 | conn.ConnectionTimeOut = 5 28 | conn.Open Application("DSN_CMWT") 29 | If err.Number <> 0 Then 30 | CMWT_STOP "database connection failure" 31 | End If 32 | conn.Execute query 33 | conn.Close 34 | Set conn = Nothing 35 | 36 | targetURL = CMWT_PageLink (ItemType, ItemID) 37 | 38 | Caption = "Updating Note Record" 39 | PageTitle = "ConfigMgr Web Tools" 40 | 41 | CMWT_PageRedirect TargetURL, 1 42 | %> -------------------------------------------------------------------------------- /_panel4.asp: -------------------------------------------------------------------------------- 1 | <% 2 | '----------------------------------------------------------------------------- 3 | ' filename....... _panel4.asp 4 | ' lastupdate..... 02/28/2017 5 | ' description.... CMWT home page dashboard panel 6 | '----------------------------------------------------------------------------- 7 | %> 8 |

Status

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
Site Status Errors<%=count_stat1%>
Component Status Errors<%=count_stat2%>
Device Collections<%=count_dcolls%>
User Collections<%=count_ucolls%>
Task Sequences<%=count_tseqs%>
.
36 | -------------------------------------------------------------------------------- /noteadd2.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... noteadd2.asp 5 | ' lastupdate..... 03/20/2016 6 | ' description.... add new custom note 7 | '----------------------------------------------------------------------------- 8 | Response.Expires = -1 9 | ItemID = CMWT_GET("id", "") 10 | ItemType = CMWT_GET("type", "") 11 | NoteText = CMWT_GET("comm", "") 12 | 13 | CMWT_VALIDATE ItemID, "Item Name or ID was not provided" 14 | CMWT_VALIDATE ItemType, "Item Class or Type was not specified" 15 | CMWT_VALIDATE NoteText, "Note Comment was not provided" 16 | 17 | query = "INSERT INTO dbo.Notes " & _ 18 | "(AttachedTo, AttachClass, Comment, CreatedBy, DateCreated) " & _ 19 | "VALUES (" & _ 20 | "'" & ItemID & "','" & Ucase(ItemType) & "','" & Replace(NoteText,"'","''") & _ 21 | "','" & CMWT_USERNAME() & "','" & NOW & "')" 22 | On Error Resume Next 23 | Set conn = Server.CreateObject("ADODB.Connection") 24 | conn.ConnectionTimeOut = 5 25 | conn.Open Application("DSN_CMWT") 26 | If err.Number <> 0 Then 27 | CMWT_STOP "database connection failure" 28 | End If 29 | conn.Execute query 30 | conn.Close 31 | Set conn = Nothing 32 | 33 | targetURL = CMWT_PageLink (ItemType, ItemID) 34 | 35 | Caption = "Adding Note Record" 36 | PageTitle = "ConfigMgr Web Tools" 37 | CMWT_PageRedirect TargetURL, 1 38 | '----------------------------------------------------------------------------- 39 | %> 40 | -------------------------------------------------------------------------------- /_cmwt.js: -------------------------------------------------------------------------------- 1 | /* 2 | **************************************************************** 3 | Filename..: cmwt.js 4 | Author....: David M. Stein 5 | Date......: 05/26/2015 6 | Purpose...: javascript library 7 | **************************************************************** 8 | */ 9 | 10 | function explorer (computer) { 11 | var x = "file://"+computer+"/c$"; 12 | var y = window.open(x, "mywin"); 13 | } 14 | 15 | function ccmlogs (computer) { 16 | var x = "file://"+computer+"/c$/windows/ccm/logs"; 17 | var y = window.open(x, "mywin"); 18 | } 19 | 20 | function manage (computer) { 21 | var cmd = "compmgmt.msc -a /computer="+computer; 22 | try { 23 | var objShell = new ActiveXObject("wscript.shell"); 24 | objShell.Run(cmd); 25 | } catch(e) { 26 | alert(e); 27 | } 28 | } 29 | 30 | function winrs (computer) { 31 | var cmd = "./tools/scripts/winrs.bat"; 32 | try { 33 | var objShell = new ActiveXObject("wscript.shell"); 34 | objShell.Run(cmd+" "+computer); 35 | } catch(e) { 36 | alert(e); 37 | } 38 | } 39 | 40 | function rdp (computer) { 41 | var cmd = "mstsc -v "+computer; 42 | try { 43 | var objShell = new ActiveXObject("wscript.shell"); 44 | objShell.Run(cmd); 45 | } catch(e) { 46 | alert(e); 47 | } 48 | } 49 | 50 | function cmwthelp () { 51 | alert("These buttons are only enabled for IE browser sessions.\nYou must also have the URL in your Local Intranet zone\nand have enabled \"unsafe\" ActiveX Scripts in that zone."); 52 | } -------------------------------------------------------------------------------- /sqlrepadd2.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... sqlrepadd2.asp 5 | ' lastupdate..... 12/12/2016 6 | ' description.... add new custom report query 7 | '----------------------------------------------------------------------------- 8 | Response.Expires = -1 9 | RepName = CMWT_GET("name", "") 10 | RepQuery = CMWT_GET("q", "") 11 | RepComm = CMWT_GET("comm", "") 12 | RepType = CMWT_GET("rt", "1") 13 | 14 | CMWT_VALIDATE RepName, "Report Name was not provided" 15 | CMWT_VALIDATE RepQuery, "Report Query Statement was not provided" 16 | 'CMWT_VALIDATE RepComm, "Comment was not provided" 17 | 18 | query = "INSERT INTO dbo.Reports2 " & _ 19 | "(ReportType,ReportName,Query,CreatedBy,DateCreated,Comment) " & _ 20 | "VALUES (" & RepType & ",'" & RepName & "','" & Replace(RepQuery,"'","''") & _ 21 | "','" & CMWT_USERNAME() & "','" & NOW & "','" & RepComm & "')" 22 | On Error Resume Next 23 | Set conn = Server.CreateObject("ADODB.Connection") 24 | conn.ConnectionTimeOut = 5 25 | conn.Open Application("DSN_CMWT") 26 | If err.Number <> 0 Then 27 | CMWT_STOP "database connection failure" 28 | End If 29 | conn.Execute query 30 | conn.Close 31 | Set conn = Nothing 32 | 33 | targetURL = "sqlreports.asp" 34 | 35 | Caption = "Adding SQL Report" 36 | PageTitle = "ConfigMgr Web Tools" 37 | CMWT_PageRedirect TargetURL, 2 38 | '----------------------------------------------------------------------------- 39 | %> 40 | -------------------------------------------------------------------------------- /sqlreports.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... sqlreports.asp 5 | ' lastupdate..... 12/12/2016 6 | ' description.... custom reports list 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "ReportName") 11 | QueryON = CMWT_GET("qq", "") 12 | 13 | PageTitle = "Custom Reports" 14 | PageBackLink = "reports.asp" 15 | PageBackName = "Reports" 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | query = "SELECT DISTINCT " & _ 22 | "ReportID AS RepID, CASE WHEN ReportType=1 THEN 'SQL' WHEN ReportType=2 THEN 'ADDS' ELSE 'OTHER' END AS ReportType, ReportName, " & _ 23 | "CreatedBy, DateCreated, Comment " & _ 24 | "FROM dbo.Reports2 " & _ 25 | "ORDER BY " & SortBy 26 | 27 | Dim conn, cmd, rs 28 | CMWT_DB_QUERY Application("DSN_CMWT"), query 29 | CMWT_DB_TABLEGRID rs, "", "customreports.asp", "" 30 | CMWT_DB_CLOSE() 31 | Response.Write "" & _ 32 | "
" 33 | CMWT_SHOW_QUERY() 34 | CMWT_FOOTER() 35 | 36 | Response.Write "" 37 | %> 38 | -------------------------------------------------------------------------------- /ie2.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... ie2.asp 5 | ' lastupdate..... 12/09/2016 6 | ' description.... computers with specific Internet Explorer version installed 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | KeyVal = CMWT_GET("v", "") 11 | CMWT_Validate KeyVal, "Version was not specified" 12 | PageTitle = KeyVal 13 | PageBackLink = "ie.asp" 14 | PageBackName = "IE Version Installs" 15 | SortBy = CMWT_GET("s", "DeviceName") 16 | QueryON = CMWT_GET("qq", "") 17 | 18 | CMWT_NewPage "", "", "" 19 | %> 20 | 21 | 22 | <% 23 | 24 | query = "SELECT DISTINCT dbo.v_R_System.Name0 AS DeviceName, " & _ 25 | "dbo.v_GS_SoftwareProduct.ProductName, " & _ 26 | "dbo.v_GS_SoftwareProduct.ProductVersion " & _ 27 | "FROM dbo.v_GS_SoftwareProduct INNER JOIN " & _ 28 | "dbo.v_R_System ON " & _ 29 | "dbo.v_GS_SoftwareProduct.ResourceID = dbo.v_R_System.ResourceID " & _ 30 | "WHERE (dbo.v_GS_SoftwareProduct.ProductName LIKE '%INTERNET EXPLORER%') " & _ 31 | "AND (dbo.v_GS_SoftwareProduct.ProductVersion = '" & KeyVal & "') " & _ 32 | "ORDER BY " & SortBy 33 | 34 | Dim conn, cmd, rs 35 | CMWT_DB_QUERY Application("DSN_CMDB"), query 36 | CMWT_DB_TABLEGRID rs, "", "ie2.asp", "" 37 | CMWT_DB_CLOSE() 38 | CMWT_SHOW_QUERY() 39 | CMWT_FOOTER() 40 | Response.Write "" 41 | %> 42 | -------------------------------------------------------------------------------- /depsummary.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... depsummary.asp 5 | ' lastupdate..... 12/04/2016 6 | ' description.... deployment status summary 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "Application") 11 | QueryOn = CMWT_GET("qq", "") 12 | PageTitle = "Deployment Status Summary" 13 | PageBackLink = "software.asp" 14 | PageBackName = "Software" 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT DISTINCT " & _ 23 | "CASE WHEN SoftwareName = '' THEN '(TASK SEQUENCE)' ELSE [SoftwareName] END AS Application," & _ 24 | "CollectionID AS CollID, " & _ 25 | "CollectionName,DeploymentTime AS Deployed, " & _ 26 | "CreationTime AS Created,EnforcementDeadline AS Deadline, " & _ 27 | "NumberSuccess AS Success,NumberInProgress AS InProgress, " & _ 28 | "NumberUnknown AS Unknown,NumberErrors AS Failed, " & _ 29 | "NumberOther AS Other,NumberTotal AS Total, " & _ 30 | "SummarizationTime AS Summarized " & _ 31 | "FROM dbo.v_DeploymentSummary " & _ 32 | "ORDER BY " & SortBy 33 | CMWT_DEBUG query 34 | 35 | Dim conn, cmd, rs 36 | CMWT_DB_QUERY Application("DSN_CMDB"), query 37 | CMWT_DB_TABLEGRID rs, "", "depsummary.asp", "" 38 | CMWT_DB_CLOSE() 39 | CMWT_SHOW_QUERY() 40 | CMWT_FOOTER() 41 | 42 | Response.Write "" 43 | %> 44 | -------------------------------------------------------------------------------- /clientpush.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: clientpush.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 11/30/2016 7 | ' Purpose...: client push installations 8 | '**************************************************************** 9 | time1 = Timer 10 | 11 | PageTitle = "Client Push Installations" 12 | PageBackLink = "reports.asp" 13 | PageBackName = "Reports" 14 | SortBy = CMWT_GET("s", "DeviceName") 15 | QueryON = CMWT_GET("qq", "") 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | <% 22 | 23 | query = "SELECT DISTINCT " & _ 24 | "T2.Name AS DeviceName, " & _ 25 | "T1.AD_Site_Name0 AS ADSiteName, " & _ 26 | "T1.Client_Version0 AS ClientVer, " & _ 27 | "T2.Forced, " & _ 28 | "T2.ForceReinstall AS Reinstall, " & _ 29 | "T2.PushEvenIfDC AS PushToDC, " & _ 30 | "T2.AssignedSiteCode AS Assigned, " & _ 31 | "T2.InitialRequestDate AS Requested, " & _ 32 | "T2.LatestProcessingAttempt AS Latest, " & _ 33 | "T2.LastErrorCode, " & _ 34 | "T2.NumProcessAttempts AS Attempts " & _ 35 | "FROM dbo.v_R_System T1 RIGHT JOIN " & _ 36 | "dbo.ClientPushMachine_G T2 ON " & _ 37 | "T1.ResourceID = T2.MachineID " & _ 38 | "ORDER BY " & SortBy 39 | 40 | Dim conn, cmd, rs 41 | CMWT_DB_QUERY Application("DSN_CMDB"), query 42 | CMWT_DB_TABLEGRID rs, "", "clientpush.asp", "" 43 | CMWT_DB_CLOSE() 44 | CMWT_SHOW_QUERY() 45 | CMWT_Footer() 46 | %> 47 | 48 | 49 | -------------------------------------------------------------------------------- /discovery.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: discovery.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 11/30/2016 7 | ' Purpose...: site discovery settings summary 8 | '**************************************************************** 9 | time1 = Timer 10 | 11 | DMName = CMWT_GET("dm","") 12 | CMWT_VALIDATE DMName, "Method Name not provided" 13 | 14 | PageTitle = DMName 15 | PageBackLink = "discoveries.asp" 16 | PageBackName = "Discovery Methods" 17 | SortBy = CMWT_GET("s", "PropertyName") 18 | QueryON = CMWT_GET("qq", "") 19 | 20 | CMWT_NewPage "", "", "" 21 | %> 22 | 23 | 24 | <% 25 | 26 | query = "SELECT " & _ 27 | "dbo.vSMS_SC_Component_Properties.Name AS PropertyName, " & _ 28 | "dbo.vSMS_SC_Component_Properties.Value1, " & _ 29 | "dbo.vSMS_SC_Component_Properties.Value2, " & _ 30 | "dbo.vSMS_SC_Component_Properties.Value3, " & _ 31 | "dbo.vSMS_SC_Component.Flags " & _ 32 | "FROM " & _ 33 | "dbo.vSMS_SC_Component INNER JOIN " & _ 34 | "dbo.vSMS_SC_Component_Properties " & _ 35 | "ON dbo.vSMS_SC_Component.ID = dbo.vSMS_SC_Component_Properties.ID " & _ 36 | "WHERE " & _ 37 | "(dbo.vSMS_SC_Component.ComponentName = '" & DMName & "') " & _ 38 | "ORDER BY " & SortBy 39 | 40 | Dim conn, cmd, rs 41 | CMWT_DB_QUERY Application("DSN_CMDB"), query 42 | CMWT_DB_TABLEGRID rs, "", "", "" 43 | CMWT_DB_CLOSE() 44 | CMWT_SHOW_QUERY() 45 | CMWT_Footer() 46 | %> 47 | 48 | 49 | -------------------------------------------------------------------------------- /cmrole.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... cmrole.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... security role details 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | RoleName = CMWT_GET("rn", "") 10 | SortBy = CMWT_GET("s", "LogonName") 11 | QueryOn = CMWT_GET("qq", "") 12 | PageTitle = RoleName 13 | PageBackLink = "cmroles.asp" 14 | PageBackName = "Security Roles" 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT DISTINCT LogonName, RoleType FROM " & _ 23 | "(SELECT DISTINCT " & _ 24 | "dbo.vRBAC_Roles.RoleName, dbo.vRBAC_Roles.RoleID, " & _ 25 | "dbo.vRBAC_Permissions.LogonName, dbo.vRBAC_Admins.IsGroup, " & _ 26 | "CASE WHEN IsGroup = 'True' THEN 'GROUP' ELSE 'USER' END AS RoleType " & _ 27 | "FROM dbo.vRBAC_Admins " & _ 28 | "INNER JOIN " & _ 29 | "dbo.vRBAC_Permissions ON dbo.vRBAC_Admins.LogonName = dbo.vRBAC_Permissions.LogonName " & _ 30 | "RIGHT OUTER JOIN " & _ 31 | "dbo.vRBAC_Roles ON dbo.vRBAC_Permissions.RoleName = dbo.vRBAC_Roles.RoleName) AS T1 " & _ 32 | "WHERE (RoleName='" & RoleName & "') " & _ 33 | "ORDER BY " & SortBy 34 | 35 | Dim conn, cmd, rs 36 | CMWT_DB_QUERY Application("DSN_CMDB"), query 37 | CMWT_DB_TABLEGRID rs, "", "cmrole.asp?rn=" & RoleName, "" 38 | CMWT_DB_CLOSE() 39 | CMWT_SHOW_QUERY() 40 | CMWT_Footer() 41 | %> 42 | 43 | 44 | -------------------------------------------------------------------------------- /adrs.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... adrs.asp 5 | ' lastupdate..... 12/29/2016 6 | ' description.... automatic deployment rules 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "ADID") 11 | QueryON = CMWT_GET("qq", "") 12 | 13 | PageTitle = "Automatic Deployments" 14 | PageBackLink = "software.asp" 15 | PageBackName = "Software" 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | query = "SELECT " & _ 22 | "dbo.vSMS_AutoDeployments.AutoDeploymentID AS ADID, " & _ 23 | "dbo.vSMS_AutoDeployments.Name, " & _ 24 | "dbo.vSMS_AutoDeployments.Description, " & _ 25 | "dbo.vSMS_AutoDeployments.AutoDeploymentEnabled, " & _ 26 | "dbo.vSMS_AutoDeployments.IsServicingPlan, " & _ 27 | "dbo.vSMS_AutoDeployments.AssociatedDeploymentID, " & _ 28 | "dbo.vSMS_ADRDeploymentSettings.CollectionName, " & _ 29 | "dbo.vSMS_ADRDeploymentSettings.CollectionID " & _ 30 | "FROM dbo.vSMS_AutoDeployments INNER JOIN " & _ 31 | "dbo.vSMS_ADRDeploymentSettings ON " & _ 32 | "dbo.vSMS_AutoDeployments.AutoDeploymentID = dbo.vSMS_ADRDeploymentSettings.RuleID " & _ 33 | "ORDER BY " & SortBy 34 | Dim conn, cmd, rs 35 | CMWT_DB_QUERY Application("DSN_CMDB"), query 36 | CMWT_DB_TABLEGRID rs, "", "adrs.asp", "" 37 | CMWT_DB_CLOSE() 38 | CMWT_SHOW_QUERY() 39 | CMWT_FOOTER() 40 | 41 | Response.Write "" 42 | %> 43 | -------------------------------------------------------------------------------- /depsummary2.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... depsummary2.asp 5 | ' lastupdate..... 01/02/2017 6 | ' description.... app deployment summary: short view 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "DisplayName") 11 | FilterFN = CMWT_GET("fn", "") 12 | FilterFV = CMWT_GET("fv", "") 13 | QueryON = CMWT_GET("qq", "") 14 | 15 | if FilterFV <> "" Then 16 | PageTitle = "Deployment Summary: " & FilterFV 17 | else 18 | PageTitle = "Deployment Summary" 19 | end if 20 | PageBackLink = "software.asp" 21 | PageBackName = "Software" 22 | CMWT_NewPage "", "", "" 23 | %> 24 | 25 | 26 | <% 27 | 28 | query = "SELECT " & _ 29 | "DisplayName," & _ 30 | "AppCI," & _ 31 | "DevicesWithApp," & _ 32 | "UsersTargetedWithApp," & _ 33 | "DevicesWithFailure," & _ 34 | "UsersWithFailure," & _ 35 | "UsersRequested " & _ 36 | "FROM dbo.vAppStatSummary " 37 | If FilterFN <> "" Then 38 | query = query & _ 39 | " WHERE (" & FilterFN & " = '" & FilterFV & "') " & _ 40 | "ORDER BY " & SortBy 41 | filtered = True 42 | Else 43 | query = query & " ORDER BY " & SortBy 44 | End If 45 | 46 | Dim conn, cmd, rs 47 | CMWT_DB_QUERY Application("DSN_CMDB"), query 48 | CMWT_DB_TableGridFilter rs, "", "depsummary2.asp", "", "", "depsummary2.asp" 49 | CMWT_DB_CLOSE() 50 | CMWT_SHOW_QUERY() 51 | CMWT_FOOTER() 52 | 53 | Response.Write "" 54 | %> 55 | -------------------------------------------------------------------------------- /mfrs.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... mfrs.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... device inventory counts by vendor 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | PageTitle = "Devices by Manufacturer" 11 | PageBackLink = "assets.asp" 12 | PageBackName = "Assets" 13 | SortBy = CMWT_GET("s", "Manufacturer") 14 | QueryOn = CMWT_GET("qq", "") 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT DISTINCT Manufacturer, COUNT(*) AS QTY " & _ 23 | "FROM (" & _ 24 | "SELECT DISTINCT " & _ 25 | "dbo.v_R_System.Name0 AS DeviceName, " & _ 26 | "COALESCE (dbo.v_GS_COMPUTER_SYSTEM.Manufacturer0, 'UNKNOWN') AS Manufacturer, " & _ 27 | "dbo.v_GS_COMPUTER_SYSTEM.Model0 AS Model, " & _ 28 | "dbo.v_R_System.AD_Site_Name0 AS ADSiteName, " & _ 29 | "dbo.v_R_System.Client_Version0 AS ClientVersion, " & _ 30 | "COALESCE(dbo.v_GS_COMPUTER_SYSTEM.SystemType0, '') AS CpuType " & _ 31 | "FROM dbo.v_R_System LEFT OUTER JOIN dbo.v_GS_COMPUTER_SYSTEM ON " & _ 32 | "dbo.v_R_System.ResourceID = dbo.v_GS_COMPUTER_SYSTEM.ResourceID " & _ 33 | ") AS T1 " & _ 34 | "GROUP BY T1.Manufacturer " & _ 35 | "ORDER BY " & SortBy 36 | Dim conn, cmd, rs 37 | CMWT_DB_QUERY Application("DSN_CMDB"), query 38 | CMWT_DB_TABLEGRID rs, "", "mfrs.asp", "" 39 | CMWT_DB_CLOSE() 40 | CMWT_SHOW_QUERY() 41 | CMWT_FOOTER() 42 | %> 43 | 44 | 45 | -------------------------------------------------------------------------------- /oulist.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '----------------------------------------------------------------------------- 5 | ' filename....... oulist.asp 6 | ' lastupdate..... 12/10/2016 7 | ' description.... interactive AD OU browser 8 | '----------------------------------------------------------------------------- 9 | time1 = Timer 10 | 11 | oupath = CMWT_GET("ou", "") 12 | objType = CMWT_GET("type", "user") 13 | findFN = CMWT_GET("f", "") 14 | findFV = CMWT_GET("v", "") 15 | 16 | PageTitle = "AD Organizational Units" 17 | PageBackLink = "adtools.asp" 18 | PageBackName = "Active Directory" 19 | 20 | If ouPath <> "" Then 21 | LINKPATH = "accounts.asp?ou=" & oupath 22 | Else 23 | LINKPATH = "" 24 | End If 25 | 26 | CMWT_NewPage "", "", "" 27 | %> 28 | 29 | 30 | 31 |
32 | 33 | 34 | 40 | 43 | 44 |
35 |
38 | <%=xrows%> OUs were returned 39 |
41 | 42 |
45 |
46 | 47 | <% CMWT_Footer() %> 48 | 49 | 50 | -------------------------------------------------------------------------------- /test.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... test.asp 5 | ' lastupdate..... 12/07/2016 6 | ' description.... ASP test validation 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | PageTitle = Application("CMWT_SubTitle") 11 | PageBackLink = "" 12 | PageBackName = "" 13 | SelfLink = "test.asp" 14 | 15 | CMWT_NewPage "", "", "" 16 | 17 | Response.Write "ConfigMgr Web Tools" & _ 18 | "" & _ 19 | "" & _ 20 | "
" & _ 21 | "

Welcome to CMWT!

" & _ 22 | "

CMWT Site Testing Process

" & _ 23 | "" & _ 24 | "" & _ 25 | "" & _ 26 | "" & _ 27 | "" & _ 28 | "" & _ 29 | "" & _ 30 | "" & _ 31 | "" & _ 32 | "" & _ 33 | "" & _ 34 | "" & _ 37 | "" & _ 38 | "
HTMLPassed!
ASPPassed!
Database" & _ 35 | "" & _ 36 | "
" & _ 39 | "
" 40 | 41 | CMWT_FOOTER() 42 | 43 | Response.Write "" 44 | %> -------------------------------------------------------------------------------- /_sm.asp: -------------------------------------------------------------------------------- 1 | <% 2 | '----------------------------------------------------------------------------- 3 | ' filename....... _sm.asp 4 | ' lastupdate..... 12/09/2016 5 | ' description.... sidebar menu panel 6 | '----------------------------------------------------------------------------- 7 | 8 | if PageBackLink <> "" and PageBackName <> "" then 9 | backtab = "" & PageBackName & ": " 10 | else 11 | backtab = "" 12 | end if 13 | %> 14 |
15 | × 16 | Home 17 | <% If CMWT_ADMIN() Then %> 18 | Administration 19 | <% End If %> 20 | Site 21 | Assets 22 | Software 23 | Reports 24 | AD Tools 25 | Help 26 | About 27 |
28 | 29 | 30 | <%=backtab%><%=PageTitle%> 31 | 32 | 41 | -------------------------------------------------------------------------------- /sqlrepexp.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... sqlrepexp.asp 5 | ' lastupdate..... 12/10/2016 6 | ' description.... render exported sql queries 7 | '----------------------------------------------------------------------------- 8 | query = "SELECT DISTINCT " & _ 9 | "ReportType, ReportName, Query, CreatedBy, DateCreated, Comment " & _ 10 | "FROM dbo.Reports2 " & _ 11 | "ORDER BY ReportName" 12 | 13 | Dim conn, cmd, rs 14 | CMWT_DB_OPEN Application("DSN_CMWT") 15 | Set cmd = Server.CreateObject("ADODB.Command") 16 | Set rs = Server.CreateObject("ADODB.Recordset") 17 | rs.CursorLocation = adUseClient 18 | rs.CursorType = adOpenStatic 19 | rs.LockType = adLockReadOnly 20 | Set cmd.ActiveConnection = conn 21 | cmd.CommandType = adCmdText 22 | cmd.CommandText = query 23 | rs.Open cmd 24 | 25 | Response.Write "INSERT INTO dbo.Reports2
" & _ 26 | "([ReportType],[ReportName],[Query],[CreatedBy],[DateCreated],[Comment])
" & _ 27 | "VALUES
" 28 | 29 | rows = rs.RecordCount 30 | crow = 1 31 | Do Until rs.EOF 32 | Response.Write "(" & rs.Fields("ReportType").value & ", " & _ 33 | "'" & rs.Fields("ReportName").value & "', " & _ 34 | "'" & rs.Fields("Query").value & "', " & _ 35 | "'" & rs.Fields("CreatedBy").value & "', " & _ 36 | "'" & rs.Fields("DateCreated").value & "', " & _ 37 | "'" & rs.Fields("Comment").value & "')" 38 | If crow < rows Then 39 | Response.Write ",
" 40 | Else 41 | Response.Write "
" 42 | End If 43 | crow = crow + 1 44 | rs.MoveNext 45 | Loop 46 | 47 | CMWT_DB_CLOSE() 48 | %> -------------------------------------------------------------------------------- /noteadd.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... noteadd.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... create custom note attachment 7 | '----------------------------------------------------------------------------- 8 | Response.Expires = -1 9 | 10 | PageTitle = "New Note" 11 | SelfLink = "noteadd.asp" 12 | ItemID = CMWT_GET("id", "") 13 | ItemType = CMWT_GET("t", "") 14 | QueryON = CMWT_GET("qq", "") 15 | 16 | CMWT_VALIDATE ItemID, "Item Name or ID was not provided" 17 | CMWT_VALIDATE ItemType, "Item Class or Type was not specified" 18 | 19 | time1 = Timer 20 | 21 | CMWT_NewPage "document.form1.comm.focus()", "", "" 22 | 23 | %> 24 | 25 | 26 |
27 | 28 | 29 | 33 | 34 |
30 | 31 |
(2000 character limit. Avoid special characters) 32 |
35 |
36 |
37 | 38 | 39 | 40 | 41 | 42 |
43 |
44 | 45 | <% CMWT_Footer() %> 46 | 47 | 48 | -------------------------------------------------------------------------------- /chassistype.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... chassistype.asp 5 | ' lastupdate..... 12/12/2016 6 | ' description.... list computers by specific chassis type number 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | ctnum = CMWT_GET("ct", "") 10 | SortBy = CMWT_GET("s", "ComputerName") 11 | 12 | CMWT_VALIDATE ctnum, "Chassis Type number was not provided" 13 | 14 | PageTitle = "Chassis Type: " & ctnum 15 | PageBackLink = "assets.asp" 16 | PageBackName = "Assets" 17 | 18 | CMWT_NewPage "", "", "" 19 | %> 20 | 21 | 22 | <% 23 | 24 | query = "SELECT dbo.v_GS_COMPUTER_SYSTEM.ResourceID, dbo.v_GS_COMPUTER_SYSTEM.Name0 AS ComputerName, " & _ 25 | "dbo.v_GS_COMPUTER_SYSTEM.Domain0 AS Domain, dbo.v_GS_COMPUTER_SYSTEM.Manufacturer0 AS Manufacturer, " & _ 26 | "dbo.v_GS_COMPUTER_SYSTEM.Model0 AS Model, dbo.v_GS_COMPUTER_SYSTEM.UserName0 AS UserName, " & _ 27 | "dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 AS Chassis " & _ 28 | "FROM dbo.v_GS_SYSTEM_ENCLOSURE INNER JOIN " & _ 29 | "dbo.v_GS_COMPUTER_SYSTEM ON dbo.v_GS_SYSTEM_ENCLOSURE.ResourceID = dbo.v_GS_COMPUTER_SYSTEM.ResourceID " & _ 30 | "WHERE (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = " & ctnum & ") AND " & _ 31 | "dbo.v_GS_COMPUTER_SYSTEM.Model0 <> 'Virtual Machine' " & _ 32 | "ORDER BY " & SortBy 33 | 34 | Dim conn, cmd, rs 35 | CMWT_DB_QUERY Application("DSN_CMDB"), query 36 | CMWT_DB_TABLEGRID rs, "", "", "" 37 | CMWT_DB_CLOSE() 38 | CMWT_SHOW_QUERY() 39 | CMWT_Footer() 40 | Response.Write "" 41 | %> -------------------------------------------------------------------------------- /logins.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... logins.asp 5 | ' lastupdate..... 01/02/2017 6 | ' description.... device logins 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "ComputerName") 11 | FilterFN = CMWT_GET("fn", "") 12 | FilterFV = CMWT_GET("fv", "") 13 | QueryON = CMWT_GET("qq", "") 14 | 15 | if FilterFV <> "" Then 16 | PageTitle = "Device Logins: " & FilterFV 17 | else 18 | PageTitle = "Device Logins" 19 | end if 20 | PageBackLink = "reports.asp" 21 | PageBackName = "Reports" 22 | CMWT_NewPage "", "", "" 23 | %> 24 | 25 | 26 | <% 27 | 28 | query = "SELECT * FROM (SELECT " & _ 29 | "MachineResourceName AS ComputerName, " & _ 30 | "MachineResourceID AS ResourceID, " & _ 31 | "UniqueUserName AS UserID, " & _ 32 | "NumberOfLogins AS Logins, " & _ 33 | "LastLoginTime AS LastLogin, " & _ 34 | "ConsoleMinutes AS LoginMins " & _ 35 | "FROM dbo.v_UserMachineIntelligence) AS T1 " 36 | If FilterFN <> "" Then 37 | query = query & _ 38 | " WHERE (T1." & FilterFN & " = '" & FilterFV & "') " & _ 39 | "ORDER BY T1." & SortBy 40 | filtered = True 41 | Else 42 | query = query & " ORDER BY " & SortBy 43 | End If 44 | 45 | Dim conn, cmd, rs 46 | CMWT_DB_QUERY Application("DSN_CMDB"), query 47 | CMWT_DB_TableGridFilter rs, "", "logins.asp", "", "", "logins.asp" 48 | 'CMWT_DB_TABLEGRID rs, "", "logins.asp", "" 49 | CMWT_DB_CLOSE() 50 | CMWT_SHOW_QUERY() 51 | CMWT_FOOTER() 52 | 53 | Response.Write "" 54 | %> 55 | -------------------------------------------------------------------------------- /sqlrepedit2.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... sqlrepedit2.asp 5 | ' lastupdate..... 12/12/2016 6 | ' description.... update custom report query 7 | '----------------------------------------------------------------------------- 8 | Response.Expires = -1 9 | RepID = CMWT_GET("id", "") 10 | RepName = CMWT_GET("name", "") 11 | RepQuery = CMWT_GET("q", "") 12 | RepComm = CMWT_GET("comm", "") 13 | RepType = CMWT_GET("rtype", "1") 14 | CMWT_VALIDATE RepID, "Report Record ID was not provided" 15 | CMWT_VALIDATE RepName, "Report Name was not provided" 16 | CMWT_VALIDATE RepQuery, "Report Query Statement was not provided" 17 | 'CMWT_VALIDATE RepComm, "Comment was not provided" 18 | 19 | query = "UPDATE dbo.Reports2 " & _ 20 | "SET ReportName='" & RepName & "'," & _ 21 | "ReportType=" & RepType & "," & _ 22 | "Query='" & Replace(RepQuery,"'","''") & "'," & _ 23 | "Comment='" & RepComm & "', " & _ 24 | "CreatedBy='" & CMWT_USERNAME() & "'," & _ 25 | "DateCreated='" & NOW & "' " & _ 26 | "WHERE ReportID=" & RepID 27 | 'response.write query 28 | 'response.end 29 | On Error Resume Next 30 | Set conn = Server.CreateObject("ADODB.Connection") 31 | conn.ConnectionTimeOut = 5 32 | conn.Open Application("DSN_CMWT") 33 | If err.Number <> 0 Then 34 | CMWT_STOP "database connection failure" 35 | End If 36 | conn.Execute query 37 | conn.Close 38 | Set conn = Nothing 39 | 40 | targetURL = "sqlreports.asp" 41 | 42 | Caption = "Updating SQL Report" 43 | PageTitle = "ConfigMgr Web Tools" 44 | CMWT_PageRedirect TargetURL, 2 45 | '----------------------------------------------------------------------------- 46 | %> 47 | -------------------------------------------------------------------------------- /bgroup.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '----------------------------------------------------------------------------- 5 | ' filename....... bgroup.asp 6 | ' lastupdate..... 11/30/2016 7 | ' description.... site boundary group details 8 | '----------------------------------------------------------------------------- 9 | time1 = Timer 10 | 11 | BGroup = CMWT_GET("gn", "") 12 | CMWT_VALIDATE BGroup, "Group Name was not specified" 13 | 14 | SortBy = CMWT_GET("s", "Value") 15 | QueryOn = CMWT_GET("qq", "") 16 | PageTitle = BGroup 17 | PageBackLink = "bgroups.asp" 18 | PageBackName = "Boundary Groups" 19 | 20 | CMWT_NewPage "", "", "" 21 | %> 22 | 23 | 24 | <% 25 | 26 | query = "SELECT dbo.vSMS_BoundaryGroup.GroupID, dbo.vSMS_BoundaryGroup.Name, " & _ 27 | "dbo.vSMS_BoundaryGroup.Description, dbo.vSMS_Boundary.DisplayName, " & _ 28 | "dbo.vSMS_Boundary.Value " & _ 29 | "FROM dbo.vSMS_BoundaryGroup INNER JOIN " & _ 30 | "dbo.vSMS_BoundaryGroupMembers ON dbo.vSMS_BoundaryGroup.GroupID = dbo.vSMS_BoundaryGroupMembers.GroupID INNER JOIN " & _ 31 | "dbo.vSMS_Boundary ON dbo.vSMS_BoundaryGroupMembers.BoundaryID = dbo.vSMS_Boundary.BoundaryID LEFT OUTER JOIN " & _ 32 | "dbo.vSMS_BoundaryGroupSiteSystems ON dbo.vSMS_BoundaryGroupMembers.GroupID = dbo.vSMS_BoundaryGroupSiteSystems.GroupID " & _ 33 | "WHERE dbo.vSMS_BoundaryGroup.Name='" & BGroup & "' " & _ 34 | "ORDER BY " & SortBy 35 | 36 | Dim conn, cmd, rs 37 | CMWT_DB_QUERY Application("DSN_CMDB"), query 38 | CMWT_DB_TABLEGRID rs, "", "bgroup.asp?gn=" & BGroup, "" 39 | CMWT_DB_CLOSE() 40 | CMWT_SHOW_QUERY() 41 | CMWT_Footer() 42 | %> 43 | 44 | 45 | -------------------------------------------------------------------------------- /admin.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... admin.asp 5 | ' lastupdate..... 12/10/2016 6 | ' description.... CMWT administration page 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | PageTitle = "Administration" 10 | 11 | If Not CMWT_ADMIN() Then 12 | Response.Redirect "error.asp?m=Access Denied / Unauthorized User" 13 | End If 14 | 15 | CMWT_NewPage "", "", "" 16 | %> 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
23 | Insight 24 |
CMWT Event LogsCMWT Logs SummaryCMWT Task LogsCMWT Notes Library
35 | Monitoring 36 |
CMWT Active UsersCMWT Diagnostics
46 | 47 | <% CMWT_Footer() %> 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /reportsave.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... reportsave.asp 5 | ' lastupdate..... 12/03/2016 6 | ' description.... save a new custom report 7 | '----------------------------------------------------------------------------- 8 | Response.Expires = -1 9 | 10 | SearchField = CMWT_GET("r1","") 11 | SearchValue = CMWT_GET("r2","") 12 | SearchMode = CMWT_GET("r3","") 13 | OutputFields = CMWT_GET("r4","") 14 | ReportName = CMWT_GET("r0","") 15 | Comment = CMWT_GET("comm","") 16 | 17 | CMWT_VALIDATE ReportName, "Report Name was not provided" 18 | CMWT_VALIDATE SearchField, "Search Field was not selected" 19 | CMWT_VALIDATE SearchValue, "Search Value was not specified" 20 | CMWT_VALIDATE SearchMode, "Search Mode was not selected" 21 | CMWT_VALIDATE OutputFields, "Output fields were not selected" 22 | 23 | query = "INSERT INTO dbo.Reports " & _ 24 | "(ReportName, SearchField, SearchValue, SearchMode, DisplayColumns, Comment, DateCreated, CreatedBy) " & _ 25 | "VALUES (" & _ 26 | "'" & ReportName & "','" & SearchField & "','" & SearchValue & "','" & SearchMode & _ 27 | "','" & OutputFields & "','" & Comment & "','" & NOW & "','" & CMWT_USERNAME() & "')" 28 | 29 | On Error Resume Next 30 | Set conn = Server.CreateObject("ADODB.Connection") 31 | conn.ConnectionTimeOut = 5 32 | conn.Open Application("DSN_CMWT") 33 | If err.Number <> 0 Then 34 | CMWT_STOP "database connection failure" 35 | End If 36 | conn.Execute query 37 | conn.Close 38 | Set conn = Nothing 39 | 40 | targetURL = "reports.asp" 41 | 42 | Caption = "Saving new Report" 43 | PageTitle = "ConfigMgr Web Tools" 44 | CMWT_PageRedirect TargetURL, 1 45 | '----------------------------------------------------------------------------- 46 | %> 47 | -------------------------------------------------------------------------------- /confirm.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: confirm.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 02/22/2017 7 | ' Purpose...: generic deletion confirmation prompt 8 | '**************************************************************** 9 | Response.Expires = -1 10 | 11 | PageTitle = "Confirm Request" 12 | TableName = CMWT_GET("tn", "") 13 | IDColumn = CMWT_GET("pk", "") 14 | RecordID = CMWT_GET("id", "") 15 | TargetURL = CMWT_GET("t", "") 16 | QueryON = CMWT_GET("qq", "") 17 | 18 | CMWT_VALIDATE RecordID, "Table Row ID was not provided" 19 | CMWT_VALIDATE IDColumn, "Table Column Identifier was not specified" 20 | CMWT_VALIDATE TableName, "Database Table name was not specified" 21 | 22 | time1 = Timer 23 | 24 | CMWT_NewPage "document.form1.rn.focus()", "", "" 25 | CMWT_PageHeading PageTitle, "" 26 | '---------------------------------------------------------------- 27 | %> 28 | 29 |
30 | 31 | 32 | 33 | 34 | 35 | 36 | 44 | 45 |
37 |
38 | Are you sure you wish to delete this record? 39 |

40 | 41 | 42 | 43 |
46 |
47 | 48 | <% CMWT_Footer() %> 49 | 50 | 51 | -------------------------------------------------------------------------------- /adr.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... adr.asp 5 | ' lastupdate..... 12/29/2016 6 | ' description.... automatic deployment rule 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | KeyVal = CMWT_GET("id", "") 11 | 12 | CMWT_VALIDATE KeyVal, "Record id was not provided" 13 | QueryON = CMWT_GET("qq", "") 14 | 15 | PageTitle = "ADR" 16 | PageBackLink = "adrs.asp" 17 | PageBackName = "Automatic Deployments" 18 | CMWT_NewPage "", "", "" 19 | %> 20 | 21 | 22 | <% 23 | query = "SELECT " & _ 24 | "dbo.vSMS_AutoDeployments.AutoDeploymentID AS ADID, " & _ 25 | "dbo.vSMS_AutoDeployments.Name, " & _ 26 | "dbo.vSMS_AutoDeployments.Description, " & _ 27 | "dbo.vSMS_AutoDeployments.EvaluateRule, " & _ 28 | "dbo.vSMS_AutoDeployments.AutoDeploymentEnabled, " & _ 29 | "dbo.vSMS_AutoDeployments.LastRunTime, " & _ 30 | "dbo.vSMS_AutoDeployments.SecurityKey, " & _ 31 | "dbo.vSMS_AutoDeployments.AssociatedUpdateGroupID, " & _ 32 | "dbo.vSMS_AutoDeployments.IsServicingPlan, " & _ 33 | "dbo.vSMS_AutoDeployments.AssociatedDeploymentID, " & _ 34 | "dbo.vSMS_ADRDeploymentSettings.CollectionName, " & _ 35 | "dbo.vSMS_ADRDeploymentSettings.CollectionID " & _ 36 | "FROM dbo.vSMS_AutoDeployments INNER JOIN " & _ 37 | "dbo.vSMS_ADRDeploymentSettings ON " & _ 38 | "dbo.vSMS_AutoDeployments.AutoDeploymentID = dbo.vSMS_ADRDeploymentSettings.RuleID " & _ 39 | "WHERE AutoDeploymentID=" & KeyVal 40 | Dim conn, cmd, rs 41 | CMWT_DB_QUERY Application("DSN_CMDB"), query 42 | CMWT_DB_TABLEROWGRID rs, "", "adr.asp", "" 43 | CMWT_DB_CLOSE() 44 | CMWT_SHOW_QUERY() 45 | CMWT_FOOTER() 46 | 47 | Response.Write "" 48 | %> 49 | -------------------------------------------------------------------------------- /products.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... products.asp 5 | ' lastupdate..... 12/09/2016 6 | ' description.... installed software applications inventory 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | objPfx = CMWT_GET("ch", "A") 10 | QueryOn = CMWT_GET("qq", "") 11 | SortBy = CMWT_GET("s","ProductName") 12 | 13 | PageTitle = "Installed Software" 14 | PageBackLink = "software.asp" 15 | PageBackName = "Software" 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | <% 22 | CMWT_CLICKBAR objPfx, "products.asp?ch=" 23 | 24 | If objPFX <> "ALL" Then 25 | query = "SELECT DISTINCT " & _ 26 | "ARPDisplayName0 AS ProductName, " & _ 27 | "NormalizedPublisher AS Publisher, " & _ 28 | "ProductCode0 AS ProductCode, COUNT(ResourceID) AS Installs " & _ 29 | "FROM dbo.v_GS_INSTALLED_SOFTWARE_CATEGORIZED " & _ 30 | "WHERE (ARPDisplayName0 LIKE '" & objPfx & "%') " & _ 31 | "GROUP BY ARPDisplayName0, NormalizedPublisher, ProductCode0 " & _ 32 | "ORDER BY " & SortBy 33 | Else 34 | query = "SELECT DISTINCT " & _ 35 | "ARPDisplayName0 AS ProductName, " & _ 36 | "NormalizedPublisher AS Publisher, " & _ 37 | "ProductCode0 AS ProductCode, COUNT(ResourceID) AS Installs " & _ 38 | "FROM dbo.v_GS_INSTALLED_SOFTWARE_CATEGORIZED " & _ 39 | "WHERE (ARPDisplayName0 IS NOT NULL) AND (ARPDisplayName0 <> '') " & _ 40 | "GROUP BY ARPDisplayName0, NormalizedPublisher, ProductCode0 " & _ 41 | "ORDER BY " & SortBy 42 | End If 43 | 44 | Dim conn, cmd, rs 45 | CMWT_DB_QUERY Application("DSN_CMDB"), query 46 | CMWT_DB_TABLEGRID rs, "", "products.asp?ch=" & objPfx, "" 47 | CMWT_DB_CLOSE() 48 | CMWT_SHOW_QUERY() 49 | CMWT_Footer() 50 | Response.Write "" 51 | %> -------------------------------------------------------------------------------- /deployments.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... depsummary.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... deployment status summary 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "ApplicationName") 11 | QueryOn = CMWT_GET("qq", "") 12 | PageTitle = "Deployments" 13 | PageBackLink = "software.asp" 14 | PageBackName = "Software" 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | 22 | query = "SELECT DISTINCT " & _ 23 | "dbo.v_ApplicationAssignment.AssignmentID, " & _ 24 | "dbo.v_ApplicationAssignment.ApplicationName, " & _ 25 | "dbo.v_Package.PackageID, " & _ 26 | "dbo.v_ApplicationAssignment.CollectionID, " & _ 27 | "dbo.v_ApplicationAssignment.CollectionName, " & _ 28 | "CASE " & _ 29 | "WHEN dbo.v_ApplicationAssignment.AssignmentEnabled = 1 THEN 'YES' " & _ 30 | "ELSE 'NO' " & _ 31 | "END AS Enabled, " & _ 32 | "CASE " & _ 33 | "WHEN dbo.v_Collection.CollectionType = 1 THEN 'USER' " & _ 34 | "WHEN dbo.v_Collection.CollectionType = 2 THEN 'DEVICE' " & _ 35 | "END AS CollectionType, " & _ 36 | "dbo.v_Collection.MemberCount " & _ 37 | "FROM " & _ 38 | "dbo.v_ApplicationAssignment INNER JOIN " & _ 39 | "dbo.v_Collection ON dbo.v_ApplicationAssignment.CollectionID = dbo.v_Collection.CollectionID LEFT OUTER JOIN " & _ 40 | "dbo.v_Package ON dbo.v_ApplicationAssignment.ApplicationName = dbo.v_Package.Name " & _ 41 | "ORDER BY " & SortBy 42 | 43 | CMWT_DEBUG query 44 | 45 | Dim conn, cmd, rs 46 | CMWT_DB_QUERY Application("DSN_CMDB"), query 47 | CMWT_DB_TABLEGRID rs, "", "deployments.asp", "" 48 | CMWT_DB_CLOSE() 49 | CMWT_SHOW_QUERY() 50 | CMWT_FOOTER() 51 | 52 | Response.Write "" 53 | %> 54 | -------------------------------------------------------------------------------- /dupefiles.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... dupefiles.asp 5 | ' lastupdate..... 12/05/2016 6 | ' description.... duplicate software files on specified client 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | cn = CMWT_GET("cn", "") 11 | fn = CMWT_GET("fn", "") 12 | CMWT_VALIDATE cn, "Computer Name was not specified" 13 | CMWT_VALIDATE fn, "Filename was not specified" 14 | 15 | QueryOn = CMWT_GET("qq", "") 16 | SortBy = CMWT_GET("s","FileName") 17 | 18 | PageTitle = "Duplicate Files" 19 | PageBackLink = "device.asp?cn=" & cn 20 | PageBackName = "Devices: " & cn 21 | 22 | CMWT_NewPage "", "", "" 23 | %> 24 | 25 | 26 | <% 27 | Response.Write "
" & _ 28 | "Instances of file [" & fn & "] inventoried on the specified computer
" 29 | 30 | query = "SELECT DISTINCT " & _ 31 | "dbo.v_GS_SoftwareFile.FileName, " & _ 32 | "dbo.v_GS_SoftwareFile.FilePath, " & _ 33 | "dbo.v_GS_SoftwareFile.FileSize, " & _ 34 | "dbo.v_GS_SoftwareFile.FileDescription, " & _ 35 | "dbo.v_GS_SoftwareFile.FileVersion, " & _ 36 | "dbo.v_GS_SoftwareFile.FileModifiedDate " & _ 37 | "FROM " & _ 38 | "dbo.v_R_System INNER JOIN " & _ 39 | "dbo.v_GS_SoftwareFile ON dbo.v_R_System.ResourceID = dbo.v_GS_SoftwareFile.ResourceID " & _ 40 | "WHERE " & _ 41 | "(dbo.v_R_System.Name0 = '" & cn & "') " & _ 42 | "AND " & _ 43 | "(dbo.v_GS_SoftwareFile.FileName='" & fn & "') " & _ 44 | "ORDER BY " & SortBy 45 | 46 | Dim conn, cmd, rs 47 | CMWT_DB_QUERY Application("DSN_CMDB"), query 48 | CMWT_DB_TABLEGRID rs, "", "dupefiles.asp", "" 49 | CMWT_DB_CLOSE() 50 | CMWT_SHOW_QUERY() 51 | CMWT_Footer() 52 | Response.Write "" 53 | %> -------------------------------------------------------------------------------- /updates.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... updates.asp 5 | ' lastupdate..... 12/13/2016 6 | ' description.... deployment status summary 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | SortBy = CMWT_GET("s", "BulletinID") 11 | FilterFN = CMWT_GET("fn", "") 12 | FilterFV = CMWT_GET("fv", "") 13 | QueryOn = CMWT_GET("qq", "") 14 | PageTitle = "Software Updates" 15 | PageBackLink = "software.asp" 16 | PageBackName = "Software" 17 | 18 | If FilterFN <> "" And FilterFV <> "" Then 19 | subselect = "WHERE (" & FilterFN & "='" & FilterFV & "')" 20 | Filtered = True 21 | PageTitle = "Software Updates: " & FilterFV 22 | Else 23 | subselect = "" 24 | End If 25 | 26 | CMWT_NewPage "", "", "" 27 | %> 28 | 29 | 30 | <% 31 | 32 | query = "SELECT CI_ID AS UID, BulletinID, ArticleID, SeverityName, " & _ 33 | "NumTotal AS Scanned, NumMissing AS Missing, NumPresent AS Installed, " & _ 34 | "NumNotApplicable AS NotReqd, NumUnknown AS Unknown, PercentCompliant AS Compliant, " & _ 35 | "CASE WHEN IsExpired=1 THEN 'YES' ELSE 'NO' END AS Expired, " & _ 36 | "CASE WHEN IsSuperseded=1 THEN 'YES' ELSE 'NO' END AS Superseded," & _ 37 | "CASE WHEN IsDeployed=1 THEN 'YES' ELSE 'NO' END AS Deployed," & _ 38 | "LastStatusTime " & _ 39 | "FROM dbo.vSMS_SoftwareUpdate " & _ 40 | subselect & " ORDER BY " & SortBy 41 | 42 | CMWT_DEBUG query 43 | 44 | Dim conn, cmd, rs 45 | CMWT_DB_QUERY Application("DSN_CMDB"), query 46 | 'CMWT_DB_TableGrid rs, "", "updates.asp", "" 47 | CMWT_DB_TableGridFilter rs, "", "updates.asp", "", "SeverityName", "updates.asp?fn=X&fv=Y" 48 | CMWT_DB_CLOSE() 49 | CMWT_SHOW_QUERY() 50 | CMWT_FOOTER() 51 | 52 | Response.Write "" 53 | %> 54 | -------------------------------------------------------------------------------- /sqlrepadd.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... sqlrepadd.asp 5 | ' lastupdate..... 12/07/2016 6 | ' description.... save a custom SQL report query 7 | '----------------------------------------------------------------------------- 8 | Response.Expires = -1 9 | time1 = Timer 10 | 11 | PageTitle = "New SQL Report" 12 | PageBackLink = "sqlreports.asp" 13 | PageBackName = "SQL Reports" 14 | 15 | CMWT_NewPage "document.form1.name.focus()", "", "" 16 | 17 | %> 18 | 19 | 20 |
21 | 22 | 23 | 24 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 | 40 | 41 |
Report Name 25 | 26 |
Description 31 | 32 |
SQL Query 37 | 38 |
(2000 character limit. Avoid special characters) 39 |
42 |
43 |
44 | 45 | 46 | 47 |
48 |
49 | 50 | <% CMWT_Footer() %> 51 | 52 | 53 | -------------------------------------------------------------------------------- /reports.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: reports.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 02/22/2017 7 | ' Purpose...: reports landing page 8 | '**************************************************************** 9 | time1 = Timer 10 | PageTitle = "Reports" 11 | 12 | CMWT_NewPage "", "", "" 13 | %> 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
20 | Inventory and Status Reports 21 |
Report BuilderClient Push InstallsConfigMgr Reports
Custom ReportsVirtual Machines
Saved SQL ReportsDevice Logins
45 | 46 | <% CMWT_Footer() %> 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /sqlrun.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... sqlrun.asp 5 | ' lastupdate..... 12/08/2016 6 | ' description.... execute selected SQL custom report 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | ReportID = CMWT_GET("id", "") 10 | CMWT_VALIDATE ReportID, "Report ID was not provided" 11 | 12 | QueryON = CMWT_GET("qq", "") 13 | 14 | query = "SELECT TOP 1 ReportID, ReportType, ReportName, " & _ 15 | "Query, CreatedBy, DateCreated, Comment " & _ 16 | "FROM dbo.Reports2 " & _ 17 | "WHERE ReportID=" & ReportID 18 | 19 | Dim conn, cmd, rs 20 | CMWT_DB_QUERY Application("DSN_CMWT"), query 21 | ReportName = rs.Fields("ReportName").value 22 | ReportCode = rs.Fields("Query").value 23 | DateCreated = rs.Fields("DateCreated").value 24 | CreatedBy = rs.Fields("CreatedBy").value 25 | 26 | PageTitle = "SQL Report" 27 | PageBackLink = "sqlreports.asp" 28 | PageBackName = "SQL Reports" 29 | CMWT_NewPage "", "", "" 30 | %> 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
Report NameCreated ByDate Created
<%=ReportName%><%=CreatedBy%><%=DateCreated%>
45 | <% 46 | query = ReportCode 47 | 'Response.Write query 48 | CMWT_DB_QUERY Application("DSN_CMDB"), query 49 | CMWT_DB_TABLEGRID rs, "", "sqlrun.asp?id=" & ReportID, "" 50 | CMWT_DB_CLOSE() 51 | 'Response.Write "
" 52 | CMWT_SHOW_QUERY() 53 | CMWT_FOOTER() 54 | 55 | Response.Write "" 56 | %> 57 | -------------------------------------------------------------------------------- /noteedit.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: noteedit.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 12/04/2016 7 | ' Purpose...: create new custom note 8 | '**************************************************************** 9 | Response.Expires = -1 10 | time1 = Timer 11 | 12 | PageTitle = "Edit Note" 13 | SelfLink = "noteedit.asp" 14 | PageBackLink = "notes.asp" 15 | PageBackName = "Notes Library" 16 | RowID = CMWT_GET("id", "") 17 | QueryON = CMWT_GET("qq", "") 18 | 19 | CMWT_VALIDATE RowID, "Note Record ID was not provided" 20 | 21 | query = "SELECT * FROM dbo.Notes WHERE NoteID=" & RowID 22 | Dim conn, cmd, rs 23 | CMWT_DB_QUERY Application("DSN_CMWT"), query 24 | ItemType = rs.Fields("AttachClass").value 25 | NoteText = rs.Fields("Comment").value 26 | ItemID = rs.Fields("AttachedTo").value 27 | CMWT_DB_CLOSE() 28 | 29 | CMWT_NewPage "document.form1.comm.focus()", "", "" 30 | '---------------------------------------------------------------- 31 | %> 32 | 33 | 34 | 35 |
36 | 37 | 38 | 39 | 42 | 43 |
Comment 40 | 41 |
44 |
45 |
46 | 47 | 48 | 49 | 50 | 51 |
52 |
53 | 54 | <% CMWT_Footer() %> 55 | 56 | 57 | -------------------------------------------------------------------------------- /reportedit2.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... reportedit2.asp 5 | ' lastupdate..... 12/03/2016 6 | ' description.... update custom report 7 | '----------------------------------------------------------------------------- 8 | Response.Expires = -1 9 | 10 | ReportID = CMWT_GET("id", "") 11 | SearchField = CMWT_GET("r1", "") 12 | SearchValue = CMWT_GET("r2", "") 13 | SearchMode = CMWT_GET("r3", "") 14 | OutputFields = CMWT_GET("r4", "") 15 | ReportName = CMWT_GET("rn", "") 16 | Comment = CMWT_GET("comm", "") 17 | 18 | CMWT_VALIDATE ReportID, "Report ID was not provided" 19 | CMWT_VALIDATE ReportName, "Report Name was not provided" 20 | CMWT_VALIDATE SearchField, "Search Field was not selected" 21 | CMWT_VALIDATE SearchValue, "Search Value was not specified" 22 | CMWT_VALIDATE SearchMode, "Search Mode was not selected" 23 | CMWT_VALIDATE OutputFields, "Output fields were not selected" 24 | 25 | query = "UPDATE dbo.Reports " & _ 26 | "SET " & _ 27 | "ReportName='" & ReportName & "', " & _ 28 | "SearchField='" & SearchField & "', " & _ 29 | "SearchValue='" & SearchValue & "', " & _ 30 | "SearchMode='" & SearchMode & "', " & _ 31 | "DisplayColumns='" & OutputFields & "', " & _ 32 | "Comment='" & Comment & "', " & _ 33 | "DateCreated='" & NOW & "', " & _ 34 | "CreatedBy='" & CMWT_USERNAME() & "' " & _ 35 | "WHERE ReportID=" & ReportID 36 | 37 | On Error Resume Next 38 | Set conn = Server.CreateObject("ADODB.Connection") 39 | conn.ConnectionTimeOut = 5 40 | conn.Open Application("DSN_CMWT") 41 | If err.Number <> 0 Then 42 | CMWT_STOP "database connection failure" 43 | End If 44 | conn.Execute query 45 | conn.Close 46 | Set conn = Nothing 47 | 48 | targetURL = "customreports.asp" 49 | 50 | Caption = "Updaing Note Record" 51 | PageTitle = "ConfigMgr Web Tools" 52 | CMWT_PageRedirect TargetURL, 1 53 | '----------------------------------------------------------------------------- 54 | %> 55 | -------------------------------------------------------------------------------- /test2.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... test2.asp 5 | ' lastupdate..... 12/07/2016 6 | ' description.... ASP SQL connection test validation 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | PageTitle = Application("CMWT_SubTitle") 11 | PageBackLink = "" 12 | PageBackName = "" 13 | SelfLink = "test2.asp" 14 | 15 | Dim conn 16 | On Error Resume Next 17 | Set conn = Server.CreateObject("ADODB.Connection") 18 | conn.ConnectionTimeOut = 5 19 | conn.Open Application("DSN_CMDB") 20 | If err.Number <> 0 Then 21 | testresult = "Failed!" 22 | Else 23 | testresult = "Passed!" 24 | End If 25 | conn.Close 26 | err.Clear 27 | 28 | CMWT_NewPage "", "", "" 29 | 30 | Response.Write "ConfigMgr Web Tools" 31 | 32 | Response.Write "" & _ 33 | "" & _ 34 | "
" & _ 35 | "

Welcome to CMWT!

" & _ 36 | "

CMWT Site Testing Process

" & _ 37 | "" & _ 38 | "" & _ 39 | "" & _ 40 | "" & _ 41 | "" & _ 42 | "" & _ 43 | "" & _ 44 | "" & _ 45 | "" & _ 46 | "" & _ 47 | "" & _ 48 | "" & _ 49 | "" & _ 50 | "
HTMLPassed!
ASPPassed!
Database" & testresult & "
" & _ 51 | "
" & _ 52 | "

" & _ 53 | "

" 54 | 55 | CMWT_FOOTER() 56 | 57 | Response.Write "" 58 | %> -------------------------------------------------------------------------------- /cmwtlogclear2.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... cmwtlogclear2.asp 5 | ' lastupdate..... 12/12/2016 6 | ' description.... add new custom note 7 | '----------------------------------------------------------------------------- 8 | Response.Expires = -1 9 | KeySet = CMWT_GET("l", "") 10 | RmvSet = CMWT_GET("x1", "") 11 | 12 | CMWT_VALIDATE KeySet, "Log Category was not specified" 13 | CMWT_VALIDATE RmvSet, "Administrative Action option was not selected" 14 | 15 | Select Case Ucase(KeySet) 16 | Case "EVENTS" 17 | If RmvSet = "-1" Then 18 | query = "DELETE FROM dbo.EventLog" 19 | LogDescription = "All [" & KeySet & "] log entries were cleared by " & CMWT_USERNAME() 20 | Else 21 | query = "DELETE FROM dbo.EventLog WHERE (EventDateTime < DATEADD(dd, -" & RmvSet & ", GETDATE()) )" 22 | LogDescription = "[" & KeySet & "] log entries older than " & RmvSet & " were cleared by " & CMWT_USERNAME() 23 | End If 24 | Case "TASKS" 25 | If RmvSet = "-1" Then 26 | query = "DELETE FROM dbo.Tasks" 27 | LogDescription = "All [" & KeySet & "] log entries were cleared by " & CMWT_USERNAME() 28 | Else 29 | query = "DELETE FROM dbo.Tasks WHERE (DateTimeCreated < DATEADD(dd, -" & RmvSet & ", GETDATE()) )" 30 | LogDescription = "[" & KeySet & "] log entries older than " & RmvSet & " were cleared by " & CMWT_USERNAME() 31 | End If 32 | Case Else: 33 | query = "" 34 | End Select 35 | 36 | On Error Resume Next 37 | Set conn = Server.CreateObject("ADODB.Connection") 38 | conn.ConnectionTimeOut = 5 39 | conn.Open Application("DSN_CMWT") 40 | If err.Number <> 0 Then 41 | CMWT_STOP "database connection failure" 42 | End If 43 | conn.Execute query 44 | 45 | CMWT_LogEvent conn, "INFO", "CMWT LOG", LogDescription 46 | 47 | conn.Close 48 | Set conn = Nothing 49 | 50 | TargetURL = "cmwtlog.asp?l=" & KeySet 51 | Caption = "Clearing CMWT Log Entries" 52 | PageTitle = "ConfigMgr Web Tools" 53 | CMWT_PageRedirect TargetURL, 1 54 | %> 55 | -------------------------------------------------------------------------------- /dpgroup.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '----------------------------------------------------------------------------- 5 | ' filename....... dpgroup.asp 6 | ' lastupdate..... 03/20/2016 7 | ' description.... distribution point group information 8 | '----------------------------------------------------------------------------- 9 | time1 = Timer 10 | 11 | GroupNM = CMWT_GET("gn", "") 12 | SortBy = CMWT_GET("s", "ServerName") 13 | QueryOn = CMWT_GET("qq", "") 14 | 15 | CMWT_VALIDATE GroupNM, "DP Server Group Name was not specified" 16 | 17 | pageTitle = "Distribution Point Group: " & GroupNM 18 | 19 | CMWT_NewPage "", "", "" 20 | %> 21 | 22 | 23 | <% 24 | 25 | query = "SELECT DISTINCT " & _ 26 | "dbo.v_DistributionPoints.ServerName AS DPServer, " & _ 27 | "dbo.v_DistributionPoints.Description AS DPComment, " & _ 28 | "dbo.v_DistributionPoints.IsPeerDP AS Peer, " & _ 29 | "dbo.v_DistributionPoints.IsPullDP AS PullDP, " & _ 30 | "dbo.v_DistributionPoints.IsBITS AS BITS, " & _ 31 | "dbo.v_DistributionPoints.IsMulticast AS MultiCast, " & _ 32 | "dbo.v_DistributionPoints.IsProtected AS Protected, " & _ 33 | "dbo.v_DistributionPoints.PreStagingAllowed AS Prestaged, " & _ 34 | "dbo.v_DistributionPoints.IsPXE AS PXE, " & _ 35 | "dbo.v_DistributionPoints.TransferRate, " & _ 36 | "dbo.v_DistributionPoints.Priority " & _ 37 | "FROM dbo.vSMS_DistributionPointGroup INNER JOIN " & _ 38 | "dbo.v_DPGroupMembers ON dbo.vSMS_DistributionPointGroup.GroupID = dbo.v_DPGroupMembers.GroupID " & _ 39 | "INNER JOIN " & _ 40 | "dbo.v_DistributionPoints ON dbo.v_DPGroupMembers.DPNALPath = dbo.v_DistributionPoints.NALPath " & _ 41 | "WHERE Name='" & GroupNM & "' " & _ 42 | "ORDER BY " & SortBy 43 | 44 | Dim conn, cmd, rs 45 | CMWT_DB_QUERY Application("DSN_CMDB"), query 46 | CMWT_DB_TABLEGRID rs, "", "./?sbx1=1&sbx2=1&sbx4=dpgroups.asp", "" 47 | CMWT_DB_CLOSE() 48 | CMWT_SHOW_QUERY() 49 | CMWT_Footer() 50 | %> 51 | 52 | 53 | -------------------------------------------------------------------------------- /_panel3.asp: -------------------------------------------------------------------------------- 1 | <% 2 | '----------------------------------------------------------------------------- 3 | ' filename....... _panel3.asp 4 | ' lastupdate..... 02/28/2017 5 | ' description.... CMWT home page dashboard panel 6 | '----------------------------------------------------------------------------- 7 | %> 8 |

Site Resources

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 | 43 |
Forest: Discovered Computers<%=count_computers%>
Forest: Discovered User Accounts<%=count_users%>
Forest: Discovered Groups<%=count_groups%>
Site: Site Boundary Groups<%=count_bgs%>
Site: Distribution Points<%=count_dps%>
Site: Inventoried Applications 34 | <% 35 | If count_apps > 50 Then 36 | Response.Write "" & count_apps & "" 37 | Else 38 | Response.Write "" & count_apps & "" 39 | End If 40 | %> 41 |
44 | -------------------------------------------------------------------------------- /cmtools.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... cmtools.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... tools landing page 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | PageTitle = "CM Tools" 10 | 11 | CMWT_NewPage "", "", "" 12 | %> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
CMWT DiagnosticsConfigMgr Collection ToolsCMWT Task Logs
CMWT Active UsersConfigMgr Client ToolsCMWT Event Logs
CMWT Notes LibraryMy Device Info
CMWT Logs Summary
42 | 43 | <% CMWT_Footer() %> 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /app.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... app.asp 5 | ' lastupdate..... 12/09/2016 6 | ' description.... computers with given software product installed 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | pn = CMWT_GET("pn", "") 11 | SortBy = CMWT_GET("s", "ComputerName") 12 | QueryOn = CMWT_GET("qq", "") 13 | 14 | CMWT_VALIDATE pn, "No product name was provided" 15 | 16 | PageTitle = "Computers with: " & pn 17 | PageBackLink = "products.asp?ch=" & Left(pn,1) 18 | PageBackName = "Installed Software" 19 | 20 | CMWT_NewPage "", "", "" 21 | %> 22 | 23 | 24 | <% 25 | 26 | query = "SELECT DISTINCT " & _ 27 | "dbo.v_R_System.Name0 AS ComputerName, " & _ 28 | "dbo.v_R_System.ResourceID, " & _ 29 | "dbo.v_R_System.AD_Site_Name0 AS ADSiteName, " & _ 30 | "dbo.v_GS_COMPUTER_SYSTEM.Model0 AS Model, " & _ 31 | "dbo.v_GS_COMPUTER_SYSTEM.SystemType0 AS SystemType, " & _ 32 | "dbo.v_GS_OPERATING_SYSTEM.Caption0 AS WindowsType " & _ 33 | "FROM dbo.v_GS_COMPUTER_SYSTEM INNER JOIN " & _ 34 | "dbo.v_R_System ON dbo.v_GS_COMPUTER_SYSTEM.ResourceID = dbo.v_R_System.ResourceID INNER JOIN " & _ 35 | "dbo.v_GS_OPERATING_SYSTEM ON dbo.v_R_System.ResourceID = dbo.v_GS_OPERATING_SYSTEM.ResourceID " & _ 36 | "WHERE (dbo.v_GS_COMPUTER_SYSTEM.ResourceID IN " & _ 37 | "(SELECT DISTINCT ResourceID " & _ 38 | "FROM dbo.v_GS_INSTALLED_SOFTWARE_CATEGORIZED " & _ 39 | "WHERE (ARPDisplayName0 = '" & pn & "'))) " & _ 40 | "ORDER BY " & SortBy 41 | 42 | Dim conn, cmd, rs 43 | CMWT_DB_QUERY Application("DSN_CMDB"), query 44 | CMWT_DB_TABLEGRID rs, "", "app.asp?pn=" & pn, "" 45 | CMWT_DB_CLOSE() 46 | 47 | Response.Write "
" & _ 48 | "
" & _ 49 | "Note: This report queries only by Application Product Name. In some situations, the same product may appear " & _ 50 | "from multiple Publisher names.
" 51 | 52 | CMWT_SHOW_QUERY() 53 | CMWT_FOOTER() 54 | Response.Write "" 55 | %> -------------------------------------------------------------------------------- /mydevice.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... mydevice.asp 5 | ' lastupdate..... 12/10/2016 6 | ' description.... my device information 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | cn = CMWT_GET("cn", "") 11 | If cn = "" Then 12 | ipa = Trim(Request.ServerVariables("REMOTE_ADDR")) 13 | If ipa <> "" Then 14 | Dim conn 15 | Set conn = Server.CreateObject("ADODB.Connection") 16 | On Error Resume Next 17 | conn.ConnectionTimeOut = 5 18 | conn.Open Application("DSN_CMDB") 19 | If err.Number <> 0 Then 20 | CMWT_STOP "error: database connection failure" 21 | End If 22 | cn = CMWT_HOST_BY_IP (c, ipa) 23 | If cn <> "" Then 24 | cn = cn & "
(based on IP address " & ipa & ")" 25 | End If 26 | conn.Close 27 | Else 28 | reason = "Unable to capture remote IPv4 address via browser session." 29 | End If 30 | End If 31 | 32 | pageTitle = "My Device" 33 | 34 | CMWT_NewPage "", "", "" 35 | PageBackLink = "assets.asp" 36 | PageBackName = "Assets" 37 | %> 38 | 39 | 40 | <% 41 | 42 | Response.Write "
" 43 | 44 | If cn <> "" Then 45 | acn = Split(cn, ".") 46 | hostname = acn(0) 47 | golink = "device.asp?cn=" & hostname 48 | 49 | Response.Write "

" & cn & "

" & _ 50 | "

" 53 | Else 54 | Response.Write "Sorry. We are unable to identify DNS name for IP address " & ipa & "" & _ 55 | "

Tip: Create a Shortcut to ""http://" & SiteServer & "/cmwt/mydevice.asp?cn=%COMPUTERNAME%""" & _ 56 | "
Name it 'My Device' and use that shortcut to launch the web page for a direct look-up." 57 | End If 58 | Response.Write "
" 59 | 60 | CMWT_Footer() 61 | 62 | %> 63 | 64 | 65 | -------------------------------------------------------------------------------- /about.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... about.asp 5 | ' lastupdate..... 03/01/2017 6 | ' description.... CMWT About page 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | PageTitle = "About CMWT" 10 | 11 | CMWT_NewPage "", "", "" 12 | 13 | %> 14 | 15 | 16 | 17 | 18 | 19 | 25 | 26 | <% 27 | For each sv in Split("CMWT_TITLE,CMWT_SUBTITLE,CMWT_VERSION,CMWT_BUILD,CM_SITECODE,CMWT_DOMAINSUFFIX",",") 28 | Response.Write "" & _ 29 | "" & _ 30 | "" & _ 31 | "" 32 | Next 33 | %> 34 |
20 |

Designed and developed by David Stein. For questions or feedback, please email 21 | <%=Application("CMWT_SupportMail")%>. Thank you!

22 | 23 | 24 |
" & sv & "" & Application(sv) & "
35 | 36 |
37 |

Session Data

38 | 39 | 40 | <% 41 | For each sv in Session.Contents 42 | Response.Write "" & _ 43 | "" & _ 44 | "" & _ 45 | "" 46 | Next 47 | Response.Write "" & _ 48 | "" & _ 49 | "" & _ 50 | "" 51 | %> 52 |
" & sv & "" & Session(sv) & "
BROWSER TYPE" & CMWT_BROWSER_TYPE() & "
53 | 54 | <% CMWT_Footer() %> 55 | 56 | 57 | -------------------------------------------------------------------------------- /clients.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '----------------------------------------------------------------------------- 5 | ' filename....... clients.asp 6 | ' lastupdate..... 02/22/2017 7 | ' description.... computers with or without clients installed 8 | '----------------------------------------------------------------------------- 9 | time1 = Timer 10 | 11 | cm = CMWT_GET("c", "") 12 | QueryOn = CMWT_GET("qq", "") 13 | SortBy = CMWT_GET("s", "ComputerName") 14 | 15 | Select Case cm 16 | Case "1": PageTitle = "Devices: With Client" 17 | Case "0": PageTitle = "Devices: No Client" 18 | Case Else: PageTitle = "Devices: Discovered" 19 | End Select 20 | 21 | PageBackLink = "assets.asp" 22 | PageBackName = "Assets" 23 | 24 | CMWT_NewPage "", "", "" 25 | %> 26 | 27 | 28 | <% 29 | Select Case cm 30 | Case "1": 31 | query = "SELECT DISTINCT " & _ 32 | "Name0 AS ComputerName, ResourceID, " & _ 33 | "AD_Site_Name0 AS ADSiteName, " & _ 34 | "Full_Domain_Name0 AS DomainName, " & _ 35 | "Client_Version0 AS ClientVersion, " & _ 36 | "Virtual_Machine_Host_Name0 AS VMHost " & _ 37 | "FROM dbo.v_R_System " & _ 38 | "WHERE Client0 = 1" 39 | Case "0": 40 | query = "SELECT DISTINCT " & _ 41 | "Name0 AS ComputerName, ResourceID, " & _ 42 | "AD_Site_Name0 AS ADSiteName, " & _ 43 | "Full_Domain_Name0 AS DomainName, " & _ 44 | "Virtual_Machine_Host_Name0 AS VMHost " & _ 45 | "FROM dbo.v_R_System " & _ 46 | "WHERE (Client0 IS NULL) OR (Client0 <> 1)" 47 | Case Else: 48 | query = "SELECT DISTINCT " & _ 49 | "Name0 AS ComputerName, ResourceID, " & _ 50 | "AD_Site_Name0 AS ADSiteName, " & _ 51 | "Full_Domain_Name0 AS DomainName, " & _ 52 | "Client_Version0 AS ClientVersion, " & _ 53 | "Virtual_Machine_Host_Name0 AS VMHost " & _ 54 | "FROM dbo.v_R_System" 55 | End Select 56 | query = query & " ORDER BY " & SortBy 57 | 58 | Dim conn, cmd, rs 59 | CMWT_DB_QUERY Application("DSN_CMDB"), query 60 | CMWT_DB_TABLEGRID rs, "", "clients.asp", "" 61 | CMWT_DB_CLOSE() 62 | CMWT_SHOW_QUERY() 63 | CMWT_Footer() 64 | Response.Write "" 65 | %> 66 | -------------------------------------------------------------------------------- /cmwtlog.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... cmwtlog.asp 5 | ' lastupdate..... 04/24/2017 6 | ' description.... cmwt database log maintenance 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | QueryOn = CMWT_GET("qq", "") 10 | KeySet = CMWT_GET("l", "events") 11 | LimitTo = CMWT_GET("top", "10") 12 | 13 | If Ucase(LimitTo) = "ALL" Then 14 | selx = "TOP 100 PERCENT" 15 | Else 16 | selx = "TOP " & LimitTo 17 | filtered = True 18 | End If 19 | 20 | select case Ucase(KeySet) 21 | case "TASKS": 22 | query = "SELECT " & selx & " * FROM dbo.Tasks ORDER BY DateTimeCreated DESC" 23 | PageTitle = "CMWT Task Logs" 24 | case "EVENTS": 25 | query = "SELECT " & selx & " * FROM dbo.EventLog ORDER BY EventDateTime DESC" 26 | PageTitle = "CMWT Event Logs" 27 | end select 28 | 29 | CMWT_NewPage "", "", "" 30 | PageBackLink = "admin.asp" 31 | PageBackName = "Administration" 32 | %> 33 | 34 | 35 | 36 | 39 | 45 | 46 |
37 | CMWT - Configuration Manager Web Tools :: Today is <%=FormatDateTime(Now,vbLongDate)%> 38 | 40 | <% If filtered Then %> 41 | (Top <%=LimitTo%>) 42 | <% End If %> 43 | 44 |
47 | <% 48 | 49 | if Application("CMWT_ENABLE_LOGGING") = "TRUE" Then 50 | Dim conn, cmd, rs 51 | CMWT_DB_QUERY Application("DSN_CMWT"), query 52 | CMWT_DB_TABLEGRID rs, "", "", "" 53 | CMWT_DB_CLOSE() 54 | Else 55 | CMWT_TextBlock "Logging is not enabled.

" & _ 56 | "To enable site activity logging, modify the _config.txt file " & _ 57 | "to set CMWT_ENABLE_LOGGING~TRUE

Then recycle the IIS application pool.

" 58 | End If 59 | CMWT_FOOTER() 60 | %> 61 | 62 | 63 | -------------------------------------------------------------------------------- /adtools.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: adtools.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 01/02/2017 7 | ' Purpose...: active directory tools 8 | '**************************************************************** 9 | time1 = Timer 10 | PageTitle = "Active Directory" 11 | 12 | CMWT_NewPage "", "", "" 13 | %> 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
20 | Accounts 21 |
ComputersUsersGroupsPrinters
Domain ControllersDisabled Users
39 | Infrastructure 40 |
AD SitesSchema AttributesGroup Policies
AD OU Browser
57 | 58 | <% CMWT_Footer() %> 59 | 60 | 61 | -------------------------------------------------------------------------------- /notes.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... notes.asp 5 | ' lastupdate..... 12/03/2016 6 | ' description.... notes library report 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | PageTitle = "Notes Library" 11 | PageBackLink = "admin.asp" 12 | PageBackName = "Administration" 13 | SelfLink = "notes.asp" 14 | SortBy = CMWT_GET("s", "AttachClass") 15 | QueryON = CMWT_GET("qq", "") 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | 22 | <% 23 | Response.Write "" 24 | query = "SELECT NoteID, AttachClass, AttachedTo, Comment, DateCreated, CreatedBy " & _ 25 | "FROM dbo.Notes " & _ 26 | "ORDER BY " & SortBy 27 | 28 | Dim conn, cmd, rs 29 | CMWT_DB_QUERY Application("DSN_CMWT"), query 30 | 31 | If Not(rs.BOF And rs.EOF) Then 32 | found = True 33 | xrows = rs.RecordCount 34 | xcols = rs.Fields.Count 35 | 36 | Response.Write "" 37 | For i = 0 to xcols-1 38 | Response.Write "" 39 | Next 40 | Response.Write "" 41 | 42 | Do Until rs.EOF 43 | Response.Write "" 44 | For i = 0 to xcols-1 45 | fn = rs.Fields(i).Name 46 | fv = rs.Fields(i).Value 47 | Select Case Ucase(fn) 48 | Case "NOTEID": 49 | fv = CMWT_IMG_LINK (TRUE, "icon_del2", "icon_del1", "icon_del3", "confirm.asp?id=" & fv & "&tn=notes&pk=noteid&t=notes.asp", "Remove") & " " & _ 50 | CMWT_IMG_LINK (TRUE, "icon_edit2", "icon_edit1", "icon_edit2", "noteedit.asp?id=" & fv, "Edit") 51 | Response.Write "" 52 | Case Else: 53 | Response.Write "" 54 | End Select 55 | 56 | Next 57 | Response.Write "" 58 | rs.MoveNext 59 | Loop 60 | Response.Write "" & _ 61 | "" 63 | Else 64 | Response.Write "" & _ 65 | "" 66 | End If 67 | 68 | CMWT_DB_CLOSE() 69 | 70 | Response.Write "
" & rs.Fields(i).Name & "
" & fv & "" & fv & "
" & _ 62 | xrows & " rows returned
No matching rows returned
" 71 | CMWT_SHOW_QUERY() 72 | CMWT_Footer() 73 | %> 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /sqlrepdel.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... sqlrepdel.asp 5 | ' lastupdate..... 02/22/2017 6 | ' description.... delete a custom SQL report query 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | ReportID = CMWT_GET("id", "") 11 | CMWT_VALIDATE ReportID, "Report Record ID number was not provided" 12 | 13 | PageTitle = "Delete Report" 14 | PageBackLink = "sqlreports.asp" 15 | PageBackName = "Saved Reports" 16 | 17 | IDColumn = "ReportID" 18 | TableName = "Reports2" 19 | TargetURL = "sqlreports.asp" 20 | 21 | CMWT_NewPage "document.form1.name.focus()", "", "" 22 | 23 | query = "SELECT TOP 1 " & _ 24 | "ReportID, ReportType, ReportName, Query, CreatedBy, DateCreated, Comment " & _ 25 | "FROM dbo.Reports2 " & _ 26 | "WHERE ReportID = " & ReportID 27 | Dim conn, cmd, rs 28 | CMWT_DB_QUERY Application("DSN_CMWT"), query 29 | r1 = rs.Fields("ReportName").value 30 | r2 = rs.Fields("ReportType").value 31 | r3 = rs.Fields("Query").value 32 | r4 = rs.Fields("Comment").value 33 | CMWT_DB_CLOSE() 34 | 35 | %> 36 | 37 | 38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 59 | 60 |
Report Name<%=r1%>
Description<%=r4%>
55 |

56 | Are you sure you wish to delete this report? 57 |

58 |
61 |
62 |
63 | 64 | 65 |
66 |
67 | 68 | <% CMWT_Footer() %> 69 | 70 | 71 | -------------------------------------------------------------------------------- /colltools.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... colltools.asp 5 | ' lastupdate..... 12/12/2016 6 | ' description.... collection tools 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | PageTitle = "Collection Tools" 11 | CollID = CMWT_GET("cid", "") 12 | GroupNum = CMWT_GET("group", "") 13 | ActType = CMWT_GET("atyp", "") 14 | ActionID1 = CMWT_GET("xx1", "") 15 | ActionID2 = CMWT_GET("xx2", "") 16 | ActionID3 = CMWT_GET("xx3", "") 17 | QueryOn = CMWT_GET("qq", "") 18 | 19 | CMWT_VALIDATE CollID, "Collection ID was not specified" 20 | CMWT_VALIDATE GroupNum, "Collection Tools action group number was not provided" 21 | 22 | Select Case GroupNum 23 | Case "1" 24 | actName = "Client-Actions" 25 | actCode = ActionID1 26 | Comment = "" 27 | CommandString = "Send-ClientAction.ps1 -Collection " & CollID & " -Action " & actCode 28 | 29 | Case "2" 30 | actName = "Client-Tools" 31 | actCode = ActionID2 32 | Comment = "" 33 | CommandString = "Send-ClientTool.ps1 -Collection " & CollID & " -Action " & actCode 34 | 35 | End Select 36 | 37 | query = "INSERT INTO dbo.Tasks " & _ 38 | "(ActivityName,ActivityType,CreatedBy,DateTimeCreated,Comment,CommandString) " & _ 39 | "VALUES " & _ 40 | "('" & actName & "','" & actType & "','" & CMWT_USERNAME() & "','" & NOW & "','" & Comment & "','" & CommandString & "')" 41 | 42 | On Error Resume Next 43 | Set conn = Server.CreateObject("ADODB.Connection") 44 | conn.ConnectionTimeOut = 5 45 | conn.Open Application("DSN_CMWT") 46 | If err.Number <> 0 Then 47 | CMWT_STOP "database connection failure" 48 | End If 49 | conn.Execute query 50 | conn.Close 51 | Set conn = Nothing 52 | 53 | PageTitle = "Collection Tools" 54 | PageBackLink = "collection.asp?id=" & CollID 55 | PageBackName = "Collection" 56 | 57 | CMWT_NewPage "", "", "" 58 | %> 59 | 60 | 61 | <% 62 | Response.Write "" & _ 63 | "
" & _ 64 | "

" & actName & " request submitted into process queue.

" & _ 65 | "

Return to Collection

" & _ 66 | "
" 67 | 68 | Response.Write "" 69 | %> -------------------------------------------------------------------------------- /adprinter.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... adprinter.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... AD printer details 7 | '----------------------------------------------------------------------------- 8 | Response.Expires = -1 9 | time1 = Timer 10 | pn = CMWT_GET("id", "") 11 | QueryOn = CMWT_GET("qq", "") 12 | CMWT_VALIDATE pn, "Printer name was not specified" 13 | 14 | PageTitle = "Printer: " & pn 15 | PageBackLink = "adprinters.asp" 16 | PageBackName = "Shared Printers" 17 | 18 | CMWT_NewPage "", "", "" 19 | %> 20 | 21 | 22 | <% 23 | Response.Write "" 24 | 25 | query = "SELECT whenCreated, printColor, printCollate, " & _ 26 | "printDuplexSupported, printStaplingSupported, printKeepPrintedJobs," & _ 27 | "printLanguage, printMediaReady, printPagesPerMinute, driverName, " & _ 28 | "url, location, serverName, printerName, name " & _ 29 | "FROM 'LDAP://" & Application("CMWT_DOMAINSUFFIX") & _ 30 | "' WHERE objectClass='printQueue' AND name='" & pn & "'" 31 | 32 | Set objConnection = CreateObject("ADODB.Connection") 33 | Set objCommand = CreateObject("ADODB.Command") 34 | objConnection.Provider = "ADsDSOObject" 35 | objConnection.Open "Active Directory Provider" 36 | 37 | Set objCommand.ActiveConnection = objConnection 38 | objCommand.CommandText = query 39 | objCommand.Properties("Page Size") = 1000 40 | objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE 41 | Set objRecordSet = objCommand.Execute 42 | 43 | If Not(objRecordSet.BOF AND objRecordSet.EOF) Then 44 | objRecordSet.MoveFirst 45 | On Error Resume Next 46 | Do Until objRecordSet.EOF 47 | For i = 0 to objRecordSet.Fields.Count - 1 48 | fn = objRecordSet.Fields(i).Name 49 | fv = objRecordSet.Fields(i).Value 50 | If VarType(fv) > 8 Then 51 | fv = Join(fv, "|") 52 | End If 53 | Response.Write "" & _ 54 | "" & _ 55 | "" 56 | Next 57 | objRecordSet.MoveNext 58 | Loop 59 | Else 60 | Response.Write "" 62 | End If 63 | 64 | Response.Write "
" & fn & "" & fv & "
" & _ 61 | "No matching rows returned
" 65 | 66 | CMWT_Footer() 67 | %> 68 | 69 | 70 | -------------------------------------------------------------------------------- /appvendors.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... appvendors.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... applications inventory by vendor 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | PageTitle = "Applications by Vendor" 11 | PageBackLink = "software.asp" 12 | PageBackName = "Software" 13 | SortBy = CMWT_GET("s", "Products DESC") 14 | QueryON = CMWT_GET("qq", "") 15 | tcount = CMWT_CM_APPCOUNT() 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | 22 | 23 | <% 24 | Dim conn, cmd, rs 25 | 26 | query = "SELECT Vendor, Products FROM (" & _ 27 | "SELECT DISTINCT Publisher0 AS Vendor, COUNT(DISTINCT DisplayName0) AS Products " & _ 28 | "FROM dbo.v_GS_ADD_REMOVE_PROGRAMS " & _ 29 | "WHERE Publisher0 IS NOT NULL AND LTRIM(Publisher0)<>'' " & _ 30 | "GROUP BY Publisher0) AS T1 " & _ 31 | "ORDER BY T1." & SortBy 32 | 33 | CMWT_DB_QUERY Application("DSN_CMDB"), query 34 | 35 | If Not(rs.BOF and rs.EOF) Then 36 | xrows = rs.RecordCount 37 | xcols = rs.Fields.Count 38 | 39 | Response.Write "" 40 | For i = 0 to xcols - 1 41 | fn = rs.Fields(i).Name 42 | fx = CMWT_SORTLINK ("appvendors.asp", fn, SortBy) 43 | Response.Write "" 44 | Next 45 | Response.Write "" 46 | 47 | Do Until rs.EOF 48 | Response.Write "" 49 | For i = 0 to xcols - 1 50 | fn = rs.Fields(i).Name 51 | fv = rs.Fields(i).Value 52 | Select Case Ucase(fn) 53 | Case "VENDOR": 54 | fv = "" & fv & "" 55 | End Select 56 | Response.Write "" 57 | Next 58 | Response.Write "" 59 | rs.MoveNext 60 | Loop 61 | Response.Write "" 63 | Else 64 | Response.Write "" 65 | End If 66 | 67 | CMWT_DB_CLOSE() 68 | 69 | %> 70 |
" & fx & "
" & fv & "
" & _ 62 | xrows & " rows returned
No rows returned
71 | 72 | <% 73 | CMWT_SHOW_QUERY() 74 | CMWT_FOOTER() 75 | %> 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /adgpos.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... adgpos.asp 5 | ' lastupdate..... 12/10/2016 6 | ' description.... group policy objects 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | QueryOn = CMWT_GET("qq", "") 10 | SortBy = CMWT_GET("s","DisplayName") 11 | 12 | PageTitle = "Group Policy Objects" 13 | PageBackLink = "adtools.asp" 14 | PageBackName = "Active Directory" 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | <% 21 | strDomain = Application("CMWT_DOMAINSUFFIX") 22 | 23 | On Error Resume Next 24 | Set objGPM = Server.CreateObject("GPMgmt.GPM") 25 | If err.Number <> 0 Then 26 | CMWT_ERROR "Group Policy Management tools must be installed on the CMWT host server" 27 | End If 28 | 29 | Set objGPMConstants = objGPM.GetConstants() 30 | Set objGPMDomain = objGPM.GetDomain(strDomain, "", objGPMConstants.UseAnyDC) 31 | Set objGPMSearchCriteria = objGPM.CreateSearchCriteria 32 | Set objGPOList = objGPMDomain.SearchGPOs(objGPMSearchCriteria) 33 | 34 | xrows = objGPOList.Count 35 | 36 | fnlist = "DisplayName,DomainName,ModificationTime" 37 | 38 | Response.Write "" 39 | For each fn in Split(fnlist, ",") 40 | Response.Write "" 41 | Next 42 | Response.Write "" 43 | for each objGPO in objGPOList 44 | dn = objGPO.DisplayName 45 | response.write "" 46 | Response.Write "" 47 | 'Response.Write "" 48 | Response.Write "" 49 | Response.Write "" 50 | 'Response.Write "" 51 | 'Response.Write "" 52 | 'Response.Write "" 53 | 'Response.Write "" 54 | 'Response.Write "" 55 | Response.Write "" 56 | next 57 | Response.Write "
" & fn & "
" & dn & "" & objGPO.ID & "" & objGPO.DomainName & "" & objGPO.ModificationTime & "" & objGPO.ComputerDSVersionNumber & "" & objGPO.UserDSVersionNumber & "" & objGPO.ComputerSysVolVersionNumber & "" & objGPO.UserSysVolVersionNumber & "" & objGPO.Path & "
" 58 | 59 | 'CMWT_SHOW_QUERY() 60 | CMWT_FOOTER() 61 | Response.Write "" 62 | %> -------------------------------------------------------------------------------- /admod.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '----------------------------------------------------------------------------- 5 | ' filename....... admod.asp 6 | ' lastupdate..... 04/24/2017 7 | ' description.... active directory object modification 8 | '----------------------------------------------------------------------------- 9 | time1 = Timer 10 | 11 | acctID = CMWT_GET("acct", "") 12 | destID = CMWT_GET("dest", "") 13 | typeID = CMWT_GET("type", "") 14 | QueryOn = CMWT_GET("qq", "") 15 | 16 | CMWT_VALIDATE acctID, "Account ID was not specified" 17 | CMWT_VALIDATE destID, "Destination ID was not specified" 18 | 19 | 'Response.Write "

action: " & typeID & "

" 20 | 'Response.Write "

account ID: " & acctID & "

" 21 | 'Response.Write "

destination: " & destID & "

" 22 | 23 | If Application("CMWT_ENABLE_LOGGING") = "TRUE" Then 24 | Dim conn, cmd, rs 25 | CMWT_DB_OPEN Application("DSN_CMWT") 26 | End If 27 | 28 | Select Case typeID 29 | Case "adduser" 30 | err.Clear 31 | On Error Resume Next 32 | udn = CMWT_AD_GetADsPath(acctID, "user") 33 | if err.number <> 0 Then response.write "exception1: " & err.Description : response.end 34 | 35 | gdn = CMWT_AD_GetADsPath(destID, "group") 36 | if err.number <> 0 Then response.write "exception2: " & err.Description : response.end 37 | 38 | set openDS = GetObject("LDAP:") 39 | if err.number <> 0 Then response.write "exception3: " & err.Description : response.end 40 | 41 | set objUser = openDS.OpenDSObject("LDAP://" & udn, Application("CM_AD_TOOLUSER"), Application("CM_AD_TOOLPASS"), ADS_SECURE_AUTHENTICATION) 42 | if err.number <> 0 Then response.write "exception4: " & err.Description : response.end 43 | 44 | set objGroup = openDS.OpenDSObject("LDAP://" & gdn, Application("CM_AD_TOOLUSER"), Application("CM_AD_TOOLPASS"), ADS_SECURE_AUTHENTICATION) 45 | if err.number <> 0 Then response.write "exception5: " & err.Description : response.end 46 | 47 | objGroup.Add("LDAP://" & udn) 48 | if err.number <> 0 Then response.write "exception6: " & err.Description : response.end 49 | 50 | CMWT_LogEvent conn, "AD", "GROUP MEMBER ADD", acctID& " has been added to " & destID 51 | 52 | targetUrl = "aduser.asp?uid=" & acctID & "&set=2" 53 | 54 | Case "remuser" 55 | ' 56 | End Select 57 | 58 | If Application("CMWT_ENABLE_LOGGING") = "TRUE" Then 59 | CMWT_DB_CLOSE() 60 | End If 61 | 62 | If targetUrl <> "" Then 63 | Response.Redirect targetUrl 64 | End If 65 | %> 66 | -------------------------------------------------------------------------------- /vendorapps.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... vendorapps.asp 5 | ' lastupdate..... 11/27/2016 6 | ' description.... applications installs for a specific vendor 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | VendorName = CMWT_GET("vn", "") 11 | CMWT_VALIDATE VendorName, "Vendor Name was not specified" 12 | pageTitle = "Applications: " & VendorName 13 | SortBy = CMWT_GET("s", "QTY DESC") 14 | QueryON = CMWT_GET("qq", "") 15 | 16 | CMWT_NewPage "", "", "" 17 | %> 18 | 19 | 20 | 21 | 22 | <% 23 | Dim conn, cmd, rs 24 | 25 | query = "SELECT ProductName, Vendor, QTY FROM (" & _ 26 | "SELECT DISTINCT DisplayName0 AS ProductName, Publisher0 AS Vendor, COUNT(*) AS QTY " & _ 27 | "FROM dbo.v_GS_ADD_REMOVE_PROGRAMS " & _ 28 | "WHERE Publisher0 ='" & VendorName & "' " & _ 29 | "GROUP BY DisplayName0, Publisher0, ResourceID " & _ 30 | ") AS T1 " & _ 31 | "ORDER BY T1." & SortBy 32 | 33 | CMWT_DB_QUERY Application("DSN_CMDB"), query 34 | 35 | If Not(rs.BOF and rs.EOF) Then 36 | xrows = rs.RecordCount 37 | xcols = rs.Fields.Count 38 | 39 | Response.Write "" 40 | For i = 0 to xcols - 1 41 | fn = rs.Fields(i).Name 42 | fx = CMWT_SORTLINK ("appvendors.asp", fn, SortBy) 43 | Response.Write "" 44 | Next 45 | Response.Write "" 46 | 47 | Do Until rs.EOF 48 | Response.Write "" 49 | For i = 0 to xcols - 1 50 | fn = rs.Fields(i).Name 51 | fv = rs.Fields(i).Value 52 | Select Case Ucase(fn) 53 | Case "PRODUCTNAME": 54 | fv = "" & fv & "" 55 | End Select 56 | Response.Write "" 57 | Next 58 | Response.Write "" 59 | rs.MoveNext 60 | Loop 61 | Response.Write "" 63 | Else 64 | Response.Write "" 65 | End If 66 | 67 | CMWT_DB_CLOSE() 68 | 69 | %> 70 |
" & fx & "
" & fv & "
" & _ 62 | xrows & " rows returned
No rows returned
71 | 72 | <% 73 | CMWT_SHOW_QUERY() 74 | CMWT_Footer() 75 | %> 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /sqlrepedit.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... sqlrepedit.asp 5 | ' lastupdate..... 12/12/2016 6 | ' description.... edit a custom SQL report query 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | ReportID = CMWT_GET("id", "") 11 | CMWT_VALIDATE ReportID, "Report Record ID number was not provided" 12 | 13 | PageTitle = "Modify Report" 14 | PageBackLink = "sqlreports.asp" 15 | PageBackName = "Saved Reports" 16 | 17 | CMWT_NewPage "document.form1.name.focus()", "", "" 18 | 19 | query = "SELECT TOP 1 " & _ 20 | "ReportID, ReportType, ReportName, Query, CreatedBy, DateCreated, Comment " & _ 21 | "FROM dbo.Reports2 " & _ 22 | "WHERE ReportID = " & ReportID 23 | Dim conn, cmd, rs 24 | CMWT_DB_QUERY Application("DSN_CMWT"), query 25 | r1 = rs.Fields("ReportName").value 26 | r2 = rs.Fields("ReportType").value 27 | r3 = rs.Fields("Query").value 28 | r4 = rs.Fields("Comment").value 29 | CMWT_DB_CLOSE() 30 | 31 | %> 32 | 33 | 34 |
35 | 36 | 37 | 38 | 39 | 40 | 43 | 44 | 45 | 46 | 49 | 50 | 51 | 52 | 56 | 57 |
Report Name 41 | 42 |
Description 47 | 48 |
SQL Query 53 | 54 |
(2000 character limit. Avoid special characters) 55 |
58 |
59 |
60 | 61 | 62 | 63 |
64 |
65 | 66 | <% CMWT_Footer() %> 67 | 68 | 69 | -------------------------------------------------------------------------------- /cmwtlogclear.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... cmwtlogclear.asp 5 | ' lastupdate..... 12/04/2016 6 | ' description.... cmwt log table clear request 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | KeySet = CMWT_GET("l", "") 10 | 11 | PageTitle = "Clear CMWT Log" 12 | PageBackLink = "admin.asp" 13 | PageBackName = "Administration" 14 | CMWT_NewPage "", "", "" 15 | %> 16 | 17 | 18 |
19 | 20 | 21 | 22 | 42 | 43 | 44 | 45 | 57 | 58 | 59 | 62 | 63 |
CMWT Log Group 23 | <% 24 | If KeySet <> "" Then 25 | Response.Write "" & _ 28 | "" 29 | Else 30 | Response.Write "" 39 | End If 40 | %> 41 |
Select Clearing Option 46 | 56 |
60 | WARNING: This action is permanent and cannot be undone. 61 |
64 |

65 | 66 |

67 |
68 | 69 | 70 | -------------------------------------------------------------------------------- /diag.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '**************************************************************** 4 | ' Filename..: diag.asp 5 | ' Author....: David M. Stein 6 | ' Date......: 12/13/2016 7 | ' Purpose...: application diagnostics information 8 | '**************************************************************** 9 | time1 = Timer 10 | Response.Expires = -1 11 | 12 | If Not CMWT_ADMIN() Then 13 | Response.Redirect "error.asp?m=Access Denied / Unauthorized User" 14 | End If 15 | 16 | PageTitle = "Diagnostics" 17 | PageBackLink = "admin.asp" 18 | PageBackName = "Administration" 19 | 20 | SortBy = CMWT_GET("s", "ServerName") 21 | QueryON = CMWT_GET("qq", "") 22 | CMWT_NewPage "", "", "" 23 | %> 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | <% 34 | For each sv in Session.Contents 35 | Response.Write "" & _ 36 | "" & _ 37 | "" & _ 38 | "" 39 | Next 40 | Response.Write "" & _ 41 | "" & _ 42 | "" & _ 43 | "" 44 | %> 45 |
VariableAssigned Value
" & sv & "" & Session(sv) & "
BROWSER TYPE" & CMWT_BROWSER_TYPE() & "
46 | 47 | <% 48 | 'Response.End 49 | IF CMWT_ADMIN() Then 50 | %> 51 | 52 |
53 |

Application Data

54 | 55 | 56 | 57 | 58 | 59 | 60 | <% 61 | For each sv in Application.Contents 62 | If Ucase(sv) = "CM_AD_TOOLPASS" Then 63 | svv = "***************" 64 | Else 65 | svv = Application(sv) 66 | End If 67 | Response.Write "" & _ 68 | "" & _ 69 | "" & _ 70 | "" 71 | Next 72 | %> 73 |
VariableAssigned Value
" & sv & "" & svv & "
74 | 75 |

Server Configuration

76 | 77 | 78 | 79 | 80 | 81 | 82 | <% 83 | For each sv in Request.ServerVariables() 84 | Response.Write "" & _ 85 | "" & _ 86 | "" & _ 87 | "" 88 | Next 89 | %> 90 |
VariableAssigned Value
" & sv & "" & Request.ServerVariables(sv) & "
91 | <% 92 | End If 93 | CMWT_Footer() 94 | %> 95 | 96 | 97 | -------------------------------------------------------------------------------- /_panel2.asp: -------------------------------------------------------------------------------- 1 | <% 2 | '----------------------------------------------------------------------------- 3 | ' filename....... _panel2.asp 4 | ' lastupdate..... 03/01/2017 5 | ' description.... CMWT home page dashboard panel 6 | '----------------------------------------------------------------------------- 7 | ' comma-delimited list of WMI service names to ignore in report 8 | IgnoreServices = "MapsBroker,sppsvc" 9 | 10 | Sub WMI_TGRID (hostname, columns, className, clause, caption, sortby, autolink) 11 | Dim cn, objWMIService, colItems, objItem, query, val, PropertyName, afx, afn, afl, rows, cols 12 | Response.Write "

" & caption & "

" & _ 13 | "" 14 | cols = Ubound(Split(columns,","))+1 15 | For each cn in Split(columns, ",") 16 | Response.Write "" 19 | Next 20 | Response.Write "" 21 | query = "SELECT " & columns & " FROM " & className 22 | If clause <> "" Then 23 | query = query & " WHERE " & clause 24 | End If 25 | For each svc in Split(IgnoreServices,",") 26 | query = query & " AND (Name <> '" & svc & "')" 27 | Next 28 | Set objWMIService = GetObject("winmgmts:\\" & hostname & "\root\CIMV2") 29 | Set colItems = objWMIService.ExecQuery(query,,48) 30 | If CMWT_NotNullString(autolink) Then 31 | afx = Split(autolink,"=") 32 | afn = afx(0) 33 | afl = afx(1) 34 | Else 35 | afn = "" 36 | afl = "" 37 | End If 38 | For Each objItem in colItems 39 | Response.Write "" 40 | For each PropertyName in Split(columns, ",") 41 | val = objItem.Properties_.Item(PropertyName) 42 | If CMWT_NotNullString(afn) And Ucase(afn)=Ucase(PropertyName) Then 43 | val = "" & val & "" 44 | End If 45 | Response.Write "" 46 | Next 47 | Response.Write "" 48 | rows = rows + 1 49 | Next 50 | If rows = 0 Then 51 | Response.Write "" & _ 52 | "" 55 | Else 56 | Response.Write "" 58 | End If 59 | Response.Write "
" & _ 17 | "" & cn & "
" & val & "
" & _ 53 | "" & _ 54 | "All Services Appear Good
" & _ 57 | rows & " stopped services found (click Service Name for details)
" 60 | End Sub 61 | 62 | wmi_columns = "DisplayName,Name,StartMode,State,StartName" 63 | wmi_class = "Win32_Service" 64 | WMI_TGRID ".", wmi_columns, wmi_class, "StartMode='Auto' AND State='Stopped'", "Services Health", "DisplayName", "Name=service.asp?sn=" 65 | 66 | %> 67 | -------------------------------------------------------------------------------- /addc.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '**************************************************************** 5 | ' Filename..: addc.asp 6 | ' Author....: David M. Stein 7 | ' Date......: 11/30/2016 8 | ' Purpose...: active directory domain controllers 9 | '**************************************************************** 10 | time1 = Timer 11 | 12 | PageTitle = "Domain Controllers" 13 | PageBackLink = "adtools.asp" 14 | PageBackName = "Active Directory" 15 | 16 | ADDom = CMWT_GET("d", "") 17 | SortBy = CMWT_GET("s", "Full_Domain_Name0") 18 | 19 | CMWT_NewPage "", "", "" 20 | %> 21 | 22 | 23 | <% 24 | 25 | Set objConnection = Server.CreateObject("ADODB.Connection") 26 | Set objCommand = Server.CreateObject("ADODB.Command") 27 | objConnection.Provider = "ADsDSOObject" 28 | objConnection.Open "Active Directory Provider" 29 | Set objCOmmand.ActiveConnection = objConnection 30 | 31 | objCommand.CommandText = _ 32 | "SELECT name,distinguishedName FROM " & _ 33 | "'LDAP://ou=Domain Controllers," & Application("CMWT_DomainPath") & "' WHERE objectClass='computer'" 34 | 35 | objCommand.Properties("Page Size") = 1000 36 | objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE 37 | 38 | Set objRecordSet = objCommand.Execute 39 | 40 | If Not (objRecordSet.BOF and objRecordSet.EOF) Then 41 | objRecordSet.MoveFirst 42 | xrows = objRecordSet.RecordCount 43 | 44 | Response.Write "" & _ 45 | "" & _ 46 | "" 47 | 48 | Set rs = CreateObject("ADODB.RecordSet") 49 | 50 | rs.CursorLocation = adUseClient 51 | rs.Fields.Append "name", adVarChar, 255 52 | rs.Fields.Append "distinguishedName", adVarChar, 255 53 | rs.Open 54 | 55 | Do Until objRecordSet.EOF 56 | dn = objRecordSet.Fields("distinguishedName").Value 57 | cn = Replace(CMWT_CN(dn),"CN=","") 58 | 59 | rs.AddNew 60 | rs.Fields("name").value = cn 61 | rs.Fields("distinguishedname").value = dn 62 | rs.Update 63 | 64 | objRecordSet.MoveNext 65 | Loop 66 | 67 | rs.Sort = "name" 68 | rs.MoveFirst 69 | 70 | Do Until rs.EOF 71 | dn = rs.Fields("distinguishedName").Value 72 | cn = rs.Fields("name").value 73 | cnx = "" & cn & "" 74 | Response.Write "" & _ 75 | "" & _ 76 | "" 77 | rs.MoveNext 78 | Loop 79 | 80 | rs.Close 81 | Set rs = Nothing 82 | Response.Write "
ServerDistinguished Name
" & cnx & "" & dn & "
" & _ 83 | xrows & " rows returned
" 84 | Else 85 | Response.Write "
" & _ 86 | "No matching rows returned
" 87 | End If 88 | 89 | CMWT_Footer() 90 | %> 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /_panel5.asp: -------------------------------------------------------------------------------- 1 | <% 2 | '----------------------------------------------------------------------------- 3 | ' filename....... _panel5.asp 4 | ' lastupdate..... 03/01/2017 5 | ' description.... CMWT home page dashboard panel 6 | '----------------------------------------------------------------------------- 7 | warning_num = 0.85 8 | critical_num = 0.95 9 | 10 | wmi_class = "Win32_LogicalDisk" 11 | wmi_columns = "DeviceID,VolumeName,FileSystem,Size,Used,Free" 12 | caption = "Disk Health" 13 | 14 | Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") 15 | Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_LogicalDisk WHERE DriveType=3",,48) 16 | 17 | Response.Write "

" & caption & "

" & _ 18 | "" 19 | cols = Ubound(Split(wmi_columns,","))+1 20 | For each cn in Split(wmi_columns, ",") 21 | Response.Write "" 22 | Next 23 | Response.Write "" 24 | Response.Write "" 25 | 26 | rows = 0 27 | For Each objItem in colItems 28 | x1 = objItem.DeviceID 29 | x2 = objItem.VolumeName 30 | x3 = objItem.FileSystem 31 | x4 = Round(objItem.Size / 1024.0 / 1024 / 1024, 2) 32 | x5 = Round(objItem.FreeSpace / 1024.0 / 1024 / 1024, 2) 33 | 34 | gbytes_used = x4 - x5 35 | pct_used = Round(1 - (x5 / x4), 2) 36 | If pct_used >= critical_num Then 37 | Response.Write "" & _ 39 | "" & _ 40 | "" & _ 41 | "" & _ 42 | "" & _ 43 | "" & _ 44 | "" & _ 45 | "" 46 | rows = rows + 1 47 | ElseIf pct_used >= warning_num Then 48 | Response.Write "" & _ 50 | "" & _ 51 | "" & _ 52 | "" & _ 53 | "" & _ 54 | "" & _ 55 | "" & _ 56 | "" 57 | rows = rows + 1 58 | End If 59 | Next 60 | 61 | If rows = 0 Then 62 | Response.Write "" & _ 63 | "" 66 | Else 67 | Response.Write "" 69 | End If 70 | Response.Write "
" & cn & "Status
" & x1 & "" & x2 & "" & x3 & "" & x4 & " GB" & gbytes_used & " GB" & x5 & " GBCritical
" & x1 & "" & x2 & "" & x3 & "" & x4 & " GB" & gbytes_used & " GB" & x5 & " GBWarning
" & _ 64 | "" & _ 65 | "All Disks Appear in Good Condition
" & _ 68 | rows & " issues found
" 71 | %> 72 | -------------------------------------------------------------------------------- /config.vbs: -------------------------------------------------------------------------------- 1 | '---------------------------------------------------------------------- 2 | ' filename: config.vbs 3 | ' author: David Stein 4 | ' date created: 11/30/2016 5 | ' date modified: 12/29/2016 6 | '---------------------------------------------------------------------- 7 | 8 | Dim ScriptPath, objFSO, objFile, strFileContents, InputFile, OutputFile 9 | Dim newContent, newSet, newVal, oldVal 10 | 11 | Const Caption = "CMWT Setup" 12 | Const ConfigFile = "_config.txt" 13 | 14 | ScriptPath = Replace(wscript.ScriptFullName, "\" & wscript.ScriptName, "") 15 | 16 | InputFile = ScriptPath & "\" & ConfigFile 17 | BackupFile = ScriptPath & "\_config.bak" 18 | 19 | Const ForReading = 1 20 | Const ForWriting = 2 21 | 22 | Sub Update_File (FileName, ContentData) 23 | Dim objFile 24 | Set objFile = objFSO.OpenTextFile (FileName, ForWriting, True, 0) 25 | objFile.Write(ContentData) 26 | objFile.Close 27 | Set objFile = Nothing 28 | End Sub 29 | 30 | Function Get_ConfigSetting (KeyName, ContentString) 31 | Dim strLine, tmp, result : result = "" 32 | For each strLine in Split(ContentString, vbCRLF) 33 | If Trim(strLine) <> "" And Left(strLine,1) <> ";" Then 34 | 'Wscript.Echo "LINE: " & strLine 35 | tmp = Split(strLine,"~") 36 | If LCase(Trim(tmp(0))) = LCase(KeyName) Then 37 | result = Trim(tmp(1)) 38 | End If 39 | End If 40 | Next 41 | Get_ConfigSetting = result 42 | End Function 43 | 44 | Function Set_NewAssociation (KeyName, NewValue) 45 | Set_NewAssociation = KeyName & "~" & NewValue 46 | End Function 47 | 48 | Set objFSO = CreateObject("Scripting.FileSystemObject") 49 | 50 | On Error Resume Next 51 | 52 | Wscript.Echo "reading: " & InputFile 53 | Set objFile = objFSO.OpenTextFile(InputFile, ForReading) 54 | 55 | If err.Number = 0 Then 56 | strFileContents = objFile.ReadAll 57 | objFile.Close 58 | 59 | keys = "CMWT_DOMAIN,CMWT_DOMAINSUFFIX,CMWT_ADMINS,DSN_CMDB,DSN_CMWT," & _ 60 | "DSN_CMM,CMWT_PhysicalPath,CMWT_SiteServer,CMWT_DomainPath,CMWT_MailServer," & _ 61 | "CMWT_MailSender,CMWT_SupportMail,CMWT_ENABLE_LOGGING,CMWT_MAX_LOG_AGE_DAYS," & _ 62 | "CM_SITECODE,CM_AD_TOOLS,CM_AD_TOOLS_SAFETY," & _ 63 | "CM_AD_TOOLS_ADMINGROUPS,CM_AD_TOOLUSER,CM_AD_TOOLPASS" 64 | 65 | newContent = "" 66 | 67 | For each key in Split(keys, ",") 68 | oldVal = Get_ConfigSetting(key, strFileContents) 69 | newVal = InputBox (Replace(key, "_", " "), Caption, oldVal) 70 | newSet = Set_NewAssociation(key, newVal) 71 | If newContent <> "" Then 72 | newContent = newContent & vbCRLF & newSet 73 | Else 74 | newContent = newSet 75 | End If 76 | Next 77 | 78 | Update_File BackupFile, strFileContents 79 | Update_File InputFile, newContent 80 | 81 | Set objFSO = Nothing 82 | MsgBox "Original backed up to: " & BackupFile & vbCRLF & _ 83 | "Updated file: " & InputFile, vbOkOnly+vbInformation, Caption 84 | Else 85 | Wscript.Echo "Error: Unable to read _config.txt file" 86 | Set objFSO = Nothing 87 | End If 88 | 89 | Wscript.Echo "completed!" -------------------------------------------------------------------------------- /compstatus2.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... compstatus2.asp 5 | ' lastupdate..... 05/23/2017 6 | ' description.... component status summary - detailed view 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | 10 | FilterFN = CMWT_GET("cn", "") 11 | FilterFV = CMWT_GET("fv", "") 12 | LinkQual = CMWT_GET("lq", "") 13 | QueryOn = CMWT_GET("qq", "") 14 | 15 | PageTitle = FilterFV 16 | PageBackLink = "compstatus.asp" 17 | PageBackName = "Component Status" 18 | 19 | Select Case LinkQual 20 | Case "2147483648" 21 | cstype = "Warnings" 22 | Case "1073741824" 23 | cstype = "Errors" 24 | End Select 25 | 26 | PageTitle = PageTitle & " (" & cstype & ")" 27 | 28 | CMWT_NewPage "", "", "" 29 | %> 30 | 31 | 32 | <% 33 | Dim conn, cmd, rs 34 | 35 | query = "SELECT " & _ 36 | "com.SiteCode, " & _ 37 | "com.MachineName, " & _ 38 | "stat.MessageID, " & _ 39 | "stat.Time," & _ 40 | "stat.ProcessID," & _ 41 | "com.ComponentName " & _ 42 | "FROM " & _ 43 | "v_StatusMessage stat " & _ 44 | "JOIN v_ServerComponents com " & _ 45 | "ON stat.SiteCode=com.SiteCode " & _ 46 | "AND stat.MachineName=com.MachineName " & _ 47 | "AND stat.Component=com.ComponentName " & _ 48 | "WHERE " & _ 49 | "Time > DATEADD(ss,-240-(24*3600),GETDATE()) " & _ 50 | "AND " & _ 51 | "com.ComponentName='" & FilterFV & "' " & _ 52 | "AND " & _ 53 | "Severity='-" & LinkQual & "'" 54 | 55 | CMWT_DB_QUERY Application("DSN_CMDB"), query 56 | 57 | if not (rs.BOF and rs.EOF) then 58 | xrows = rs.RecordCount 59 | xcols = rs.Fields.Count 60 | Response.Write "" 61 | for i = 0 to xcols -1 62 | fn = rs.fields(i).name 63 | Select Case Ucase(fn) 64 | Case "QTY","RECS","COUNT","MEMBERS","GROUPCOUNT","COMPUTERS","CLIENTS","COVERAGE": 65 | Response.Write "" 70 | next 71 | Response.Write "" 72 | Do Until rs.EOF 73 | Response.Write "" 74 | For i = 0 to xcols-1 75 | fn = rs.Fields(i).Name 76 | fv = rs.Fields(i).Value 77 | fv = "" & fv & "" 78 | Response.Write "" 79 | next 80 | rs.MoveNext 81 | Loop 82 | Response.Write "" & _ 83 | "
" 66 | Case Else: 67 | Response.Write "" 68 | End Select 69 | Response.Write CMWT_SORTLINK("compstatus2.asp?id=" & CompName, fn, SortBy) & "
" & fv & "
" & _ 84 | xrows & " rows returned
" 85 | end if 86 | 87 | CMWT_DB_CLOSE() 88 | CMWT_SHOW_QUERY() 89 | CMWT_FOOTER() 90 | Response.Write "" 91 | %> 92 | -------------------------------------------------------------------------------- /sitelogs.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... sitelogs.asp 5 | ' lastupdate..... 12/09/2016 6 | ' description.... home page 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | SortBy = CMWT_GET("s", "FileName") 10 | PageTitle = "Site Server Logs" 11 | PageBackLink = "cmsite.asp" 12 | PageBackName = "Site Hierarchy" 13 | 14 | SelfLink = "sitelogs.asp" 15 | SortLink = "sitelogs.asp" 16 | 17 | CMWT_NewPage "", "", "" 18 | %> 19 | 20 | 21 | <% 22 | Dim conn, cmd, rs 23 | CMWT_DB_OPEN Application("DSN_CMDB") 24 | q = "SELECT TOP 1 InstallDir FROM dbo.v_Site" 25 | CMWT_DB_QUERY Application("DSN_CMDB"), q 26 | Response.Write "" 27 | installDir = rs.Fields("InstallDir").value 28 | CMWT_DB_CLOSE() 29 | 30 | logPath = installDir & "\logs" 31 | Set objFSO = CreateObject("Scripting.FileSystemObject") 32 | Set objFolder = objFSO.GetFolder(logPath) 33 | Set rsFiles = CreateObject("ADODB.RecordSet") 34 | rsFiles.CursorLocation = adUseClient 35 | rsFiles.Fields.Append "filename", adVarChar, 50 36 | rsFiles.Fields.Append "datecreated", adVarChar, 50 37 | rsFiles.Fields.Append "datemodified", adVarChar, 50 38 | rsFiles.Fields.Append "filesize", adVarChar, 50 39 | rsFiles.Open 40 | 41 | For each objFile in objFolder.Files 42 | fileName = objFile.Name 43 | filePath = logPath & "\" & fileName 44 | fileDate1 = objFile.DateCreated 45 | fileDate2 = objFile.DateLastModified 46 | fileSize = objFile.Size 47 | rsFiles.AddNew 48 | rsFiles.Fields("filename").value = fileName 49 | rsFiles.Fields("datecreated").value = fileDate1 50 | rsFiles.Fields("datemodified").value = fileDate2 51 | rsFiles.Fields("filesize").value = fileSize 52 | rsFiles.Update 53 | Next 54 | rsFiles.Sort = SortBy 55 | rsFiles.MoveFirst 56 | 57 | Response.Write "
" 58 | For each fn in Split("FileName,DateCreated,DateModified,FileSize",",") 59 | Response.Write "" 60 | Next 61 | Response.Write "" 62 | Do Until rsFiles.EOF 63 | fileName = rsFiles.Fields("filename").value 64 | fileDate1 = rsFiles.Fields("datecreated").value 65 | fileDate2 = rsFiles.Fields("datemodified").value 66 | fileSize = rsFiles.Fields("filesize").value 67 | fileLink = "" & fileName & "" 68 | Response.Write "" & _ 69 | "" & _ 70 | "" & _ 71 | "" & _ 72 | "" & _ 73 | "" 74 | rsFiles.MoveNext 75 | Loop 76 | Response.Write "
" & CMWT_SORTLINK(SortLink, fn, SortBy) & "
" & fileLink & "" & fileDate1 & "" & fileDate2 & "" & fileSize & "
" 77 | 78 | rsFiles.Close 79 | Set rsFiles = Nothing 80 | 81 | CMWT_FOOTER() 82 | Response.WRite "" 83 | %> 84 | -------------------------------------------------------------------------------- /service.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... service.asp 5 | ' lastupdate..... 12/09/2016 6 | ' description.... display windows service status 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | SvcName = CMWT_GET("sn", "") 10 | SortBy = CMWT_GET("s", "Name") 11 | QueryON = CMWT_GET("qq", "") 12 | 13 | CMWT_VALIDATE SvcName, "Service Name was not provided" 14 | 15 | PageTitle = SvcName 16 | PageBackLink = "services.asp" 17 | PageBackName = "Services" 18 | 19 | CMWT_NewPage "", "", "" 20 | %> 21 | 22 | 23 | <% 24 | strComputer = "." 25 | query = "SELECT * FROM Win32_Service WHERE Name='" & SvcName & "'" 26 | Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 27 | Set colItems = objWMIService.ExecQuery(query,,48) 28 | 29 | Response.Write "" 30 | For Each objItem in colItems 31 | If objItem.StartMode = "Auto" And objItem.State = "Stopped" Then 32 | xxx = " *** WARNING! ***" 33 | Else 34 | xxx = "" 35 | End If 36 | Response.Write "" & _ 37 | "" & _ 38 | "" & _ 39 | "" & _ 40 | "" & _ 41 | "" & _ 42 | "" & _ 43 | "" & _ 44 | "" & _ 45 | "" & _ 46 | "" & _ 47 | "" & _ 48 | "" & _ 49 | "" & _ 50 | "" & _ 51 | "" & _ 52 | "" & _ 53 | "" & _ 54 | "" & _ 55 | "" & _ 56 | "" & _ 57 | "" & _ 58 | "" & _ 59 | "" & _ 60 | "" & _ 61 | "" & _ 62 | "" & _ 63 | "" & _ 64 | "" & _ 65 | "" & _ 66 | "" & _ 67 | "" & _ 68 | "" 69 | Next 70 | Response.Write "
Display Name" & objItem.DisplayName & "
Service Name" & objItem.Name & "
Path Name" & objItem.PathName & "
Start Mode" & objItem.StartMode & "
State" & objItem.State & xxx & "
Status" & objItem.Status & "
Start Name" & objItem.StartName & "
Description" & objItem.Description & "
Service Type" & objItem.ServiceType & "
Accept Pause" & objItem.AcceptPause & "
Accept Stop" & objItem.AcceptStop & "
" 71 | 72 | CMWT_SHOW_QUERY() 73 | CMWT_Footer() 74 | Response.Write "" 75 | %> 76 | -------------------------------------------------------------------------------- /adprinters.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... adprinters.asp 5 | ' lastupdate..... 11/30/2016 6 | ' description.... AD printers report 7 | '----------------------------------------------------------------------------- 8 | Response.Expires = -1 9 | 10 | objPfx = CMWT_GET("ch", "A") 11 | SortBy = CMWT_GET("s", "printerName") 12 | QueryOn = CMWT_GET("qq", "") 13 | 14 | If CMWT_NotNullString(fxn) Then 15 | filtered = TRUE 16 | End If 17 | 18 | PageTitle = "Shared Printers" 19 | PageBackLink = "adtools.asp" 20 | PageBackName = "Active Directory" 21 | 22 | time1 = Timer 23 | 24 | CMWT_NewPage "", "", "" 25 | %> 26 | 27 | 28 | <% 29 | CMWT_CLICKBAR objPfx, "adprinters.asp?ch=" 30 | 31 | Response.Write "" 32 | 33 | If objPFX <> "ALL" Then 34 | query = "SELECT location, shortServerName, name, printerName " & _ 35 | "FROM 'LDAP://" & Application("CMWT_DOMAINPATH") & "' WHERE objectClass='printQueue' AND name='" & objPFX & "*'" 36 | Else 37 | query = "SELECT location, shortServerName, name, printerName " & _ 38 | "FROM 'LDAP://" & Application("CMWT_DOMAINPATH") & "' WHERE objectClass='printQueue'" 39 | End If 40 | query = query & " ORDER BY " & SortBy 41 | 42 | Set objConnection = CreateObject("ADODB.Connection") 43 | Set objCommand = CreateObject("ADODB.Command") 44 | objConnection.Provider = "ADsDSOObject" 45 | objConnection.Open "Active Directory Provider" 46 | 47 | Set objCommand.ActiveConnection = objConnection 48 | objCommand.CommandText = query 49 | objCommand.Properties("Page Size") = 1000 50 | objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE 51 | Set objRecordSet = objCommand.Execute 52 | 53 | If Not(objRecordSet.BOF AND objRecordSet.EOF) Then 54 | objRecordSet.MoveFirst 55 | xrows = objRecordSet.RecordCount 56 | xcols = objRecordSet.Fields.Count 57 | Response.Write "" 58 | For i = 0 to xcols - 1 59 | fn = objRecordSet.Fields(i).name 60 | Response.Write "" 61 | Next 62 | Response.Write "" 63 | 64 | On Error Resume Next 65 | Do Until objRecordSet.EOF 66 | Response.Write "" 67 | For i = 0 to xcols-1 68 | fn = objRecordSet.Fields(i).name 69 | fv = objRecordSet.Fields(i).value 70 | Select Case Ucase(fn) 71 | Case "NAME": 72 | fv = "" & fv & "" 73 | End Select 74 | Response.Write "" 75 | Next 76 | Response.Write "" 77 | objRecordSet.MoveNext 78 | Loop 79 | Response.Write "" 81 | Else 82 | Response.Write "" 84 | End If 85 | 86 | Response.Write "
" & fn & "
" & fv & "
" & _ 80 | xrows & " rows returned
" & _ 83 | "No matching rows returned
" 87 | CMWT_Footer() 88 | %> 89 | 90 | 91 | -------------------------------------------------------------------------------- /cmwtlogs.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... cmwtlogs.asp 5 | ' lastupdate..... 12/03/2016 6 | ' description.... cmwt database log maintenance 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | QueryOn = CMWT_GET("qq", "") 10 | 11 | PageTitle = "CMWT Database Logs" 12 | PageBackLink = "admin.asp" 13 | PageBackName = "Administration" 14 | CMWT_NewPage "", "", "" 15 | %> 16 | 17 | 18 | <% 19 | 20 | if Application("CMWT_ENABLE_LOGGING") = "TRUE" Then 21 | query1 = "SELECT 'Task records' AS Description, COUNT(*) AS RECS " & _ 22 | "FROM dbo.Tasks " & _ 23 | "UNION " & _ 24 | "SELECT 'Task records completed' AS Description, COUNT(*) AS RECS " & _ 25 | "FROM dbo.Tasks " & _ 26 | "WHERE DateTimeExecuted IS NOT NULL " & _ 27 | "UNION " & _ 28 | "SELECT 'Task records pending execution' AS Description, COUNT(*) AS RECS " & _ 29 | "FROM dbo.Tasks " & _ 30 | "WHERE DateTimeExecuted IS NULL " & _ 31 | "UNION " & _ 32 | "SELECT 'Task records older than " & Application("CMWT_MAX_LOG_AGE_DAYS") & _ 33 | " days' AS Description, COUNT(*) AS RECS " & _ 34 | "FROM dbo.Tasks " & _ 35 | "WHERE DateTimeCreated < GETDATE() - " & Application("CMWT_MAX_LOG_AGE_DAYS") 36 | 37 | query2 = "SELECT 'Event log records' AS Description, COUNT(*) AS RECS " & _ 38 | "FROM dbo.EventLog " & _ 39 | "UNION " & _ 40 | "SELECT 'Event log records, type INFO' AS Description, COUNT(*) AS RECS " & _ 41 | "FROM dbo.EventLog " & _ 42 | "WHERE EventType = 'INFO' " & _ 43 | "UNION " & _ 44 | "SELECT 'Event log records, type ERROR' AS Description, COUNT(*) AS RECS " & _ 45 | "FROM dbo.EventLog " & _ 46 | "WHERE EventType = 'ERROR' " & _ 47 | "UNION " & _ 48 | "SELECT 'Event log records older than " & Application("CMWT_MAX_LOG_AGE_DAYS") & _ 49 | " days' AS Description, COUNT(*) AS RECS " & _ 50 | "FROM dbo.EventLog " & _ 51 | "WHERE EventDateTime < GETDATE() - " & Application("CMWT_MAX_LOG_AGE_DAYS") 52 | 53 | query3 = "SELECT DISTINCT EventCategory, COUNT(*) AS QTY " & _ 54 | "FROM dbo.EventLog " & _ 55 | "GROUP BY EventCategory" 56 | 57 | Dim conn, cmd, rs 58 | CMWT_DB_QUERY Application("DSN_CMWT"), query1 59 | CMWT_DB_TABLEGRID rs, "", "", "" 60 | CMWT_DB_CLOSE() 61 | 62 | Response.Write "
" 63 | 64 | CMWT_DB_QUERY Application("DSN_CMWT"), query2 65 | CMWT_DB_TABLEGRID rs, "", "", "" 66 | CMWT_DB_CLOSE() 67 | 68 | Response.Write "
" 69 | 70 | CMWT_DB_QUERY Application("DSN_CMWT"), query3 71 | CMWT_DB_TABLEGRID rs, "", "", "" 72 | CMWT_DB_CLOSE() 73 | Else 74 | Response.Write "" & _ 75 | "
Logging is not enabled.

" & _ 76 | "To enable site activity logging, modify the _config.txt file " & _ 77 | "to set CMWT_ENABLE_LOGGING~TRUE

Then recycle the IIS application pool.

" & _ 78 | "
" 79 | End If 80 | 81 | CMWT_Footer() 82 | %> 83 | 84 | 85 | -------------------------------------------------------------------------------- /_chart2.asp: -------------------------------------------------------------------------------- 1 | <% 2 | '----------------------------------------------------------------------------- 3 | ' filename....... _chart2.asp 4 | ' lastupdate..... 02/26/2016 5 | ' description.... graphic chart module 2 6 | '----------------------------------------------------------------------------- 7 | 8 | Function CMWT_CM_CLIENTCOUNT () 9 | Dim query, conn, cmd, rs, result 10 | query = "SELECT COUNT(*) AS Computers FROM (SELECT DISTINCT ResourceID FROM dbo.v_R_System) AS T1" 11 | Set conn = Server.CreateObject("ADODB.Connection") 12 | conn.ConnectionTimeOut = 5 13 | conn.Open Application("DSN_CMDB") 14 | Set cmd = Server.CreateObject("ADODB.Command") 15 | Set rs = Server.CreateObject("ADODB.Recordset") 16 | rs.CursorLocation = adUseClient 17 | rs.CursorType = adOpenStatic 18 | rs.LockType = adLockReadOnly 19 | Set cmd.ActiveConnection = conn 20 | cmd.CommandType = adCmdText 21 | cmd.CommandText = query 22 | rs.Open cmd 23 | If Not(rs.BOF And rs.EOF) Then 24 | result = rs.Fields("Computers").value 25 | Else 26 | result = 0 27 | End If 28 | rs.Close 29 | conn.Close 30 | Set rs = Nothing 31 | Set cmd = Nothing 32 | Set conn = Nothing 33 | CMWT_CM_CLIENTCOUNT = result 34 | End Function 35 | 36 | Function CMWT_CM_APPCOUNT () 37 | Dim query, conn, cmd, rs, result 38 | query = "SELECT COUNT(*) AS Apps FROM (SELECT DISTINCT DisplayName0 FROM dbo.v_GS_ADD_REMOVE_PROGRAMS) AS T1" 39 | Set conn = Server.CreateObject("ADODB.Connection") 40 | conn.ConnectionTimeOut = 5 41 | conn.Open Application("DSN_CMDB") 42 | Set cmd = Server.CreateObject("ADODB.Command") 43 | Set rs = Server.CreateObject("ADODB.Recordset") 44 | rs.CursorLocation = adUseClient 45 | rs.CursorType = adOpenStatic 46 | rs.LockType = adLockReadOnly 47 | Set cmd.ActiveConnection = conn 48 | cmd.CommandType = adCmdText 49 | cmd.CommandText = query 50 | rs.Open cmd 51 | If Not(rs.BOF And rs.EOF) Then 52 | result = rs.Fields("Apps").value 53 | Else 54 | result = 0 55 | End If 56 | rs.Close 57 | conn.Close 58 | Set rs = Nothing 59 | Set cmd = Nothing 60 | Set conn = Nothing 61 | CMWT_CM_APPCOUNT = result 62 | End Function 63 | 64 | Function CMWT_CHART_DATA (query) 65 | Dim conn, cmd, rs, xx, f1, f2 66 | Set conn = Server.CreateObject("ADODB.Connection") 67 | conn.ConnectionTimeOut = 5 68 | conn.Open Application("DSN_CMDB") 69 | Set cmd = Server.CreateObject("ADODB.Command") 70 | Set rs = Server.CreateObject("ADODB.Recordset") 71 | rs.CursorLocation = adUseClient 72 | rs.CursorType = adOpenStatic 73 | rs.LockType = adLockReadOnly 74 | Set cmd.ActiveConnection = conn 75 | cmd.CommandType = adCmdText 76 | cmd.CommandText = query 77 | rs.Open cmd 78 | If Not(rs.BOF And rs.EOF) Then 79 | xx = "" 80 | Do Until rs.EOF 81 | f1 = rs.Fields("ItemName").value 82 | f2 = rs.Fields("QTY").value 83 | If xx <> "" Then 84 | xx = xx & "|" & f2 & "=" & f1 85 | Else 86 | xx = f2 & "=" & f1 87 | End If 88 | rs.MoveNext 89 | Loop 90 | End If 91 | rs.Close 92 | conn.Close 93 | Set rs = Nothing 94 | Set cmd = Nothing 95 | Set conn = Nothing 96 | CMWT_CHART_DATA = Split(xx, "|") 97 | End Function 98 | 99 | %> -------------------------------------------------------------------------------- /cmusers.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '----------------------------------------------------------------------------- 5 | ' filename....... cmusers.asp 6 | ' lastupdate..... 01/02/2017 7 | ' description.... sccm user accounts 8 | '----------------------------------------------------------------------------- 9 | time1 = Timer 10 | 11 | UserID = CMWT_GET("uid", "") 12 | objPfx = CMWT_GET("ch", "A") 13 | SortBy = CMWT_GET("s", "User_Name0") 14 | ADDom = CMWT_GET("d", "") 15 | RMode = CMWT_GET("x", "") 16 | 17 | If CMWT_NotNullString(UserID) Then 18 | PageTitle = "User Accounts: " & UserID 19 | ElseIf RMode = "1" Then 20 | PageTitle = "User Accounts by Domain" 21 | SortBy = "DOMAIN" 22 | Else 23 | PageTitle = "User Accounts" 24 | End If 25 | 26 | CMWT_NewPage "", "", "" 27 | %> 28 | 29 | 30 | <% 31 | CMWT_CLICKBAR objPfx, "cmusers.asp?ch=" 32 | 33 | Response.Write "" 34 | '---------------------------------------------------------------- 35 | fields = "Full_User_Name0 AS DisplayName, User_Name0 AS UserID, Full_Domain_Name0 AS DomainName, Mail0 AS Email" 36 | 37 | If objPFX <> "ALL" Then 38 | query = "SELECT DISTINCT " & fields & " " & _ 39 | "FROM dbo.v_R_User " & _ 40 | "WHERE User_Name0 LIKE '" & objPFX & "%' " & _ 41 | "AND Full_Domain_Name0='" & Application("CMWT_DOMAINSUFFIX") & "' " & _ 42 | "ORDER BY " & SortBy 43 | Else 44 | query = "SELECT DISTINCT " & fields & " " & _ 45 | "FROM dbo.v_R_User " & _ 46 | "WHERE Full_Domain_Name0='" & Application("CMWT_DOMAINSUFFIX") & "' " & _ 47 | "ORDER BY " & SortBy 48 | End If 49 | 50 | Dim conn, cmd, rs 51 | CMWT_DB_QUERY Application("DSN_CMDB"), query 52 | 53 | If Not(rs.BOF And rs.EOF) Then 54 | found = True 55 | xrows = rs.RecordCount 56 | xcols = rs.Fields.Count 57 | 58 | Response.Write "" 59 | For i = 0 to xcols-1 60 | fn = rs.Fields(i).Name 61 | Response.Write "" 62 | Next 63 | Response.Write "" 64 | 65 | Do Until rs.EOF 66 | Response.Write "" 67 | For i = 0 to xcols-1 68 | fn = rs.Fields(i).Name 69 | fv = rs.Fields(i).Value 70 | Select Case Ucase(fn) 71 | Case "MAIL","EMAIL","MAIL0": 72 | fv = "" & fv & "" 73 | Case "DOMAIN","DOMAINNAME": 74 | udom = fv 75 | fv = "" & fv & "" 76 | Case "USER_NAME0","USERID": 77 | fv = "" & fv & "" 78 | End Select 79 | Response.Write "" 80 | Next 81 | Response.Write "" 82 | rs.MoveNext 83 | Loop 84 | 85 | Response.Write "" & _ 86 | "" 88 | Else 89 | Response.Write "" & _ 90 | "" 91 | End If 92 | 93 | CMWT_DB_CLOSE() 94 | Response.Write "
" & fn & "
" & fv & "
" & _ 87 | xrows & " rows returned
No matching items returned
" 95 | CMWT_SHOW_QUERY() 96 | CMWT_Footer() 97 | Response.Write "" 98 | %> 99 | -------------------------------------------------------------------------------- /assets.asp: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | '----------------------------------------------------------------------------- 4 | ' filename....... assets.asp 5 | ' lastupdate..... 12/12/2016 6 | ' description.... assets and compliance landing page 7 | '----------------------------------------------------------------------------- 8 | time1 = Timer 9 | PageTitle = "Assets" 10 | PageBackLink = "" 11 | PageBackName = "" 12 | CMWT_NewPage "", "", "" 13 | %> 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
20 | Management 21 |
UsersDevicesMy Device InfoClient Summary
User CollectionsDevice CollectionsCollection Tools
39 | Inventory 40 |
Windows Server DevicesWindows DesktopsDevices by Form FactorPhysical Clients
Windows Client DevicesWindows LaptopsVirtual HostsVirtual Clients
Devices by ManufacturerDevices by Model
64 | 65 | <% CMWT_Footer() %> 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /adsites.asp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | '----------------------------------------------------------------------------- 5 | ' filename....... adsites.asp 6 | ' lastupdate..... 11/30/2016 7 | ' description.... active directory sites 8 | '----------------------------------------------------------------------------- 9 | time1 = Timer 10 | 11 | PageTitle = "Sites" 12 | PageBackLink = "adtools.asp" 13 | PageBackName = "Active Directory" 14 | 15 | Sub CMWT_AD_SUBNETS (sn) 16 | Dim objRootDSE, strSiteRDN, strSitePath, objSite 17 | Dim arrSiteObjectBL, strSiteObjectBL 18 | On Error Resume Next 19 | strSiteRDN = sn 20 | Set objRootDSE = GetObject("LDAP://RootDSE") 21 | strConfigurationNC = objRootDSE.Get("configurationNamingContext") 22 | if Err.Number <> 0 Then 23 | Response.Write "
  • Error1: " & err.Number & " / " & err.Description & "
  • " 24 | End If 25 | strSitePath = "LDAP://" & strSiteRDN & ",cn=Sites," & strConfigurationNC 26 | Set objSite = GetObject(strSitePath) 27 | if Err.Number <> 0 Then 28 | Response.Write "
  • Error2: " & err.Number & " / " & err.Description & "
  • " 29 | End If 30 | objSite.GetInfoEx Array("siteObjectBL"), 0 31 | arrSiteObjectBL = objSite.GetEx("siteObjectBL") 32 | Response.Write "
      " 33 | if Err.Number <> 0 Then 34 | Response.Write "
    • Error3: " & err.Number & " / " & err.Description & "
    • " 35 | End If 36 | For Each strSiteObjectBL In arrSiteObjectBL 37 | Response.Write "
    • " & Split(Split(strSiteObjectBL, ",")(0), "=")(1) & "
    • " 38 | Next 39 | Response.Write "
    " 40 | End Sub 41 | 42 | CMWT_NewPage "", "", "" 43 | %> 44 | 45 | 46 | <% 47 | On Error Resume Next 48 | 49 | Set objRootDSE = GetObject("LDAP://RootDSE") 50 | strConfigurationNC = objRootDSE.Get("configurationNamingContext") 51 | 52 | strSitesContainer = "LDAP://cn=Sites," & strConfigurationNC 53 | Set objSitesContainer = GetObject(strSitesContainer) 54 | objSitesContainer.Filter = Array("site") 55 | 56 | Response.Write "" & _ 57 | "" & _ 58 | "" & _ 59 | "" & _ 60 | "" & _ 61 | "" 62 | 63 | xrows = 0 64 | For Each objSite In objSitesContainer 65 | sn = objSite.CN 66 | fv = "" & sn & "" 67 | Response.Write "" 68 | Response.Write "" 69 | strSiteName = objSite.Name 70 | strServerPath = "LDAP://cn=Servers," & strSiteName & ",cn=Sites," & strConfigurationNC 71 | Set colServers = GetObject(strServerPath) 72 | 73 | Response.Write "" 79 | Response.Write "" 84 | xrows = xrows + 1 85 | Next 86 | 87 | Response.Write "
    Site NameServersSubnets
    " & fv & "
      " 74 | For Each objServer In colServers 75 | ServerName = objServer.CN 76 | Response.Write "
    • " & ServerName & "
    • " 77 | Next 78 | Response.Write "
    " 80 | 81 | CMWT_AD_SUBNETS strSiteName 82 | 83 | Response.Write "
    " & _ 88 | xrows & " rows returned
    " 89 | 90 | CMWT_Footer() 91 | %> 92 | 93 | 94 | --------------------------------------------------------------------------------