Querying URL Categories in Forefront TMG

Querying URL Categories in Forefront TMG

  • Comments 2
  • Likes

All of the URL categories for URL filtering that TMG is aware of are stored in TMG storage at the array level. Here’s an example script that queries for and returns all of the categories. Run the script on any TMG array member.

 

set root=CreateObject("FPC.Root")

For Each cat in root.GetContainingArray().RuleElements.UrlCategories

    wscript.echo "'" & cat.Name & "' --> " & cat.CategoryID

Next

 

 

Alexey Doctorovich, Software Engineer on the TMG Team

(with Nathan Bigman, Content Publishing Manager)

Comments
  • Interesting that you can get all this stuff out via vbscript, but shouldn't this sort of thing be in PowerShell by now?

    Does TMG even have a powershell provider?

    Thanks,

    Ben.

  • How to script url override in enterprise? Since previus script has array scope:

    ArrayPolicy.WebProxy.UrlFilteringSettings.OverridingUrlCategories

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment