Date of SMS/SCCM Collections - RonsWebRemoteTools

Published Saturday, January 10, 2009 10:11 PM

Here is an add-on to Ron's Web Remote Tools page, to check the last time a Collection was updated, this works for both SMS & SCCM. This will pop up an hta and present the Collection ID, Collection Name & Time Last Updated of all your collections.

Edit machrest.asp (take a back up, always better to be on the safe side) add the following around line 80ish or at the end of your other buttons, <input style='WIDTH: 180px' type='button' value='Date of SMS Collections' name='Btn735' ID='Button735'>

Add the following sub near the bottom, before </script>

' Collection last updated?
Sub Btn735_OnClick
compname = trim(document.frmMain.txtValue.value)
Set WShell = CreateObject("WScript.Shell")
set fso = CreateObject("Scripting.FileSystemObject")
strSMSServerName = "ServerName"
strDMSourceFldr = "\\" & strSMSServerName & "\Remote$\"
strcmdending = "\\ServerName\Remote$\lastcollection.hta" & chr(34) & " -c: -h: -m:" & chr(34) & compname & chr(34) & " -a:1"
        wShell.run chr(34) & strDMLocalFldr & strcmdEnding,1,vbFalse
End Sub
' gtk ends Collection last updated?

 

Copy lastcollection.hta to your Remote$ share.

Edit lastcollection.hta lines 62-64 with your values.

<p><h3 align = left><font color='Orange'>The Server name is: SERVERNAME, and the Site code is: XXX</font></h3><div></div>
Site Server Name: <Input Type = "Text" Name = "SqlServer" value="SERVERNAME">
Site Code: <Input Type = "Text" Name = "Database" value="XXX">

Credit goes to MeenEnta (aka George K) for sharing the add-ons, see forum post here.

Attachment: LastCollection.zip
Filed under:

Comments

No Comments