کد:
https://blogs.technet.com/isablog/archive/2008/07/21/change-tracking-enterprise-viewer.aspx
The Change Tracking tab is part of the ISA management console. But, it is implemented as an HTML files, and can operate outside the management console. To demonstrate this, I'll show how to use it as an enterprise Change Tracking viewer.
The Hook
If you look in C:\Program Files\Microsoft ISA Server\UI_Htmls\ChangeTrackingTab.htm, you'll notice that it has a body_onload() function, and that this function calls ChangeTracking_onload() if it exists. Also notice that it includes a script tags that tries to load ChangeTrackingAdditions.js. So, all we need is to create our own ChangeTrackingAdditions.js with ChangeTracking_onload() in it, and it will be called!
The Code
So, let's try it. Put the following into C:\Program Files\Microsoft ISA Server\UI_Htmls\ChangeTrackingAdditions.js:
کد:
function ChangeTracking_onload() { if (WithinSnapin()) { return; // Don't interfere with regular Management operation } var fpc = new ActiveXObject("FPC.Root"); // To connect to remote CSS, call fpc.ConnectToConfigurationStorageServer here var entLog = GetCTLog(fpc.Enterprise); var arrLogs = GetCTLogCollection(fpc.Arrays); var entPolLogs = GetCTLogCollection(fpc.Enterprise.Policies); insertTableHTML(arrLogs, entPolLogs, entLog); } function GetCTLogCollection(CTContainerCollection) { var logs=""; var oEnum = new Enumerator(CTContainerCollection); for( ; !oEnum.atEnd(); oEnum.moveNext() ) { logs = logs + GetCTLog(oEnum.item()); } return logs; } function GetCTLog(CTContainer) { try { var vendorSet = CTContainer.VendorParametersSets.Item("{1234C1BD-2502-4BDA-8EAD-B2DE4DD84A7D}"); return vendorSet.value("changes"); } catch (err) { return ""; // No CT log in this container } }
[TMG Update] In TMG, change function GetCTLog to:
function GetCTLog(CTContainer) { try { return CTContainer.ChangeTracking.ChangeLog; } catch (err) { return ""; // No CT log in this container } }
Now, launch ChangeTrackingTab.htm from Windows Explorer.

  • You'll get an Internet Explorer yellow warning bar where it warns you from active content. You can allow just this once, or cancel this warning for good: Internet Options -> Advanced -> Security section -> check "Allow active content to run in files on My Computer".
  • You'll also get a warning that "An ActiveX control on this page might be unsafe…". This refers to the script's use of the ISA FPC.Root control - we can trust it, right?
  • And now, you get change logs from all your arrays, enterprise and enterprise policies, all together!


This concludes the Change Tracking series. I hope you enjoyed it. Happy ISAing!

-Jonathan Barner, ISA Sustained Engineering Team








موضوعات مشابه: