home *** CD-ROM | disk | FTP | other *** search
/ moodle.waes.ac.uk / moodle.waes.ac.uk.zip / moodle.waes.ac.uk / TMG / R3-SP2-457682_intl_x64_zip.exe / TMG-KB2735208-amd64-GLB.msp / PCW_CAB_SHFx2 / FpcSqmConfig.Com.xml < prev    next >
Extensible Markup Language  |  2012-02-13  |  137KB  |  3,336 lines

  1. ∩╗┐<?xml version="1.0" encoding="utf-8" ?> 
  2. <fpcsqm:Configuration xmlns:fpcsqm="http://www.microsoft.com/isaserver/MsFpcSqmConfiguration.xsd">
  3.   
  4.   <!-- Skiped DataPoint: 104, DATAID_DATAID_SIGNALED_ALERTS1 (Obsolete) -->
  5.   <!-- Skiped DataPoint: 105, DATAID_DATAID_SIGNALED_ALERTS1 (Obsolete) -->
  6.   <!-- Skiped DataPoint: 106, DATAID_DATAID_SIGNALED_ALERTS1 (Obsolete) -->
  7.   <!-- Skiped DataPoint: 107, DATAID_DATAID_SIGNALED_ALERTS1 (Obsolete) -->
  8.   <!-- Skiped DataPoint: 146, DATAID_DATAID_SERVER_FRAMEWORK_VERSION (no longer relevant) -->
  9.   <!-- Skiped DataPoint: 148, DATAID_IAG_OS_VERSION_MAJOR (IAG) -->
  10.   <!-- Skiped DataPoint: 149, DATAID_IAG_OS_VERSION_MINOR (IAG) -->
  11.   <!-- Skiped DataPoint: 150, DATAID_IAG_OS_SP_VERSION (IAG) -->
  12.   <!-- Skiped DataPoint: 151, DATAID_IAG_VERSION (IAG) -->
  13.   <!-- Skiped DataPoint: 152, DATAID_IAG_SETUP_SUCCESSFUL (IAG) -->
  14.   <!-- Skiped DataPoint: 153, DATAID_IAG_UTM_PROXY_ENABLED (IAG) -->
  15.   <!-- Skiped DataPoint: 154, DATAID_BPA_WAS_HELPFUL (BPA) -->
  16.   <!-- Skiped DataPoint: 155, DATAID_DATAID_BPA_ALERTS1 (BPA) -->
  17.   <!-- Skiped DataPoint: 156, DATAID_DATAID_BPA_ALERTS2 (BPA) -->
  18.   <!-- Skiped DataPoint: 157, DATAID_DATAID_BPA_ALERTS3 (BPA) -->
  19.   <!-- Skiped DataPoint: 158, DATAID_DATAID_BPA_ALERTS4 (BPA) -->
  20.   <!-- Skiped DataPoint: 159, DATAID_DATAID_BPA_ALERTS5 (BPA) -->
  21.   <!-- Skiped DataPoint: 160, DATAID_DATAID_BPA_ALERTS6 (BPA) -->
  22.   <!-- Skiped DataPoint: 161, DATAID_DATAID_BPA_ALERTS7 (BPA) -->
  23.   <!-- Skiped DataPoint: 165, DATAID_IAG_OS_AUTO_UPDATE (IAG) -->
  24.   <!-- Skiped DataPoint: 166, DATAID_IAG_OS_LANGUAGE (IAG) -->
  25.   <!-- Skiped DataPoint: 167, DATAID_IAG_WFLB_APPS (IAG) -->
  26.   <!-- Skiped DataPoint: 168, DATAID_IAG_WFLB_SERVERS (IAG) -->
  27.   <!-- Skiped DataPoint: 169, DATAID_IAG_WFLB_QUESTIONS (IAG) -->
  28.  
  29.   <DataPoints>
  30.     <!-- TMG SQM data points based on TMG COM queries -->
  31.     <!-- Cache -->
  32.     <DataPoint Id="1" Name="DATAID_DELEGATED_ADMINS_COUNT">
  33.         <!-- Array DelegatedAdmins count-->
  34.       <Script>
  35.         $p = Get-Item fpc:\ContainingArray\AdminSecurity\DelegatedAdmins
  36.         $p.Children.Length
  37.       </Script>
  38.     </DataPoint>
  39.     <DataPoint Id="2" Name="DATAID_CACHE_QUESTIONS" Operation="BitField">
  40.       <!-- Cache configuration settings -->
  41.       <Script>
  42.         $cacheCfg = "fpc:\ContainingArray\Cache\CacheConfiguration"
  43.         $result = 0
  44.  
  45.         $p = Get-ItemProperty $cacheCfg CacheNon200Responses
  46.         if ($p.CacheNon200Responses -eq "True") { $result = 1 }
  47.  
  48.         $p = Get-ItemProperty $cacheCfg CacheWithNoLastModDate
  49.         if ($p.CacheWithNoLastModDate -eq "True") { $result = $result -bor 2 }
  50.  
  51.         $p = Get-ItemProperty $cacheCfg QueueRequests
  52.         if ($p.QueueRequests -eq "True") { $result = $result -bor 4 }
  53.  
  54.         $p = Get-ItemProperty $cacheCfg ReturnExpiredEnable
  55.         if ($p.ReturnExpiredEnable -eq "True") { $result = $result -bor 8 }
  56.  
  57.         $result
  58.       </Script>
  59.     </DataPoint>
  60.     <DataPoint Id="3" Name="DATAID_CACHE_RULE_COUNT">
  61.       <!-- Cache rules count -->
  62.       <Script>
  63.         $p = Get-Item fpc:\ContainingArray\Cache\CacheConfiguration\CacheRules
  64.         $p.Children.Length
  65.       </Script>
  66.     </DataPoint>
  67.     <DataPoint Id="4" Name="DATAID_CACHE_MEMORY_CACHE_MAX_URL_SIZE">
  68.       <!-- Cache configuration: memory cache max url size -->
  69.       <Script>
  70.         $p = Get-ItemProperty fpc:\ContainingArray\Cache\CacheConfiguration MemoryCacheMaxURLSize
  71.         $p.MemoryCacheMaxURLSize
  72.       </Script>
  73.     </DataPoint>
  74.     <DataPoint Id="5" Name="DATAID_CACHE_MEMORY_USAGE_PERCENTAGE">
  75.       <!-- Cache configuration: memory usage percentage -->
  76.       <Script>
  77.         $p = Get-ItemProperty fpc:\ContainingArray\Cache\CacheConfiguration MemoryUsagePercentage
  78.         $p.MemoryUsagePercentage
  79.       </Script>
  80.     </DataPoint>
  81.     <DataPoint Id="6" Name="DATAID_CACHE_RETURN_EXPIRED_MAX_TIME">
  82.       <!-- Cache configuration: return expired max time -->
  83.       <Script>
  84.         $p = Get-ItemProperty fpc:\ContainingArray\Cache\CacheConfiguration ReturnExpiredMaxTime
  85.         $p.ReturnExpiredMaxTime
  86.       </Script>
  87.     </DataPoint>
  88.     <DataPoint Id="7" Name="DATAID_CACHE_RETURN_EXPIRED_TTL_PERCENT">
  89.       <!-- Cache configuration: return expired TTL percentage -->
  90.       <Script>
  91.         $p = Get-ItemProperty fpc:\ContainingArray\Cache\CacheConfiguration ReturnExpiredTTLPercent
  92.         $p.ReturnExpiredTTLPercent
  93.       </Script>
  94.     </DataPoint>
  95.     <DataPoint Id="8" Name="DATAID_CACHE_SCHEDULED_CONTENT_DOWNLOAD">
  96.       <!-- Cache scheduled content download count -->
  97.       <Script>
  98.         $p = Get-Item fpc:\ContainingArray\Cache\ScheduledContentDownload
  99.         $p.Children.Length
  100.       </Script>
  101.     </DataPoint>
  102.     <!-- CSS -->
  103.     <DataPoint Id="9" Name="DATAID_CSS_QUESTIONS" Operation="BitField">
  104.       <!-- CSS general settings -->
  105.       <Script>
  106.         $css = "fpc:\ContainingArray\ConfigurationStorageServerConnection"
  107.         $result = 0
  108.  
  109.         $p = Get-ItemProperty $css AlternateConfigurationStorageServer
  110.         if ($p.AlternateConfigurationStorageServer.Length -gt 0) { $result = 1 }
  111.  
  112.         $p = Get-ItemProperty $css ConfigurationStorageServerConnectionType
  113.         if ($p.ConfigurationStorageServerConnectionType -eq 1) { $result = $result -bor 2 }
  114.  
  115.         $p1 = Get-ItemProperty $css ConnectionOverVPNTunnel
  116.         $p2 = Get-ItemProperty $css VpnBackupStorageServer
  117.         if ($p1.ConnectionOverVPNTunnel -and $p2.VpnBackupStorageServer.Length -gt 0) { $result = $result -bor 4 }
  118.         if ($p1.ConnectionOverVPNTunnel -eq "True") { $result = $result -bor 8 }
  119.  
  120.         $result
  121.       </Script>
  122.     </DataPoint>
  123.     <DataPoint Id="10" Name="DATAID_CSS_CHANGE_POLL_RATE">
  124.       <!-- CSS change polling rate -->
  125.       <Script>
  126.         $p = Get-ItemProperty fpc:\ContainingArray\ConfigurationStorageServerConnection ChangePollRate
  127.         $p.ChangePollRate
  128.       </Script>
  129.     </DataPoint>
  130.     <DataPoint Id="11" Name="DATAID_CSS_FALLBACK_DELAY">
  131.       <!-- CSS fallback delay -->
  132.       <Script>
  133.         $p = Get-ItemProperty fpc:\ContainingArray\ConfigurationStorageServerConnection FallbackDelay
  134.         $p.FallbackDelay
  135.       </Script>
  136.     </DataPoint>
  137.     <DataPoint Id="12" Name="DATAID_CSS_PRIMARY_STABILIZATION_DELAY">
  138.       <!-- CSS primary stabilization delay -->
  139.       <Script>
  140.         $p = Get-ItemProperty fpc:\ContainingArray\ConfigurationStorageServerConnection PrimaryStabilizationDelay
  141.         $p.PrimaryStabilizationDelay
  142.       </Script>
  143.     </DataPoint>
  144.     <DataPoint Id="13" Name="DATAID_CSS_PRIMARY_TESTING_DELAY">
  145.       <!-- CSS primary testing delay -->
  146.       <Script>
  147.         $p = Get-ItemProperty fpc:\ContainingArray\ConfigurationStorageServerConnection PrimaryTestingDelay
  148.         $p.PrimaryTestingDelay
  149.       </Script>
  150.     </DataPoint>
  151.     <!-- Networks -->
  152.     <DataPoint Id="14" Name="DATAID_INTERNAL_QUESTIONS" Operation="BitField">
  153.       <!-- Internal settings -->
  154.       <Script>
  155.         $internal = "fpc:\ContainingArray\NetworkConfiguration\Networks\'{4E32B556-0FAF-4A27-9111-085F679EDC9B}'"
  156.         $nlb = $internal + "\NLBCluster"
  157.         $listeners = $internal + "\WebListenerProperties"
  158.         $result = 0
  159.  
  160.         $p = Get-ItemProperty $internal EnableFirewallClients
  161.         if ($p.EnableFirewallClients -eq "True") { $result = 1 }
  162.  
  163.         $p = Get-ItemProperty $internal EnableWebProxyClients
  164.         if ($p.EnableWebProxyClients -eq "True") { $result = $result -bor 2 }
  165.  
  166.         $p = Get-ItemProperty $internal EnableAutoDiscoveryPort
  167.         if ($p.EnableAutoDiscoveryPort -eq "True") { $result = $result -bor 4 }
  168.  
  169.         $p = Get-ItemProperty $nlb NLBEnabled
  170.         if ($p.NLBEnabled -eq "True") { $result = $result -bor 8 }
  171.  
  172.         $p = Get-ItemProperty $listeners ResolveInArray
  173.         if ($p.ResolveInArray -eq "True") { $result = $result -bor 16 }
  174.  
  175.         $result
  176.       </Script>
  177.     </DataPoint>
  178.     <DataPoint Id="15" Name="DATAID_INTERNAL_ENTERPRISE_NETWORKS">
  179.       <!-- Internal: number of associated enterprise networks -->
  180.       <Script>
  181.         $p = Get-Item fpc:\ContainingArray\NetworkConfiguration\Networks\'{4E32B556-0FAF-4A27-9111-085F679EDC9B}'\EnterpriseNetworks
  182.         $p.Children.Length
  183.       </Script>
  184.     </DataPoint>
  185.     <DataPoint Id="16" Name="DATAID_INTERNAL_IP_RANGE_SET">
  186.       <!-- Internal: number of IP ranges -->
  187.       <Script>
  188.         $p = Get-Item fpc:\ContainingArray\NetworkConfiguration\Networks\'{4E32B556-0FAF-4A27-9111-085F679EDC9B}'\IpRangeSet
  189.         $p.Children.Length
  190.       </Script>
  191.     </DataPoint>
  192.     <DataPoint Id="17" Name="DATAID_INTERNAL_LDT">
  193.       <!-- Internal: number of LDT -->
  194.       <Script>
  195.         $p = Get-Item fpc:\ContainingArray\NetworkConfiguration\Networks\'{4E32B556-0FAF-4A27-9111-085F679EDC9B}'\LDT
  196.         $p.Children.Length
  197.       </Script>
  198.     </DataPoint>
  199.     <DataPoint Id="18" Name="DATAID_EXTERNAL_NLB_ENABLED" Operation="BitField">
  200.       <!-- External settings -->
  201.       <Script>
  202.         $result = 0
  203.         $p = Get-ItemProperty fpc:\ContainingArray\NetworkConfiguration\Networks\'{F129EACF-778B-44FE-B339-5B752D7220A3}'\NLBCluster NLBEnabled
  204.         if ($p.NLBEnabled -eq "True") { $result = 1 }
  205.         $result
  206.       </Script>
  207.     </DataPoint>
  208.     <DataPoint Id="19" Name="DATAID_LOCALHOST_QUESTIONS" Operation="BitField">
  209.       <!-- localhost: settings -->
  210.       <Script>
  211.         $localhost = "fpc:\ContainingArray\NetworkConfiguration\Networks\'{5ED77DCE-8110-4821-B445-008B7E6B7F6D}'"
  212.         $listeners = $localhost + "\WebListenerProperties"
  213.         $result = 0
  214.  
  215.         $p = Get-ItemProperty $localhost EnableWebProxyClients
  216.         if ($p.EnableWebProxyClients -eq "True") { $result = 1 }
  217.  
  218.         $p = Get-ItemProperty $listeners ResolveInArray
  219.         if ($p.ResolveInArray -eq "True") { $result = $result -bor 2 }
  220.  
  221.         $result
  222.       </Script>
  223.     </DataPoint>
  224.     <!-- VPN -->
  225.     <DataPoint Id="20" Name="DATAID_QUARANTINE_ENABLED" Operation="BitField">
  226.       <!-- VPN: quarantine enabled -->
  227.       <Script>
  228.         $result = 0
  229.         $p = Get-ItemProperty fpc:\ContainingArray\NetworkConfiguration\VpnConfiguration\QuarantineSettings QuarantineMode
  230.         if ($p.QuarantineMode -ne 0) { $result = 1 }
  231.         $result
  232.       </Script>
  233.     </DataPoint>
  234.     <DataPoint Id="21" Name="DATAID_VPN_QUESTIONS" Operation="BitField">
  235.       <!-- Set of VPN settings -->
  236.       <Script>
  237.         $vpn = "fpc:\ContainingArray\NetworkConfiguration\VpnConfiguration"
  238.         $result = 0
  239.  
  240.         $p = Get-ItemProperty $vpn UseDHCPForAddressAssignment
  241.         if ($p.UseDHCPForAddressAssignment -eq "True") { $result = 1 }
  242.  
  243.         $p = Get-ItemProperty $vpn UseDHCPForDNS
  244.         if ($p.UseDHCPForDNS -eq "True") { $result = $result -bor 2 }
  245.  
  246.         $p = Get-ItemProperty $vpn UseDHCPForWINS
  247.         if ($p.UseDHCPForWINS -eq "True") { $result = $result -bor 4 }
  248.  
  249.         $p = Get-ItemProperty $vpn EnableRADIUSAuthentication
  250.         if ($p.EnableRADIUSAuthentication -eq "True") { $result = $result -bor 8 }
  251.  
  252.         $p = Get-ItemProperty $vpn EnableRADIUSAccounting
  253.         if ($p.EnableRADIUSAccounting -eq "True") { $result = $result -bor 16 }
  254.  
  255.         $p = Get-ItemProperty $vpn AllowCustomIPSecPolicyForL2TP
  256.         if ($p.AllowCustomIPSecPolicyForL2TP -eq "True") { $result = $result -bor 32 }
  257.  
  258.         $p = Get-ItemProperty $vpn EnablePPTP
  259.         if ($p.EnablePPTP -eq "True") { $result = $result -bor 64 }
  260.  
  261.         $p = Get-ItemProperty $vpn EnableL2TP
  262.         if ($p.EnableL2TP -eq "True") { $result = $result -bor 128 }
  263.  
  264.         $p = Get-ItemProperty $vpn EnableWindowsAccounting
  265.         if ($p.EnableWindowsAccounting -eq "True") { $result = $result -bor 256 }
  266.  
  267.         $p = Get-ItemProperty $vpn EnableVpnClients
  268.         if ($p.EnableVpnClients -eq "True") { $result = $result -bor 512 }
  269.  
  270.         $p = Get-ItemProperty $vpn\PPPSettings EnableEAP
  271.         if ($p.EnableEAP -eq "True") { $result = $result -bor 1024 }
  272.  
  273.         $p = Get-ItemProperty $vpn\PPPSettings EnableSSTP
  274.         if ($p.EnableSSTP -eq "True") { $result = $result -bor 2048 }
  275.  
  276.         $result
  277.       </Script>
  278.     </DataPoint>
  279.     <DataPoint Id="22" Name="DATAID_VPN_MAXIMUM_VPN_CLIENTS">
  280.       <!-- the max number of VPN clients allowed -->
  281.       <Script>
  282.         $p = Get-ItemProperty fpc:\ContainingArray\NetworkConfiguration\VpnConfiguration MaximumVpnClients
  283.         $p.MaximumVpnClients
  284.       </Script>
  285.     </DataPoint>
  286.     <!-- Rule Elements -->
  287.     <DataPoint Id="23" Name="DATAID_RULE_ELEMENTS_SCHEDULES">
  288.       <!-- schedules count -->
  289.       <Script>
  290.         $p = Get-Item fpc:\ContainingArray\RuleElements\Schedules
  291.         $p.Children.Length
  292.       </Script>
  293.     </DataPoint>
  294.     <DataPoint Id="24" Name="DATAID_RULE_ELEMENTS_COMPUTERS">
  295.       <!-- Computers count -->
  296.       <Script>
  297.         $p = Get-Item fpc:\ContainingArray\RuleElements\Computers
  298.         $p.Children.Length
  299.       </Script>
  300.     </DataPoint>
  301.     <DataPoint Id="25" Name="DATAID_RULE_ELEMENTS_ADDRESS_RANGES">
  302.       <!-- Address ranges count -->
  303.       <Script>
  304.         $p = Get-Item fpc:\ContainingArray\RuleElements\AddressRanges
  305.         $p.Children.Length
  306.       </Script>
  307.     </DataPoint>
  308.     <DataPoint Id="26" Name="DATAID_RULE_ELEMENTS_SUBNETS">
  309.       <!-- Subnets count -->
  310.       <Script>
  311.         $p = Get-Item fpc:\ContainingArray\RuleElements\Subnets
  312.         $p.Children.Length
  313.       </Script>
  314.     </DataPoint>
  315.     <DataPoint Id="27" Name="DATAID_RULE_ELEMENTS_COMPUTER_SETS">
  316.       <!-- Computer sets count -->
  317.       <Script>
  318.         $p = Get-Item fpc:\ContainingArray\RuleElements\ComputerSets
  319.         $p.Children.Length
  320.       </Script>
  321.     </DataPoint>
  322.     <DataPoint Id="28" Name="DATAID_RULE_ELEMENTS_URL_SETS">
  323.       <!-- URL sets count -->
  324.       <Script>
  325.         $p = Get-Item fpc:\ContainingArray\RuleElements\URLSets
  326.         $p.Children.Length
  327.       </Script>
  328.     </DataPoint>
  329.     <DataPoint Id="29" Name="DATAID_RULE_ELEMENTS_DOMAIN_NAME_SETS">
  330.       <!-- Domain name sets count -->
  331.       <Script>
  332.         $p = Get-Item fpc:\ContainingArray\RuleElements\DomainNameSets
  333.         $p.Children.Length
  334.       </Script>
  335.     </DataPoint>
  336.     <DataPoint Id="30" Name="DATAID_RULE_ELEMENTS_PROTOCOL_DEFINITIONS">
  337.       <!-- Protocol definitions count -->
  338.       <Script>
  339.         $p = Get-Item fpc:\ContainingArray\RuleElements\ProtocolDefinitions
  340.         $p.Children.Length
  341.       </Script>
  342.     </DataPoint>
  343.     <DataPoint Id="31" Name="DATAID_RULE_ELEMENTS_EVENT_DEFINITIONS">
  344.       <!-- Event definitions count -->
  345.       <Script>
  346.         $p = Get-Item fpc:\ContainingArray\RuleElements\EventDefinitions
  347.         $p.Children.Length
  348.       </Script>
  349.     </DataPoint>
  350.     <DataPoint Id="32" Name="DATAID_RULE_ELEMENTS_RADIUS_SERVERS">
  351.       <!-- Radius servers count -->
  352.       <Script>
  353.         $p = Get-Item fpc:\ContainingArray\RuleElements\RadiusServers
  354.         $p.Children.Length
  355.       </Script>
  356.     </DataPoint>
  357.     <DataPoint Id="33" Name="DATAID_RULE_ELEMENTS_WEB_LISTENERS">
  358.       <!-- Web listeners count -->
  359.       <Script>
  360.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  361.         $p.Children.Length
  362.       </Script>
  363.     </DataPoint>
  364.     <DataPoint Id="34" Name="DATAID_RULE_ELEMENTS_CONTENT_TYPE_SETS">
  365.       <!-- Content type sets count -->
  366.       <Script>
  367.         $p = Get-Item fpc:\ContainingArray\RuleElements\ContentTypeSets
  368.         $p.Children.Length
  369.       </Script>
  370.     </DataPoint>
  371.     <DataPoint Id="35" Name="DATAID_RULE_ELEMENTS_USER_SETS">
  372.       <!-- User sets count -->
  373.       <Script>
  374.         $p = Get-Item fpc:\ContainingArray\RuleElements\UserSets
  375.         $p.Children.Length
  376.       </Script>
  377.     </DataPoint>
  378.     <DataPoint Id="36" Name="DATAID_RULE_ELEMENTS_AUTHENTICATION_SCHEMES">
  379.       <!-- Authentication schemes count -->
  380.       <Script>
  381.         $p = Get-Item fpc:\ContainingArray\RuleElements\AuthenticationSchemes
  382.         $p.Children.Length
  383.       </Script>
  384.     </DataPoint>
  385.     <DataPoint Id="37" Name="DATAID_RULE_ELEMENTS_COMPUTER_SETS_MAX">
  386.       <!-- The max number of cumputers in a computer set -->
  387.       <Script>
  388.         $result = 0
  389.         foreach ($set in Get-ChildItem fpc:\ContainingArray\RuleElements\ComputerSets)
  390.         {
  391.           $path = "fpc:\ContainingArray\RuleElements\ComputerSets\'" + $set.StorageName + "'\Computers"
  392.           $p = Get-Item $path
  393.           if ($p.Children.Length -gt $result) { $result = $p.Children.Length }
  394.         }
  395.         $result
  396.       </Script>
  397.     </DataPoint>
  398.     <DataPoint Id="38" Name="DATAID_RULE_ELEMENTS_URL_SETS_MAX">
  399.       <!-- The max number of URLs in a URL set -->
  400.       <Script>
  401.         $result = 0
  402.         foreach ($set in Get-ChildItem fpc:\ContainingArray\RuleElements\URLSets)
  403.         {
  404.           $path = "fpc:\ContainingArray\RuleElements\URLSets\'" + $set.StorageName + "'"
  405.           $count = 0
  406.           foreach ($url in Get-ChildItem $path) { $count++ }
  407.           if ($count -gt $result) { $result = $count }
  408.         }
  409.         $result
  410.       </Script>
  411.     </DataPoint>
  412.     <DataPoint Id="39" Name="DATAID_RULE_ELEMENTS_DOMAIN_NAME_SETS_MAX">
  413.       <!-- The max number of domain names in a domain name set -->
  414.       <Script>
  415.         $result = 0
  416.         foreach ($set in Get-ChildItem fpc:\ContainingArray\RuleElements\DomainNameSets)
  417.         {
  418.           $path = "fpc:\ContainingArray\RuleElements\DomainNameSets\'" + $set.StorageName + "'"
  419.           $count = 0
  420.           foreach ($url in Get-ChildItem $path) { $count++ }
  421.           if ($count -gt $result) { $result = $count }
  422.         }
  423.         $result
  424.       </Script>
  425.     </DataPoint>
  426.     <DataPoint Id="40" Name="DATAID_RULE_ELEMENTS_USER_SETS_MAX">
  427.       <!-- The max number of users in a users set -->
  428.       <Script>
  429.         $result = 0
  430.         foreach ($set in Get-ChildItem fpc:\ContainingArray\RuleElements\UserSets)
  431.         {
  432.           $path = "fpc:\ContainingArray\RuleElements\UserSets\'" + $set.StorageName + "'\Accounts"
  433.           $p = Get-Item $path
  434.           $count = $p.Children.Length
  435.           
  436.           $path = "fpc:\ContainingArray\RuleElements\UserSets\'" + $set.StorageName + "'\NonWindowsUsers"
  437.           $p = Get-Item $path
  438.           $count += $p.Children.Length
  439.           if ($count -gt $result) { $result = $count }
  440.         }
  441.         $result
  442.       </Script>
  443.     </DataPoint>
  444.     <!-- Web Listeners -->
  445.     <DataPoint Id="41" Name="DATAID_WEB_LISTENER_PCT_ALWAYS_AUTHENTICATE">
  446.       <!-- The percentage of web listeners that always authenticate -->
  447.       <Script>
  448.         $webListeners = "fpc:\ContainingArray\RuleElements\WebListeners"
  449.         $p = Get-Item $webListeners
  450.         $webListenersCount = $p.Children.Length
  451.         $alwaysAuthenticate = 0
  452.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  453.         {
  454.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  455.           $p = Get-ItemProperty $path AlwaysAuthenticate
  456.           if ($p.AlwaysAuthenticate -eq "True") { $alwaysAuthenticate += 1 }
  457.         }
  458.  
  459.         $result = 0
  460.         if ($alwaysAuthenticate -gt 0) { $result = $alwaysAuthenticate * 100 / $webListenersCount }
  461.         $result
  462.       </Script>
  463.     </DataPoint>
  464.     <DataPoint Id="314" Name="DATAID_WEB_LISTENER_ALWAYS_AUTH">
  465.       <!-- The number of web listeners that always authenticate -->
  466.       <Script>
  467.         $alwaysAuthenticate = 0
  468.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  469.         {
  470.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  471.           $p = Get-ItemProperty $path AlwaysAuthenticate
  472.           if ($p.AlwaysAuthenticate -eq "True") { $alwaysAuthenticate += 1 }
  473.         }
  474.  
  475.         $alwaysAuthenticate
  476.       </Script>    
  477.     </DataPoint>
  478.     <DataPoint Id="42" Name="DATAID_WEB_LISTENER_MAX_APPLIED_SSL_CERTIFICATES">
  479.       <!-- The max number of SSL certificates applied on a listener -->
  480.       <Script>
  481.         $result = 0
  482.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  483.         {
  484.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties\AppliedSSLCertificates"
  485.           $p = Get-Item $path
  486.           if ($p.Children.Length -gt $result) { $result = $p.Children.Length }
  487.         }
  488.         $result
  489.       </Script>
  490.     </DataPoint>
  491.     <DataPoint Id="43" Name="DATAID_WEB_LISTENER_PCT_SSL_CERTIFICATE_AUTHENTICATION">
  492.       <!-- The percentage of web listeners with SSL certificate authentication -->
  493.       <Script>
  494.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  495.         $webListenersCount = $p.Children.Length
  496.         $sslCertAuthentication = 0
  497.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  498.         {
  499.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  500.           $p = Get-ItemProperty $path SSLCertificateAuthentication
  501.           if ($p.SSLCertificateAuthentication -eq "True") { $sslCertAuthentication += 1 }
  502.         }
  503.  
  504.         $result = 0
  505.         if ($sslCertAuthentication -gt 0) { $result = $sslCertAuthentication * 100 / $webListenersCount }
  506.         $result
  507.       </Script>
  508.     </DataPoint>
  509.     
  510.     <DataPoint Id="44" Name="DATAID_WEB_LISTENER_PCT_BASIC_AUTHENTICATION">
  511.       <!-- The percentage of web listeners with basic authentication -->
  512.       <Script>
  513.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  514.         $webListenersCount = $p.Children.Length
  515.         $basicAuthentication = 0
  516.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  517.         {
  518.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  519.           $p = Get-ItemProperty $path BasicAuthentication
  520.           if ($p.BasicAuthentication -eq "True") { $basicAuthentication += 1 }
  521.         }
  522.         
  523.         $result = 0
  524.         if ($basicAuthentication -gt 0) { $result = $basicAuthentication * 100 / $webListenersCount }
  525.         $result
  526.       </Script>
  527.     </DataPoint>
  528.     <DataPoint Id="315" Name="DATAID_WEB_LISTENER_BASIC_AUTH">
  529.       <!-- The number of web listeners with basic authentication -->
  530.       <Script>
  531.         $basicAuthentication = 0
  532.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  533.         {
  534.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  535.           $p = Get-ItemProperty $path BasicAuthentication
  536.           if ($p.BasicAuthentication -eq "True") { $basicAuthentication += 1 }
  537.         }
  538.  
  539.         $basicAuthentication
  540.       </Script>
  541.     </DataPoint> 
  542.     <DataPoint Id="45" Name="DATAID_WEB_LISTENER_PCT_BASIC_AUTH_PERSIST_SINGLE_REQUEST">
  543.       <!-- The percentage of web listeners with basic authentication single request -->
  544.       <Script>
  545.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  546.         $webListenersCount = $p.Children.Length
  547.         $basicAuthSingleReq = 0
  548.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  549.         {
  550.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  551.           $p = Get-ItemProperty $path BasicAuthPersistSingleRequest
  552.           if ($p.BasicAuthPersistSingleRequest -eq "True") { $basicAuthSingleReq += 1 }
  553.         }
  554.         
  555.         $result = 0
  556.         if ($basicAuthSingleReq -gt 0) { $result = $basicAuthSingleReq * 100 / $webListenersCount }
  557.         $result
  558.       </Script>
  559.     </DataPoint>
  560.     <DataPoint Id="316" Name="DATAID_WEB_LISTENER_BASIC_AUTH_PERSIST">
  561.       <!-- The number of web listeners with basic authentication single request -->
  562.       <Script>
  563.         $basicAuthSingleReq = 0
  564.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  565.         {
  566.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  567.           $p = Get-ItemProperty $path BasicAuthPersistSingleRequest
  568.           if ($p.BasicAuthPersistSingleRequest -eq "True") { $basicAuthSingleReq += 1 }
  569.         }
  570.         $basicAuthSingleReq
  571.       </Script>
  572.      </DataPoint> 
  573.     <DataPoint Id="46" Name="DATAID_WEB_LISTENER_AVG_CONNECTION_TIMEOUT">
  574.       <!-- The web listeners avarege connection timeout -->
  575.       <Script>
  576.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  577.         $webListenersCount = $p.Children.Length
  578.         $totalTimeout = 0
  579.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  580.         {
  581.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  582.           $p = Get-ItemProperty $path ConnectionTimeout
  583.           $totalTimeout += $p.ConnectionTimeout
  584.         }
  585.         
  586.         $result = 0
  587.         if ($totalTimeout -gt 0) { $result = $totalTimeout / $webListenersCount }
  588.         $result
  589.       </Script>
  590.     </DataPoint>
  591.     
  592.     <DataPoint Id="47" Name="DATAID_WEB_LISTENER_PCT_DIGEST_AUTHENTICATION">
  593.       <!-- The percentage of web listeners with digest authentication -->
  594.       <Script>
  595.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  596.         $webListenersCount = $p.Children.Length
  597.         $digestAuth = 0
  598.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  599.         {
  600.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  601.           $p = Get-ItemProperty $path DigestAuthentication
  602.           if ($p.DigestAuthentication -eq "True") { $digestAuth += 1 }
  603.         }
  604.         
  605.         $result = 0
  606.         if ($digestAuth -gt 0) { $result = $digestAuth * 100 / $webListenersCount }
  607.         $result
  608.       </Script>
  609.     </DataPoint>
  610.     <DataPoint Id="319" Name="DATAID_WEB_LISTENER_DIGEST_AUTH">
  611.       <!-- The number of web listeners with digest authentication -->
  612.       <Script>
  613.         $digestAuth = 0
  614.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  615.         {
  616.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  617.           $p = Get-ItemProperty $path DigestAuthentication
  618.           if ($p.DigestAuthentication -eq "True") { $digestAuth += 1 }
  619.         }
  620.         $digestAuth
  621.       </Script>
  622.     </DataPoint> 
  623.     <DataPoint Id="48" Name="DATAID_WEB_LISTENER_PCT_DIGEST_AUTH_PERSIST_SINGLE_REQUEST">
  624.       <!-- The percentage of web listeners with digest authentication persist single request -->
  625.       <Script>
  626.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  627.         $webListenersCount = $p.Children.Length
  628.         $digestAuthSingleReq = 0
  629.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  630.         {
  631.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  632.           $p = Get-ItemProperty $path DigestAuthPersistSingleRequest
  633.           if ($p.DigestAuthPersistSingleRequest -eq "True") { $digestAuthSingleReq += 1 }
  634.         }
  635.         
  636.         $result = 0
  637.         if ($digestAuthSingleReq -gt 0) { $result = $digestAuthSingleReq * 100 / $webListenersCount }
  638.         $result
  639.       </Script>
  640.     </DataPoint>
  641.     <DataPoint Id="326" Name="DATAID_WEB_LISTENER_DIGEST_AUTH_PERSIST">
  642.       <!-- The number of web listeners with digest authentication persist single request -->
  643.       <Script>
  644.         $digestAuthSingleReq = 0
  645.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  646.         {
  647.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  648.           $p = Get-ItemProperty $path DigestAuthPersistSingleRequest
  649.           if ($p.DigestAuthPersistSingleRequest -eq "True") { $digestAuthSingleReq += 1 }
  650.         }
  651.         $digestAuthSingleReq
  652.       </Script>    
  653.     </DataPoint> 
  654.     <DataPoint Id="49" Name="DATAID_WEB_LISTENER_PCT_INTEGRATED_AUTH_PERSIST_SINGLE_REQUEST">
  655.       <!-- The percentage of web listeners with integrated authentication persist single request -->
  656.       <Script>
  657.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  658.         $webListenersCount = $p.Children.Length
  659.         $intAuthSingleReq = 0
  660.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  661.         {
  662.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  663.           $p = Get-ItemProperty $path IntegratedAuthPersistSingleRequest
  664.           if ($p.IntegratedAuthPersistSingleRequest -eq "True") { $intAuthSingleReq += 1 }
  665.         }
  666.         
  667.         $result = 0
  668.         if ($intAuthSingleReq -gt 0) { $result = $intAuthSingleReq * 100 / $webListenersCount }
  669.         $result
  670.       </Script>
  671.     </DataPoint>
  672.     <DataPoint Id="328" Name="DATAID_WEB_LISTENER_INTEGRATED_AUTH_PERSIST">
  673.       <!-- The number of web listeners with integrated authentication persist single request -->
  674.       <Script>
  675.         $intAuthSingleReq = 0
  676.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  677.         {
  678.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  679.           $p = Get-ItemProperty $path IntegratedAuthPersistSingleRequest
  680.           if ($p.IntegratedAuthPersistSingleRequest -eq "True") { $intAuthSingleReq += 1 }
  681.         }
  682.         $intAuthSingleReq
  683.       </Script>
  684.     </DataPoint> 
  685.     <DataPoint Id="50" Name="DATAID_WEB_LISTENER_PCT_INTEGRATED_WINDOWS_AUTHENTICATION">
  686.       <!-- The percentage of web listeners with integrated windows authentication -->
  687.       <Script>
  688.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  689.         $webListenersCount = $p.Children.Length
  690.         $intWinAuth = 0
  691.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  692.         {
  693.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  694.           $p = Get-ItemProperty $path IntegratedWindowsAuthentication
  695.           if ($p.IntegratedWindowsAuthentication -eq "True") { $intWinAuth += 1 }
  696.         }
  697.         
  698.         $result = 0
  699.         if ($intWinAuth -gt 0) { $result = $intWinAuth * 100 / $webListenersCount }
  700.         $result
  701.       </Script>
  702.     </DataPoint>
  703.     <DataPoint Id="320" Name="DATAID_WEB_LISTENER_INTEGRATED_AUTH">
  704.       <!-- The number of web listeners with integrated windows authentication -->
  705.       <Script>
  706.         $intWinAuth = 0
  707.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  708.         {
  709.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  710.           $p = Get-ItemProperty $path IntegratedWindowsAuthentication
  711.           if ($p.IntegratedWindowsAuthentication -eq "True") { $intWinAuth += 1 }
  712.         }
  713.         $intWinAuth
  714.       </Script>
  715.     </DataPoint> 
  716.     <DataPoint Id="51" Name="DATAID_WEB_LISTENER_MIN_NUMBER_OF_CONNECTIONS">
  717.       <!-- the min number of connections in the web listeners -->
  718.       <Script>
  719.         $min = -1
  720.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  721.         {
  722.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  723.           $p = Get-ItemProperty $path NumberOfConnections
  724.           if (($p.NumberOfConnections -lt $min) -or ($min -eq -1)) { $min = $p.NumberOfConnections }
  725.         }
  726.         $min
  727.       </Script>
  728.     </DataPoint>
  729.     <DataPoint Id="52" Name="DATAID_WEB_LISTENER_MAX_NUMBER_OF_CONNECTIONS">
  730.       <!-- the max number of connections in the web listeners -->
  731.       <Script>
  732.         $max = 0
  733.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  734.         {
  735.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  736.           $p = Get-ItemProperty $path NumberOfConnections
  737.           if ($p.NumberOfConnections -gt $max) { $max = $p.NumberOfConnections }
  738.         }
  739.         $max
  740.       </Script>
  741.     </DataPoint>
  742.     <DataPoint Id="53" Name="DATAID_WEB_LISTENER_AVG_NUMBER_OF_CONNECTIONS">
  743.       <!-- the avarage number of connections in the web listeners -->
  744.       <Script>
  745.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  746.         $webListenersCount = $p.Children.Length
  747.         $count = 0
  748.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  749.         {
  750.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  751.           $p = Get-ItemProperty $path NumberOfConnections
  752.           $count += $p.NumberOfConnections
  753.         }
  754.         
  755.         $result = 0
  756.         if ($count -gt 0) { $result = $count / $webListenersCount }
  757.         $result
  758.       </Script>
  759.     </DataPoint>
  760.     <DataPoint Id="54" Name="DATAID_WEB_LISTENER_PCT_RETURN_AUTH_REQUIRED_IF_AUTH_USER_DENIED">
  761.       <!-- The percentage of web listeners that return authorization required if user authentication denied -->
  762.       <Script>
  763.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  764.         $webListenersCount = $p.Children.Length
  765.         $count = 0
  766.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  767.         {
  768.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  769.           $p = Get-ItemProperty $path ReturnAuthRequiredIfAuthUserDenied
  770.           if ($p.ReturnAuthRequiredIfAuthUserDenied -eq "True") { $count += 1 }
  771.         }
  772.         
  773.         $result = 0
  774.         if ($count -gt 0) { $result = $count * 100 / $webListenersCount }
  775.         $result
  776.       </Script>
  777.     </DataPoint>
  778.     <DataPoint Id="322" Name="DATAID_WEB_LISTENER_AUTH_REQUIRED_ON_USER_DENIED">
  779.       <!-- The number of web listeners that return authorization required if user authentication denied -->
  780.       <Script>
  781.         $result = 0
  782.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  783.         {
  784.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  785.           $p = Get-ItemProperty $path ReturnAuthRequiredIfAuthUserDenied
  786.           if ($p.ReturnAuthRequiredIfAuthUserDenied -eq "True") { $result += 1 }
  787.         }
  788.         $result
  789.       </Script>
  790.     </DataPoint>
  791.     <DataPoint Id="55" Name="DATAID_WEB_LISTENER_PCT_SINGLE_RADIUS_SERVER_AUTH_PER_SESSION">
  792.       <!-- The percentage of web listeners with single radius server authentication per session -->
  793.       <Script>
  794.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  795.         $webListenersCount = $p.Children.Length
  796.         $count = 0
  797.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  798.         {
  799.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  800.           $p = Get-ItemProperty $path SingleRadiusServerAuthPerSession
  801.           if ($p.SingleRadiusServerAuthPerSession -eq "True") { $count += 1 }
  802.         }
  803.         
  804.         $result = 0
  805.         if ($count -gt 0) { $result = $count * 100 / $webListenersCount }
  806.         $result
  807.       </Script>
  808.     </DataPoint>
  809.     <DataPoint Id="324" Name="DATAID_WEB_LISTENER_AUTH_SINGLE_RADIUS_PER_SESSION">
  810.       <!-- The number of web listeners with single radius server authentication per session -->
  811.       <Script>
  812.         $result = 0
  813.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  814.         {
  815.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  816.           $p = Get-ItemProperty $path SingleRadiusServerAuthPerSession
  817.           if ($p.SingleRadiusServerAuthPerSession -eq "True") { $result += 1 }
  818.         }
  819.         $result
  820.       </Script>
  821.     </DataPoint>
  822.     <DataPoint Id="56" Name="DATAID_WEB_LISTENER_PCT_UNLIMITED_NUMBER_OF_CONNECTIONS">
  823.       <!-- The percentage of web listeners with unlimited number of connections -->
  824.       <Script>
  825.         $p = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  826.         $webListenersCount = $p.Children.Length
  827.         $count = 0
  828.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  829.         {
  830.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  831.           $p = Get-ItemProperty $path UnlimitedNumberOfConnections
  832.           if ($p.UnlimitedNumberOfConnections -eq "True") { $count += 1 }
  833.         }
  834.         
  835.         $result = 0
  836.         if ($count -gt 0) { $result = $count * 100 / $webListenersCount }
  837.         $result
  838.       </Script>
  839.     </DataPoint>
  840.     <DataPoint Id="325" Name="DATAID_WEB_LISTENER_UNLIMITED_CONNECTIONS">
  841.       <!-- The number of web listeners with unlimited number of connections -->
  842.       <Script>
  843.         $result = 0
  844.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  845.         {
  846.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  847.           $p = Get-ItemProperty $path UnlimitedNumberOfConnections
  848.           if ($p.UnlimitedNumberOfConnections -eq "True") { $result += 1 }
  849.         }
  850.         $result
  851.       </Script>
  852.     </DataPoint> 
  853.     <!-- Alerts -->
  854.     <DataPoint Id="57" Name="DATAID_ALERT_DEFINITIONS_COUNT">
  855.       <!-- The number of alert definitions -->
  856.       <Script>
  857.         $p = Get-Item fpc:\ContainingArray\Alerts
  858.         $p.Children.Length
  859.       </Script>
  860.     </DataPoint>
  861.     <!-- FWC -->
  862.     <DataPoint Id="58" Name="DATAID_FIREWALL_CLIENT_QUESTIONS" Operation="BitField">
  863.       <!-- FWC Settings -->
  864.       <Script>
  865.         $fwc = "fpc:\ContainingArray\FWClientConfigSettings"
  866.         $result = 0
  867.  
  868.         $p = Get-ItemProperty $fwc EnableControlChannelEncryption
  869.         if ($p.EnableControlChannelEncryption -eq "True") { $result = 1 }
  870.  
  871.         $p = Get-ItemProperty $fwc SupportOldFirewallClients
  872.         if ($p.SupportOldFirewallClients -eq "True") { $result = $result -bor 2 }
  873.         
  874.         $result
  875.       </Script>
  876.     </DataPoint>
  877.     <DataPoint Id="59" Name="DATAID_FIREWALL_CLIENT_CONFIG_SETTINGS_COUNT">
  878.       <!-- Count of FWC Settings -->
  879.       <Script>
  880.         $p = Get-Item fpc:\ContainingArray\FWClientConfigSettings
  881.         $p.Children.Length
  882.       </Script>
  883.     </DataPoint>
  884.     <!-- Connectivity Verifiers -->
  885.     <DataPoint Id="60" Name="DATAID_CONNECTIVITY_VERIFIER_COUNT">
  886.       <!-- Number of connectivity verifiers -->
  887.       <Script>
  888.         $p = Get-Item fpc:\ContainingArray\ConnectivityVerifiers
  889.         $p.Children.Length
  890.       </Script>
  891.     </DataPoint>
  892.     <!-- Filters -->
  893.     <DataPoint Id="61" Name="DATAID_EXTENSIONS_APPLICATION_FILTERS_COUNT">
  894.       <!-- The number of application filters installed -->
  895.       <Script>
  896.         $p = Get-Item fpc:\ContainingArray\Extensions\ApplicationFilters
  897.         $p.Children.Length
  898.       </Script>
  899.     </DataPoint>
  900.     <DataPoint Id="62" Name="DATAID_EXTENSIONS_WEB_FILTERS_COUNT">
  901.       <!-- The number of web filters installed -->
  902.       <Script>
  903.         $p = Get-Item fpc:\ContainingArray\Extensions\WebFilters
  904.         $p.Children.Length
  905.       </Script>
  906.     </DataPoint>
  907.     <!-- Logging -->
  908.     <DataPoint Id="63" Name="DATAID_LOGGING_WEB_PROXY_LOG_TYPE">
  909.       <!-- Web proxy log type -->
  910.       <Script>
  911.         $type = -1
  912.         foreach ($log in Get-ChildItem fpc:\ContainingArray\Logging)
  913.         {
  914.           $path = "fpc:\ContainingArray\Logging\'" + $log.StorageName + "'"
  915.           $p = Get-ItemProperty $path ComponentType
  916.           if ($p.ComponentType -eq 1)
  917.           {
  918.             $t = Get-ItemProperty $path LogType
  919.             $type = $t.LogType
  920.           }
  921.         }
  922.         $type
  923.       </Script>
  924.     </DataPoint>
  925.     <DataPoint Id="64" Name="DATAID_LOGGING_FIREWALL_SERVICE_LOG_TYPE">
  926.       <!-- FW log type -->
  927.       <Script>
  928.         $type = -1
  929.         foreach ($log in Get-ChildItem fpc:\ContainingArray\Logging)
  930.         {
  931.           $path = "fpc:\ContainingArray\Logging\'" + $log.StorageName + "'"
  932.           $p = Get-ItemProperty $path ComponentType
  933.           if ($p.ComponentType -eq 2)
  934.           {
  935.             $t = Get-ItemProperty $path LogType
  936.             $type = $t.LogType
  937.           }
  938.         }
  939.         $type
  940.       </Script>
  941.     </DataPoint>
  942.     <!-- Dailing -->
  943.     <DataPoint Id="65" Name ="DATAID_DIALING_QUESTIONS" Operation="BitField">
  944.       <!-- Dialing settings -->
  945.       <Script>
  946.         $dialCfg = "fpc:\ContainingArray\NetworkConfiguration\DialingConfiguration"
  947.         $result = 0
  948.         $p = Get-ItemProperty $dialCfg AutoDialEnabled
  949.         if ($p.AutoDialEnabled -eq "True") { $result = 1 }
  950.  
  951.         $p = Get-ItemProperty $dialCfg DefaultGateway
  952.         if ($p.DefaultGateway -eq "True") { $result = $result -bor 2 }
  953.  
  954.         $result
  955.       </Script>
  956.     </DataPoint>
  957.     <!-- FW Chaining -->
  958.     <DataPoint Id="66" Name="DATAID_CHAINING_QUESTIONS" Operation="BitField">
  959.       <!-- Firewall chaining settings -->
  960.       <Script>
  961.         $cfg = "fpc:\ContainingArray\NetworkConfiguration\FirewallChaining"
  962.         $result = 0
  963.  
  964.         $p = Get-ItemProperty $cfg ForwardType
  965.         if ($p.ForwardType -ne 0) { $result = 1 }
  966.  
  967.         $p = Get-ItemProperty $cfg AuthenticationEnabled
  968.         if ($p.AuthenticationEnabled -eq "True") { $result = $result -bor 2 }
  969.  
  970.         $result
  971.       </Script>
  972.     </DataPoint>
  973.     <!-- Networks -->
  974.     <DataPoint Id="67" Name="DATAID_NETWORKS_COUNT">
  975.       <!-- The number of networks -->
  976.       <Script>
  977.         $p = Get-Item fpc:\ContainingArray\NetworkConfiguration\Networks
  978.         $p.Children.Length
  979.       </Script>
  980.     </DataPoint>
  981.     <DataPoint Id="68" Name="DATAID_NETWORKS_SETS">
  982.       <!-- The number of network sets -->
  983.       <Script>
  984.         $p = Get-Item fpc:\ContainingArray\NetworkConfiguration\NetworkSets
  985.         $p.Children.Length
  986.       </Script>
  987.     </DataPoint>
  988.     <DataPoint Id="69" Name="DATAID_NETWORKS_RULES">
  989.       <!-- The number of network rules -->
  990.       <Script>
  991.         $p = Get-Item fpc:\ContainingArray\NetworkConfiguration\NetworkRules
  992.         $p.Children.Length
  993.       </Script>
  994.     </DataPoint>
  995.     <DataPoint Id="70" Name="DATAID_NETWORKS_ROUTING_RULES">
  996.       <!-- The number of routing rules -->
  997.       <Script>
  998.         $p = Get-Item fpc:\ContainingArray\NetworkConfiguration\RoutingRules
  999.         $p.Children.Length
  1000.       </Script>
  1001.     </DataPoint>
  1002.     <DataPoint Id="71" Name="DATAID_NETWORKS_TEMPLATES">
  1003.       <!-- The number of network templates -->
  1004.       <Script>
  1005.         $p = Get-Item fpc:\ContainingArray\NetworkConfiguration\NetworkTemplates
  1006.         $p.Children.Length
  1007.       </Script>
  1008.     </DataPoint>
  1009.     <DataPoint Id="72" Name="DATAID_NETWORKS_NLB_ENABLED" Operation="BitField">
  1010.       <!-- NLB Integration -->
  1011.       <Script>
  1012.         $p = Get-ItemProperty fpc:\ContainingArray\NetworkConfiguration\NLBConfiguration NLBIntegrationEnabled
  1013.         $p.NLBIntegrationEnabled
  1014.       </Script>
  1015.     </DataPoint>
  1016.     <DataPoint Id="73" Name="DATAID_NETWORKS_VPN_S2S">
  1017.       <!-- The number of networks w/ S2S VPN enabled -->
  1018.       <Script>
  1019.         $count = 0
  1020.         foreach ($vpn in Get-ChildItem fpc:\ContainingArray\NetworkConfiguration\Networks\VpnConfiguration)
  1021.         {
  1022.           $path = "fpc:\ContainingArray\NetworkConfiguration\Networks\VpnConfiguration\'" + $vpn.StorageName + "'"
  1023.           $p = Get-ItemProperty $path Enable
  1024.           if ($p.Enable -eq "True") { $count += 1 }
  1025.         }
  1026.         $count
  1027.       </Script>
  1028.     </DataPoint>
  1029.     <!-- Reports -->
  1030.     <DataPoint Id="74" Name="DATAID_REPORTS_ENABLED" Operation="BitField">
  1031.       <!-- Reports enabled -->
  1032.       <Script>
  1033.         $p = Get-ItemProperty fpc:\ContainingArray\Reports\LogSummaryConfiguration Enabled
  1034.         $p.Enabled
  1035.       </Script>
  1036.     </DataPoint>
  1037.     <DataPoint Id="75" Name="DATAID_REPORTS_KEEP_OLD_DAILY_SUMMARIES">
  1038.       <!-- the number of old copies to keep of old daily summeries -->
  1039.       <Script>
  1040.         $p = Get-ItemProperty fpc:\ContainingArray\Reports\LogSummaryConfiguration KeepOldDailySummaries
  1041.         $p.KeepOldDailySummaries
  1042.       </Script>
  1043.     </DataPoint>
  1044.     <DataPoint Id="76" Name="DATAID_REPORTS_KEEP_OLD_MONTHLY_SUMMARIES">
  1045.       <!-- the number of old copies to keep of old montly summeries -->
  1046.       <Script>
  1047.         $p = Get-ItemProperty fpc:\ContainingArray\Reports\LogSummaryConfiguration KeepOldMonthlySummaries
  1048.         $p.KeepOldMonthlySummaries
  1049.       </Script>
  1050.     </DataPoint>
  1051.     <DataPoint Id="77" Name="DATAID_REPORTS_REPORT_JOBS">
  1052.       <!-- the number of report jobs -->
  1053.       <Script>
  1054.         $p = Get-Item fpc:\ContainingArray\Reports\ReportJobs
  1055.         $p.Children.Length
  1056.       </Script>
  1057.     </DataPoint>
  1058.     <!-- Attack detection -->
  1059.     <DataPoint Id="78" Name="DATAID_ATTACK_DETECTION_QUESTIONS" Operation="BitField">
  1060.       <!-- Attack detection settings -->
  1061.       <Script>
  1062.         $cfg = "fpc:\ContainingArray\ArrayPolicy\AttackDetection"
  1063.         $result = 0
  1064.  
  1065.         $p = Get-ItemProperty $cfg IPFragmentsFilteringEnabled
  1066.         if ($p.IPFragmentsFilteringEnabled -eq "True") { $result = 1 }
  1067.  
  1068.         $p = Get-ItemProperty $cfg IntrusionDetectionEnabled
  1069.         if ($p.IntrusionDetectionEnabled -eq "True") { $result = $result -bor 2 }
  1070.  
  1071.         $p = Get-ItemProperty $cfg WinOutOfBandDetectionEnabled
  1072.         if ($p.WinOutOfBandDetectionEnabled -eq "True") { $result = $result -bor 4 }
  1073.  
  1074.         $p = Get-ItemProperty $cfg LandAttackDetectionEnabled
  1075.         if ($p.LandAttackDetectionEnabled -eq "True") { $result = $result -bor 8 }
  1076.  
  1077.         $p = Get-ItemProperty $cfg PingOfDeathDetectionEnabled
  1078.         if ($p.PingOfDeathDetectionEnabled -eq "True") { $result = $result -bor 16 }
  1079.  
  1080.         $p = Get-ItemProperty $cfg IPHalfScanDetectionEnabled
  1081.         if ($p.IPHalfScanDetectionEnabled -eq "True") { $result = $result -bor 32 }
  1082.  
  1083.         $p = Get-ItemProperty $cfg PortScanDetectionEnabled
  1084.         if ($p.PortScanDetectionEnabled -eq "True") { $result = $result -bor 64 }
  1085.  
  1086.         $p = Get-ItemProperty $cfg UdpBombDetectionEnabled
  1087.         if ($p.UdpBombDetectionEnabled -eq "True") { $result = $result -bor 128 }
  1088.  
  1089.         $p = Get-ItemProperty $cfg IPRoutingEnabled
  1090.         if ($p.IPRoutingEnabled -eq "True") { $result = $result -bor 256 }
  1091.  
  1092.         $p = Get-ItemProperty $cfg IntrusionDetectionLoggingEnabled
  1093.         if ($p.IntrusionDetectionLoggingEnabled -eq "True") { $result = $result -bor 512 }
  1094.         
  1095.         $result
  1096.       </Script>
  1097.     </DataPoint>
  1098.     <DataPoint Id="79" Name="DATAID_ATTACK_DETECTION_PORT_SCAN_DETECTION_ALL_PORTS_THRESHOLD">
  1099.       <!-- Attack detection: port scan detection all ports threshold -->
  1100.       <Script>
  1101.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\AttackDetection PortScanDetectionAllPortsThreshold
  1102.         $p.PortScanDetectionAllPortsThreshold
  1103.       </Script>
  1104.     </DataPoint>
  1105.     <DataPoint Id="80" Name="DATAID_ATTACK_DETECTION_PORT_SCAN_DETECTION_WELL_KNOWN_PORTS_THRESHOLD">
  1106.       <!-- Attack detection: port scan detection well known ports threshold -->
  1107.       <Script>
  1108.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\AttackDetection PortScanDetectionWellKnownPortsThreshold
  1109.         $p.PortScanDetectionWellKnownPortsThreshold
  1110.       </Script>
  1111.     </DataPoint>
  1112.     <!-- Servers -->
  1113.     <DataPoint Id="81" Name="DATAID_SERVER_COUNT">
  1114.       <!-- The number of servers in the array -->
  1115.       <Script>
  1116.         $p = Get-Item fpc:\ContainingArray\Servers
  1117.         $p.Children.Length
  1118.       </Script>
  1119.     </DataPoint>
  1120.     <DataPoint Id="82" Name="DATAID_SERVER_CACHESIZE">
  1121.       <!-- This server cache drive size in MB -->
  1122.       <Script>
  1123.         $p = Get-ItemProperty fpc:\ContainingServer\CacheDrives TotalCacheInMegs
  1124.         $p.TotalCacheInMegs
  1125.       </Script>
  1126.     </DataPoint>
  1127.     <DataPoint Id="83" Name="DATAID_SERVER_FIREWALL_SERVICE_UPTIME">
  1128.       <!-- This server Firewall Service up time -->
  1129.       <Script>
  1130.         $p = Get-ItemProperty fpc:\ContainingServer FirewallServiceUpTime
  1131.         $p.FirewallServiceUpTime
  1132.       </Script>
  1133.     </DataPoint>
  1134.     <DataPoint Id="84" Name="DATAID_SERVER_JOB_SCHEDULER_UPTIME">
  1135.       <!-- This server job scheduler service up time -->
  1136.       <Script>
  1137.         $p = Get-ItemProperty fpc:\ContainingServer JobSchedulerServiceUpTime
  1138.         $p.JobSchedulerServiceUpTime
  1139.       </Script>
  1140.     </DataPoint>
  1141.     <DataPoint Id="85" Name="DATAID_SERVER_ADAPTERS">
  1142.       <!-- This server number of adapters -->
  1143.       <Script>
  1144.         $p = Get-Item fpc:\ContainingServer\Adapters
  1145.         $p.Children.Length
  1146.       </Script>
  1147.     </DataPoint>
  1148.     <DataPoint Id="86" Name="DATAID_SERVER_OS_MAJOR_VERSION">
  1149.       <!-- This server OS major version -->
  1150.       <Script>
  1151.         $p = Get-ItemProperty fpc:\ContainingServer OperatingSystemMajorVersion
  1152.         $p.OperatingSystemMajorVersion
  1153.       </Script>
  1154.     </DataPoint>
  1155.     <DataPoint Id="87" Name="DATAID_SERVER_OS_MINOR_VERSION">
  1156.       <!-- This server OS minor version -->
  1157.       <Script>
  1158.         $p = Get-ItemProperty fpc:\ContainingServer OperatingSystemMinorVersion
  1159.         $p.OperatingSystemMinorVersion
  1160.       </Script>
  1161.     </DataPoint>
  1162.     <DataPoint Id="88" Name="DATAID_SERVER_OS_SUITE_MASK">
  1163.       <!-- This server OS suite mask -->
  1164.       <Script>
  1165.         $p = Get-ItemProperty fpc:\ContainingServer OperatingSystemSuiteMask
  1166.         $p.OperatingSystemSuiteMask
  1167.       </Script>
  1168.     </DataPoint>
  1169.     <DataPoint Id="89" Name="DATAID_SERVER_SP_MAJOR_VERSION">
  1170.       <!-- This server OS SP major version -->
  1171.       <Script>
  1172.         $p = Get-ItemProperty fpc:\ContainingServer ServicePackMajorVersion
  1173.         $p.ServicePackMajorVersion
  1174.       </Script>
  1175.     </DataPoint>
  1176.     <DataPoint Id="90" Name="DATAID_SERVER_SP_MINOR_VERSION">
  1177.       <!-- This server OS SP minor version -->
  1178.       <Script>
  1179.         $p = Get-ItemProperty fpc:\ContainingServer ServicePackMinorVersion
  1180.         $p.ServicePackMinorVersion
  1181.       </Script>
  1182.     </DataPoint>
  1183.     <DataPoint Id="91" Name="DATAID_SERVER_ISA_MAJOR_VERSION">
  1184.       <!-- This server TMG major version -->
  1185.       <Script>
  1186.         $p = Get-ItemProperty fpc:\ContainingServer ProductVersion
  1187.         $p.ProductVersion.Split(".")[0]
  1188.       </Script>
  1189.     </DataPoint>
  1190.     <DataPoint Id="92" Name="DATAID_SERVER_ISA_MINOR_VERSION">
  1191.       <!-- This server TMG minor version -->
  1192.       <Script>
  1193.         $p = Get-ItemProperty fpc:\ContainingServer ProductVersion
  1194.         $p.ProductVersion.Split(".")[1]
  1195.       </Script>
  1196.     </DataPoint>
  1197.     <DataPoint Id="93" Name="DATAID_SERVER_ISA_BUILD_VERSION">
  1198.       <!-- This server TMG build version -->
  1199.       <Script>
  1200.         $p = Get-ItemProperty fpc:\ContainingServer ProductVersion
  1201.         $p.ProductVersion.Split(".")[2]
  1202.       </Script>
  1203.     </DataPoint>
  1204.     <DataPoint Id="94" Name="DATAID_SERVER_ISA_HF_VERSION">
  1205.       <!-- This server TMG HF version -->
  1206.       <Script>
  1207.         $p = Get-ItemProperty fpc:\ContainingServer ProductVersion
  1208.         $p.ProductVersion.Split(".")[3]
  1209.       </Script>
  1210.     </DataPoint>
  1211.     <!-- Array Policy -->
  1212.     <DataPoint Id="95" Name="DATAID_ARRAY_POLICY_CONNECTION_LIMIT_ENALBED" Operation="BitField">
  1213.       <!-- Connection limit policy state -->
  1214.       <Script>
  1215.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\ConnectionLimitPolicy Enabled
  1216.         $p.Enabled
  1217.       </Script>
  1218.     </DataPoint>
  1219.     <DataPoint Id="96" Name="DATAID_ARRAY_POLICY_ACCESS_RULE_COUNT">
  1220.       <!-- The number of access rules -->
  1221.       <Script>
  1222.         $count = 0
  1223.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1224.         {
  1225.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1226.           $p = Get-ItemProperty $path Type
  1227.           if ($p.Type -eq 0) { $count += 1 }
  1228.         }
  1229.         $count
  1230.       </Script>
  1231.     </DataPoint>
  1232.     <DataPoint Id="97" Name="DATAID_ARRAY_POLICY_WEB_PUBLISHING_RULE_COUNT">
  1233.       <!-- The number of web publishing rules -->
  1234.       <Script>
  1235.         $count = 0
  1236.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1237.         {
  1238.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1239.           $p = Get-ItemProperty $path Type
  1240.           if ($p.Type -eq 2) { $count += 1 }
  1241.         }
  1242.         $count
  1243.       </Script>
  1244.     </DataPoint>
  1245.     <DataPoint Id="98" Name="DATAID_ARRAY_POLICY_SERVER_PUBLISHING_COUNT">
  1246.       <!-- The number of server publishing rules -->
  1247.       <Script>
  1248.         $count = 0
  1249.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1250.         {
  1251.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1252.           $p = Get-ItemProperty $path Type
  1253.           if ($p.Type -eq 1) { $count += 1 }
  1254.         }
  1255.         $count
  1256.       </Script>
  1257.     </DataPoint>
  1258.     <!-- Setup -->
  1259.     <DataPoint Id="99" Name="DATAID_SETUP_QUESTIONS" Operation="BitField">
  1260.       <!-- Installed features -->
  1261.       <Script>
  1262.         $result = 0
  1263.  
  1264.         $val = Is-FpcFeatureInstalled "Message_Screener"
  1265.         if ($val -eq "True") { $result = 1 }
  1266.  
  1267.         $val = Is-FpcFeatureInstalled "Publish_Share_Directory"
  1268.         if ($val -eq "True") { $result = $result -bor 2 }
  1269.  
  1270.         $val = Is-FpcFeatureInstalled "MSFirewall_Management"
  1271.         if ($val -eq "True") { $result = $result -bor 4 }
  1272.  
  1273.         # bit 4 (1000) is skiped
  1274.  
  1275.         $val = Is-FpcFeatureInstalled "Storage_Server"
  1276.         if ($val -eq "True") { $result = $result -bor 16 }
  1277.         
  1278.         $result
  1279.       </Script>
  1280.     </DataPoint>
  1281.     <!-- OS Info -->
  1282.     <DataPoint Id="100" Name="DATAID_MACHINE_CURRENT_TIME_ZONE">
  1283.       <!-- the current time zone -->
  1284.       <Script>
  1285.         $d = Get-Date
  1286.         $d = $d - $d.ToUniversalTime()
  1287.         $d.Hours * 60
  1288.       </Script>
  1289.     </DataPoint>
  1290.     <DataPoint Id="101" Name="DATAID_MACHINE_OS_LOCALE">
  1291.       <!-- The OS locale code -->
  1292.       <Script>
  1293.         $c = Get-Culture
  1294.         $c.LCID
  1295.       </Script>
  1296.     </DataPoint>
  1297.     <DataPoint Id="102" Name="DATAID_MACHINE_USER_LOCALE">
  1298.       <!-- The user locale code -->
  1299.       <Script>
  1300.         $c = Get-UICulture
  1301.         $c.LCID
  1302.       </Script>
  1303.     </DataPoint>
  1304.     <DataPoint Id="103" Name="DATAID_MACHINE_NUMBER_OF_PROCESSORS">
  1305.       <!-- The number of processors of the machine -->
  1306.       <Script>
  1307.         $cpus = Get-CpuCount
  1308.         $cpus
  1309.       </Script>
  1310.     </DataPoint>
  1311.  
  1312.     <!-- Skiped DataPoint: 104, DATAID_DATAID_SIGNALED_ALERTS1 (Obsolete) -->
  1313.     <!-- Skiped DataPoint: 105, DATAID_DATAID_SIGNALED_ALERTS1 (Obsolete) -->
  1314.     <!-- Skiped DataPoint: 106, DATAID_DATAID_SIGNALED_ALERTS1 (Obsolete) -->
  1315.     <!-- Skiped DataPoint: 107, DATAID_DATAID_SIGNALED_ALERTS1 (Obsolete) -->
  1316.  
  1317.     <!-- Rule Elements-->
  1318.     <DataPoint Id="108" Name="DATAID_RULE_ELEMENTS_SERVER_FARMS">
  1319.       <!-- The number of server farms -->
  1320.       <Script>
  1321.         $p = Get-Item fpc:\ContainingArray\RuleElements\ServerFarms
  1322.         $p.Children.Length
  1323.       </Script>
  1324.     </DataPoint>
  1325.     <DataPoint Id="109" Name="DATAID_RULE_ELEMENTS_FARMS_PCT_CONNECTIVITY_VERIFIER_HTTP">
  1326.       <!-- The percentage of server farms with HTTP conectivity verifier -->
  1327.       <Script>
  1328.         $farms = Get-Item fpc:\ContainingArray\RuleElements\ServerFarms
  1329.         $result = 0
  1330.         if ($farms.Children.Length -gt 0)
  1331.         {
  1332.           $count = 0
  1333.           foreach ($farm in Get-ChildItem fpc:\ContainingArray\RuleElements\ServerFarms)
  1334.           {
  1335.             $path = "fpc:\ContainingArray\RuleElements\ServerFarms\'" + $farm.StorageName + "'\ConnectivityVerifier"
  1336.             $p = Get-ItemProperty $path RequestType
  1337.             if ($p.RequestType -eq 0) { $count += 1 }
  1338.           }
  1339.           $result = $count * 100 / $farms.Children.Length
  1340.         }
  1341.         $result
  1342.       </Script>
  1343.     </DataPoint>
  1344.     <DataPoint Id="110" Name="DATAID_RULE_ELEMENTS_FARMS_PCT_CONNECTIVITY_VERIFIER_TCP">
  1345.       <!-- The percentage of server farms with TCP conectivity verifier -->
  1346.       <Script>
  1347.         $farms = Get-Item fpc:\ContainingArray\RuleElements\ServerFarms
  1348.         $result = 0
  1349.         if ($farms.Children.Length -gt 0)
  1350.         {
  1351.           $count = 0
  1352.           foreach ($farm in Get-ChildItem fpc:\ContainingArray\RuleElements\ServerFarms)
  1353.           {
  1354.             $path = "fpc:\ContainingArray\RuleElements\ServerFarms\'" + $farm.StorageName + "'\ConnectivityVerifier"
  1355.             $p = Get-ItemProperty $path RequestType
  1356.             if ($p.RequestType -eq 2) { $count += 1 }
  1357.           }
  1358.           $result = $count * 100 / $farms.Children.Length
  1359.         }
  1360.         $result
  1361.       </Script>
  1362.     </DataPoint>
  1363.     <DataPoint Id="111" Name="DATAID_RULE_ELEMENTS_FARMS_PCT_CONNECTIVITY_VERIFIER_PING">
  1364.       <!-- The percentage of server farms with PING conectivity verifier -->
  1365.       <Script>
  1366.         $farms = Get-Item fpc:\ContainingArray\RuleElements\ServerFarms
  1367.         $result = 0
  1368.         if ($farms.Children.Length -gt 0)
  1369.         {
  1370.           $count = 0
  1371.           foreach ($farm in Get-ChildItem fpc:\ContainingArray\RuleElements\ServerFarms)
  1372.           {
  1373.             $path = "fpc:\ContainingArray\RuleElements\ServerFarms\'" + $farm.StorageName + "'\ConnectivityVerifier"
  1374.             $p = Get-ItemProperty $path RequestType
  1375.             if ($p.RequestType -eq 1) { $count += 1 }
  1376.           }
  1377.           $result = $count * 100 / $farms.Children.Length
  1378.         }
  1379.         $result
  1380.       </Script>
  1381.     </DataPoint>
  1382.     <!-- Web Listeners PCT -->
  1383.     <DataPoint Id="112" Name="DATAID_WEB_LISTENER_PCT_CLIENT_CERTIFICATE_AUTH">
  1384.       <!-- The percentage of web listeners with SSL certificate authentication -->
  1385.       <Script>
  1386.         $WL = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  1387.         $WLCount = $WL.Children.Length
  1388.         $result = 0
  1389.         if ($WLCount -gt 0)
  1390.         {
  1391.           $count = 0
  1392.           foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1393.           {
  1394.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  1395.             $p = Get-ItemProperty $path SSLCertificateAuthentication
  1396.             if ($p.SSLCertificateAuthentication -eq "True") { $count += 1 }
  1397.           }
  1398.           $result = $count * 100 / $WLCount
  1399.         }
  1400.         $result
  1401.       </Script>
  1402.     </DataPoint>
  1403.     <DataPoint Id="317" Name="DATAID_WEB_LISTENER_CLIENT_CERT_AUTH"> 
  1404.       <!-- The number of web listeners with SSL certificate authentication -->
  1405.       <Script>
  1406.         $result = 0
  1407.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1408.         {
  1409.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  1410.           $p = Get-ItemProperty $path SSLCertificateAuthentication
  1411.           if ($p.SSLCertificateAuthentication -eq "True") { $result += 1 }
  1412.         }
  1413.         $result        
  1414.       </Script>
  1415.     </DataPoint>
  1416.     <DataPoint Id="113" Name="DATAID_WEB_LISTENER_PCT_RADIUS_OTP_AUTH">
  1417.       <!-- The percentage of web listeners with RADIUS OTP authentication -->
  1418.       <Script>
  1419.         $WL = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  1420.         $WLCount = $WL.Children.Length
  1421.         $result = 0
  1422.         if ($WLCount -gt 0)
  1423.         {
  1424.           $count = 0
  1425.           foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1426.           {
  1427.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties\AuthenticationSchemes"
  1428.             foreach ($ref in Get-ChildItem $path)
  1429.             {
  1430.               $path1 = $path + "\'" + $ref.StorageName + "'"
  1431.               foreach ($authScheme in Get-ChildItem $path1)
  1432.               {
  1433.                 $path2 = $path1 + "\'" + $authScheme.StorageName + "'"
  1434.                 $p = Get-ItemProperty $path2 Namespace
  1435.                 if ($p.Namespace -match "RADIUS OTP") { $count += 1 }
  1436.               }
  1437.             }
  1438.           }
  1439.           $result = $count * 100 / $WLCount
  1440.         }
  1441.         $result
  1442.       </Script>
  1443.     </DataPoint>
  1444.     <DataPoint Id="321" Name="DATAID_WEB_LISTENER_OTP_AUTH"> 
  1445.       <!-- The number of web listeners with RADIUS OTP authentication -->        
  1446.       <Script>
  1447.         $result = 0
  1448.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1449.         {
  1450.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties\AuthenticationSchemes"
  1451.             foreach ($ref in Get-ChildItem $path)
  1452.             {
  1453.               $path1 = $path + "\'" + $ref.StorageName + "'"
  1454.               foreach ($authScheme in Get-ChildItem $path1)
  1455.               {
  1456.                 $path2 = $path1 + "\'" + $authScheme.StorageName + "'"
  1457.                 $p = Get-ItemProperty $path2 Namespace
  1458.                 if ($p.Namespace -match "RADIUS OTP") { $result += 1 }
  1459.               }
  1460.             }
  1461.         }
  1462.         $result
  1463.       </Script>    
  1464.     </DataPoint>
  1465.     <DataPoint Id="114" Name="DATAID_WEB_LISTENER_PCT_SECUR_ID_AUTH">
  1466.       <!-- The percentage of web listeners with Secure Id authentication -->
  1467.       <Script>
  1468.         $WL = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  1469.         $WLCount = $WL.Children.Length
  1470.         $result = 0
  1471.         if ($WLCount -gt 0)
  1472.         {
  1473.           $count = 0
  1474.           foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1475.           {
  1476.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties\AuthenticationSchemes"
  1477.             foreach ($ref in Get-ChildItem $path)
  1478.             {
  1479.               $path1 = $path + "\'" + $ref.StorageName + "'"
  1480.               foreach ($authScheme in Get-ChildItem $path1)
  1481.               {
  1482.                 $path2 = $path1 + "\'" + $authScheme.StorageName + "'"
  1483.                 $p = Get-ItemProperty $path2 Namespace
  1484.                 if ($p.Namespace -match "SecurID") { $count += 1 }
  1485.               }
  1486.             }
  1487.           }
  1488.           $result = $count * 100 / $WLCount
  1489.         }
  1490.         $result
  1491.       </Script>
  1492.     </DataPoint>
  1493.     <DataPoint Id="323" Name="DATAID_WEB_LISTENER_SECURE_ID_AUTH">
  1494.       <!-- The number of web listeners with Secure Id authentication -->
  1495.       <Script>
  1496.         $result = 0
  1497.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1498.         {
  1499.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties\AuthenticationSchemes"
  1500.             foreach ($ref in Get-ChildItem $path)
  1501.             {
  1502.               $path1 = $path + "\'" + $ref.StorageName + "'"
  1503.               foreach ($authScheme in Get-ChildItem $path1)
  1504.               {
  1505.                 $path2 = $path1 + "\'" + $authScheme.StorageName + "'"
  1506.                 $p = Get-ItemProperty $path2 Namespace
  1507.                 if ($p.Namespace -match "SecurID") { $result += 1 }
  1508.               }
  1509.             }
  1510.         }
  1511.         $result
  1512.       </Script>    
  1513.     </DataPoint> 
  1514.     <DataPoint Id="115" Name="DATAID_WEB_LISTENER_PCT_LDAP_AUTH">
  1515.       <!-- The percentage of web listeners with LDAP authentication -->
  1516.       <Script>
  1517.         $WL = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  1518.         $WLCount = $WL.Children.Length
  1519.         $result = 0
  1520.         if ($WLCount -gt 0)
  1521.         {
  1522.           $count = 0
  1523.           foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1524.           {
  1525.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties\AuthenticationSchemes"
  1526.             foreach ($ref in Get-ChildItem $path)
  1527.             {
  1528.               $path1 = $path + "\'" + $ref.StorageName + "'"
  1529.               foreach ($authScheme in Get-ChildItem $path1)
  1530.               {
  1531.                 $path2 = $path1 + "\'" + $authScheme.StorageName + "'"
  1532.                 $p = Get-ItemProperty $path2 Namespace
  1533.                 if ($p.Namespace -match "LDAP") { $count += 1 }
  1534.               }
  1535.             }
  1536.           }
  1537.           $result = $count * 100 / $WLCount
  1538.         }
  1539.         $result
  1540.       </Script>
  1541.     </DataPoint>
  1542.     <DataPoint Id="313" Name="DATAID_WEB_LISTENER_LDAP_AUTH">
  1543.       <!-- The number of web listeners with LDAP authentication -->    
  1544.       <Script>
  1545.         $result = 0
  1546.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1547.         {
  1548.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties\AuthenticationSchemes"
  1549.             foreach ($ref in Get-ChildItem $path)
  1550.             {
  1551.               $path1 = $path + "\'" + $ref.StorageName + "'"
  1552.               foreach ($authScheme in Get-ChildItem $path1)
  1553.               {
  1554.                 $path2 = $path1 + "\'" + $authScheme.StorageName + "'"
  1555.                 $p = Get-ItemProperty $path2 Namespace
  1556.                 if ($p.Namespace -match "LDAP") { $result += 1 }
  1557.               }
  1558.             }
  1559.         }
  1560.         $result
  1561.       </Script>        
  1562.     </DataPoint> 
  1563.     <DataPoint Id="116" Name="DATAID_WEB_LISTENER_PCT_FBA_AUTH">
  1564.       <!-- The percentage of web listeners with FBA authentication -->
  1565.       <Script>
  1566.         $WL = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  1567.         $WLCount = $WL.Children.Length
  1568.         $result = 0
  1569.         if ($WLCount -gt 0)
  1570.         {
  1571.           $count = 0
  1572.           foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1573.           {
  1574.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties\AuthenticationSchemes"
  1575.             foreach ($ref in Get-ChildItem $path)
  1576.             {
  1577.               $path1 = $path + "\'" + $ref.StorageName + "'"
  1578.               foreach ($authScheme in Get-ChildItem $path1)
  1579.               {
  1580.                 $path2 = $path1 + "\'" + $authScheme.StorageName + "'"
  1581.                 $p = Get-ItemProperty $path2 Namespace
  1582.                 if ($p.Namespace -match "FBA") { $count += 1 }
  1583.               }
  1584.             }
  1585.           }
  1586.           $result = $count * 100 / $WLCount
  1587.         }
  1588.         $result
  1589.       </Script>
  1590.     </DataPoint>
  1591.     <DataPoint Id="312" Name="DATAID_WEB_LISTENER_FBA_AUTH">
  1592.       <!-- The number of web listeners with FBA authentication -->    
  1593.       <Script>
  1594.         $result = 0
  1595.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1596.         {
  1597.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties\AuthenticationSchemes"
  1598.             foreach ($ref in Get-ChildItem $path)
  1599.             {
  1600.               $path1 = $path + "\'" + $ref.StorageName + "'"
  1601.               foreach ($authScheme in Get-ChildItem $path1)
  1602.               {
  1603.                 $path2 = $path1 + "\'" + $authScheme.StorageName + "'"
  1604.                 $p = Get-ItemProperty $path2 Namespace
  1605.                 if ($p.Namespace -match "FBA") { $result += 1 }
  1606.               }
  1607.             }
  1608.         }
  1609.         $result
  1610.       </Script>    
  1611.     </DataPoint>    
  1612.     <DataPoint Id="117" Name="DATAID_WEB_LISTENER_PCT_FBA_AND_CLIENT_CERTIFICATE_AUTH">
  1613.       <!-- The percentage of web listeners with FBA and client certificate authentication -->
  1614.       <Script>
  1615.         $WL = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  1616.         $WLCount = $WL.Children.Length
  1617.         $result = 0
  1618.         if ($WLCount -gt 0)
  1619.         {
  1620.           $count = 0
  1621.           foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1622.           {
  1623.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  1624.             $p = Get-ItemProperty $path SSLCertificateAuthentication
  1625.             $sslCertAuth = $p.SSLCertificateAuthentication
  1626.             if ($sslCertAuth)
  1627.             {
  1628.               $path1 = $path + "\AuthenticationSchemes"
  1629.               foreach ($ref in Get-ChildItem $path1)
  1630.               {
  1631.                 $path2 = $path1 + "\'" + $ref.StorageName + "'"
  1632.                 foreach ($authScheme in Get-ChildItem $path2)
  1633.                 {
  1634.                   $path3 = $path2 + "\'" + $authScheme.StorageName + "'"
  1635.                   $p = Get-ItemProperty $path3 Namespace
  1636.                   if (($p.Namespace -match "FBA") -and ($sslCertAuth)) { $count += 1; $sslCertAuth = 0; break }
  1637.                 }
  1638.                 if (-not sslCertAuth) { break; }
  1639.               }
  1640.             }
  1641.           }
  1642.           $result = $count * 100 / $WLCount
  1643.         }
  1644.         $result
  1645.       </Script>
  1646.     </DataPoint>    
  1647.     <DataPoint Id="327" Name="DATAID_WEB_LISTENER_FBA_CLIENT_CERT_AUTH">
  1648.       <!-- The number of web listeners with FBA and client certificate authentication -->
  1649.       <Script>
  1650.         $result = 0
  1651.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1652.         {
  1653.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties"
  1654.             $p = Get-ItemProperty $path SSLCertificateAuthentication
  1655.             $sslCertAuth = $p.SSLCertificateAuthentication
  1656.             if ($sslCertAuth)
  1657.             {
  1658.               $path1 = $path + "\AuthenticationSchemes"
  1659.               foreach ($ref in Get-ChildItem $path1)
  1660.               {
  1661.                 $path2 = $path1 + "\'" + $ref.StorageName + "'"
  1662.                 foreach ($authScheme in Get-ChildItem $path2)
  1663.                 {
  1664.                   $path3 = $path2 + "\'" + $authScheme.StorageName + "'"
  1665.                   $p = Get-ItemProperty $path3 Namespace
  1666.                   if (($p.Namespace -match "FBA") -and ($sslCertAuth)) { $result += 1; $sslCertAuth = 0; break }
  1667.                 }
  1668.                 if (-not sslCertAuth) { break; }
  1669.               }
  1670.             }
  1671.         }
  1672.         
  1673.         $result
  1674.       </Script>
  1675.     </DataPoint>
  1676.     <DataPoint Id="118" Name="DATAID_WEB_LISTENER_PCT_CUSTOM_HTML_FORM">
  1677.       <!-- The percentage of web listeners with custom HTML authentication form -->
  1678.       <Script>
  1679.         $WL = Get-Item fpc:\ContainingArray\RuleElements\WebListeners
  1680.         $WLCount = $WL.Children.Length
  1681.         $result = 0
  1682.         if ($WLCount -gt 0)
  1683.         {
  1684.           $count = 0
  1685.           foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1686.           {
  1687.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties\FormsBasedAuthenticationProperties"
  1688.             $p = Get-ItemProperty $path CustomFormsDirectory
  1689.             if ($p.CustomFormsDirectory.Length -gt 0) { $count +=1 }
  1690.           }
  1691.           $result = $count * 100 / $WLCount
  1692.         }
  1693.         $result
  1694.       </Script>
  1695.     </DataPoint>   
  1696.     <DataPoint Id="318" Name="DATAID_WEB_LISTENER_CUSTOM_FBA">
  1697.       <!-- The numbe of web listeners with custom HTML authentication form -->
  1698.       <Script>
  1699.         $result = 0
  1700.         foreach ($listener in Get-ChildItem fpc:\ContainingArray\RuleElements\WebListeners)
  1701.         {
  1702.           $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listener.StorageName + "'\Properties\FormsBasedAuthenticationProperties"
  1703.           $p = Get-ItemProperty $path CustomFormsDirectory
  1704.           if ($p.CustomFormsDirectory.Length -gt 0) { $result +=1 }
  1705.         }
  1706.         $result
  1707.       </Script>
  1708.     </DataPoint>
  1709.     <!-- Array Policy - Web Publishing -->
  1710.     <DataPoint Id="119" Name="DATAID_ARRAY_POLICY_WEB_PUBLISHING_PCT_SECUR_ID_DELEGATION">
  1711.       <!-- The percentage of web publishing rules with SecureID delegation -->
  1712.       <Script>
  1713.         $wpRulesCount = 0
  1714.         $count = 0
  1715.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1716.         {
  1717.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1718.           $p = Get-ItemProperty $path Type
  1719.           if ($p.Type -eq 2)
  1720.           {
  1721.             $wpRulesCount += 1
  1722.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  1723.             $p = Get-ItemProperty $path CredentialsDelegationType
  1724.             if ($p.CredentialsDelegationType -eq 2) { $count += 1 }
  1725.           }
  1726.         }
  1727.  
  1728.         $result = 0
  1729.         if ($wpRulesCount -gt 0) { $result = $count * 100 / $wpRulesCount }
  1730.         $result
  1731.       </Script>
  1732.     </DataPoint>
  1733.     
  1734.     <DataPoint Id="335" Name="DATAID_WEB_PUBLISHING_DELEGATION_SECURE_ID">
  1735.       <!-- The number of web publishing rules with SecureID delegation -->
  1736.       <Script>
  1737.         $result = 0
  1738.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1739.         {
  1740.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1741.           $p = Get-ItemProperty $path Type
  1742.           if ($p.Type -eq 2)
  1743.           {
  1744.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  1745.             $p = Get-ItemProperty $path CredentialsDelegationType
  1746.             if ($p.CredentialsDelegationType -eq 2) { $result += 1 }
  1747.           }
  1748.         }
  1749.         $result
  1750.       </Script>
  1751.     </DataPoint>
  1752.     
  1753.     <DataPoint Id="120" Name="DATAID_ARRAY_POLICY_WEB_PUBLISHING_PCT_KERBEROS_DELEGATION">
  1754.       <!-- The percentage of web publishing rules with kerberos delegation -->
  1755.       <Script>
  1756.         $wpRulesCount = 0
  1757.         $count = 0
  1758.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1759.         {
  1760.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1761.           $p = Get-ItemProperty $path Type
  1762.           if ($p.Type -eq 2)
  1763.           {
  1764.             $wpRulesCount += 1
  1765.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  1766.             $p = Get-ItemProperty $path CredentialsDelegationType
  1767.             if ($p.CredentialsDelegationType -eq 6) { $count += 1 }
  1768.           }
  1769.         }
  1770.  
  1771.         $result = 0
  1772.         if ($wpRulesCount -gt 0) { $result = $count * 100 / $wpRulesCount }
  1773.         $result
  1774.       </Script>
  1775.     </DataPoint>    
  1776.     
  1777.     <DataPoint Id="334" Name="DATAID_WEB_PUBLISHING_DELEGATION_KCD">
  1778.       <!-- The number of web publishing rules with kerberos delegation -->
  1779.       <Script>
  1780.         $result = 0
  1781.  
  1782.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1783.         {
  1784.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1785.           $p = Get-ItemProperty $path Type
  1786.           if ($p.Type -eq 2)
  1787.           {
  1788.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  1789.             $p = Get-ItemProperty $path CredentialsDelegationType
  1790.             if ($p.CredentialsDelegationType -eq 6) { $result += 1 }
  1791.           }
  1792.         }
  1793.  
  1794.         $result
  1795.       </Script>
  1796.     </DataPoint>
  1797.     
  1798.     <DataPoint Id="121" Name="DATAID_ARRAY_POLICY_WEB_PUBLISHING_PCT_SSL_BRINDGING">
  1799.       <!-- The percentage of web publishing rules with SSL binding -->
  1800.       <Script>
  1801.         $wpRulesCount = 0
  1802.         $count = 0
  1803.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1804.         {
  1805.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1806.           $p = Get-ItemProperty $path Type
  1807.           if ($p.Type -eq 2)
  1808.           {
  1809.             $wpRulesCount += 1
  1810.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  1811.             $p = Get-ItemProperty $path PublishedServerType
  1812.             if (($p.PublishedServerType -eq 1) -or ($p.PublishedServerType -eq 2))
  1813.             {
  1814.               $count += 1
  1815.             }
  1816.           }
  1817.         }
  1818.  
  1819.         $result = 0
  1820.         if ($wpRulesCount -gt 0) { $result = $count * 100 / $wpRulesCount }
  1821.         $result
  1822.       </Script>
  1823.     </DataPoint>
  1824.     
  1825.     <DataPoint Id="122" Name="DATAID_ARRAY_POLICY_WEB_PUBLISHING_PCT_CUSTOM_HTML_FORM">
  1826.       <!-- The percentage of web publishing rules with custom HTML form authentication -->
  1827.       <Script>
  1828.         $wpRulesCount = 0
  1829.         $count = 0
  1830.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1831.         {
  1832.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1833.           $p = Get-ItemProperty $path Type
  1834.           if ($p.Type -eq 2)
  1835.           {
  1836.             $wpRulesCount += 1
  1837.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  1838.             $p = Get-ItemProperty $path CustomFormsDirectory
  1839.             if ($p.CustomFormsDirectory.Length -gt 0) { $count += 1 }
  1840.           }
  1841.         }
  1842.  
  1843.         $result = 0
  1844.         if ($wpRulesCount -gt 0) { $result = $count * 100 / $wpRulesCount }
  1845.         $result
  1846.       </Script>
  1847.     </DataPoint>
  1848.     <!-- Array Policy - Web Publishing w/ NLB -->
  1849.     <DataPoint Id="123" Name="DATAID_ARRAY_POLICY_WEB_FARM_PUBLISHING_RULE_COUNT">
  1850.       <!-- The number of web publishing rules with NLB enabled -->
  1851.       <Script>
  1852.         $wpRulesCount = 0
  1853.         $count = 0
  1854.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1855.         {
  1856.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1857.           $p = Get-ItemProperty $path Type
  1858.           if ($p.Type -eq 2)
  1859.           {
  1860.             $wpRulesCount += 1
  1861.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  1862.             $p = Get-ItemProperty $path LoadBalancingEnabled
  1863.             if ($p.LoadBalancingEnabled -eq "True") { $count += 1 }
  1864.           }
  1865.         }
  1866.  
  1867.         $result = 0
  1868.         if ($wpRulesCount -gt 0) { $result = $count * 100 / $wpRulesCount }
  1869.         $result
  1870.       </Script>
  1871.     </DataPoint>
  1872.     <DataPoint Id="124" Name="DATAID_ARRAY_POLICY_WEB_FARM_PCT_AFFINITY_IP">
  1873.       <!-- The percentage of web publishing rules with NLB enabled that have IP affinity -->
  1874.       <Script>
  1875.         $wpNlbRulesCount = 0
  1876.         $count = 0
  1877.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1878.         {
  1879.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1880.           $p = Get-ItemProperty $path Type
  1881.           if ($p.Type -eq 2)
  1882.           {
  1883.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  1884.             $p = Get-ItemProperty $path LoadBalancingEnabled
  1885.             if ($p.LoadBalancingEnabled -eq "True")
  1886.             {
  1887.               $wpNlbRulesCount += 1
  1888.               $path1 = $path + "\LoadBalancingConfig"
  1889.               $p = Get-ItemProperty $path1 AffinityType
  1890.               if ($p.AffinityType -eq 1) { $count += 1 }
  1891.             }
  1892.           }
  1893.         }
  1894.  
  1895.         $result = 0
  1896.         if ($wpNlbRulesCount -gt 0) { $result = $count * 100 / $wpNlbRulesCount }
  1897.         $result
  1898.       </Script>
  1899.     </DataPoint>
  1900.     <DataPoint Id="125" Name="DATAID_ARRAY_POLICY_WEB_FARM_PCT_AFFINITY_SESSION">
  1901.       <!-- The percentage of web publishing rules with NLB enabled that have session affinity -->
  1902.       <Script>
  1903.         $wpNlbRulesCount = 0
  1904.         $count = 0
  1905.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  1906.         {
  1907.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  1908.           $p = Get-ItemProperty $path Type
  1909.           if ($p.Type -eq 2)
  1910.           {
  1911.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  1912.             $p = Get-ItemProperty $path LoadBalancingEnabled
  1913.             if ($p.LoadBalancingEnabled -eq "True")
  1914.             {
  1915.               $wpNlbRulesCount += 1
  1916.               $path1 = $path + "\LoadBalancingConfig"
  1917.               $p = Get-ItemProperty $path1 AffinityType
  1918.               if ($p.AffinityType -eq 0) { $count += 1 }
  1919.             }
  1920.           }
  1921.         }
  1922.  
  1923.         $result = 0
  1924.         if ($wpNlbRulesCount -gt 0) { $result = $count * 100 / $wpNlbRulesCount }
  1925.         $result
  1926.       </Script>
  1927.     </DataPoint>
  1928.     <!-- Connections -->
  1929.     <DataPoint Id="126" Name="DATAID_CONNECTION_LIMIT_ENALBED" Operation="BitField">
  1930.       <!-- Connection limit settings -->
  1931.       <Script>
  1932.         $policy = "fpc:\ContainingArray\ArrayPolicy\ConnectionLimitPolicy"
  1933.         $result = 0
  1934.  
  1935.         $p = Get-ItemProperty $policy Enabled
  1936.         if ($p.Enabled -eq "True") { $result = 1 }
  1937.  
  1938.         $p = Get-ItemProperty $policy LogQuotaRejectedTraffic
  1939.         if ($p.LogQuotaRejectedTraffic -eq "True") { $result = $result -bor 2 }
  1940.  
  1941.         $result
  1942.       </Script>
  1943.     </DataPoint>
  1944.     <DataPoint Id="127" Name="DATAID_CONNECTION_LIMIT_TCP_LIMIT">
  1945.       <!-- Connection default TCP limit -->
  1946.       <Script>
  1947.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\ConnectionLimitPolicy\DefaultLimit TcpLimit
  1948.         $p.TcpLimit
  1949.       </Script>
  1950.     </DataPoint>
  1951.     <DataPoint Id="128" Name="DATAID_CONNECTION_LIMIT_UDP_LIMIT">
  1952.       <!-- Connection default UDP limit -->
  1953.       <Script>
  1954.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\ConnectionLimitPolicy\DefaultLimit UdpLimit
  1955.         $p.UdpLimit
  1956.       </Script>
  1957.     </DataPoint>
  1958.     <DataPoint Id="129" Name="DATAID_CONNECTION_LIMIT_OTHER_LIMIT">
  1959.       <!-- Connection default other limit -->
  1960.       <Script>
  1961.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\ConnectionLimitPolicy\DefaultLimit OtherLimit
  1962.         $p.OtherLimit
  1963.       </Script>
  1964.     </DataPoint>
  1965.     <DataPoint Id="130" Name="DATAID_CONNECTION_LIMIT_TCP_PER_MINUTE">
  1966.       <!-- Connection default TCP connections per minute limit -->
  1967.       <Script>
  1968.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\ConnectionLimitPolicy\DefaultLimit TcpLimitPerMinute
  1969.         $p.TcpLimitPerMinute
  1970.       </Script>
  1971.     </DataPoint>
  1972.     <DataPoint Id="131" Name="DATAID_CONNECTION_LIMIT_HTTP_PER_MINUTE">
  1973.       <!-- Connection default HTTP connections per minute limit -->
  1974.       <Script>
  1975.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\ConnectionLimitPolicy\DefaultLimit HttpLimitPerMinute
  1976.         $p.HttpLimitPerMinute
  1977.       </Script>
  1978.     </DataPoint>
  1979.     <DataPoint Id="132" Name="DATAID_CONNECTION_LIMIT_RULE_PER_SECOND">
  1980.       <!-- Connection default rule evauation per second limit -->
  1981.       <Script>
  1982.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\ConnectionLimitPolicy RulePerSecondLimit
  1983.         $p.RulePerSecondLimit
  1984.       </Script>
  1985.     </DataPoint>
  1986.     <DataPoint Id="133" Name="DATAID_CONNECTION_LIMIT_TRIGGER_EVENT_FOR_DENIED_PACKETS">
  1987.       <!-- Connection default logged denied packet per minute limit -->
  1988.       <Script>
  1989.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\ConnectionLimitPolicy LoggedDeniedPerMinute
  1990.         $p.LoggedDeniedPerMinute
  1991.       </Script>
  1992.     </DataPoint>
  1993.     <!-- HTTP Compression -->
  1994.     <DataPoint Id="134" Name="DATAID_COMPRESSION_ENABLED" Operation="BitField">
  1995.       <!-- Compression enabled/disabled -->
  1996.       <Script>
  1997.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration Enabled
  1998.         $p.Enabled
  1999.       </Script>
  2000.     </DataPoint>
  2001.     <DataPoint Id="135" Name="DATAID_COMPRESSION_REQUEST_SOURCE_ITEMS">
  2002.       <!-- The count of source items in the RequestSource -->
  2003.       <Script>
  2004.         $count = 0
  2005.  
  2006.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestSource\Networks
  2007.         $count += $p.Children.Length
  2008.  
  2009.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestSource\NetworkSets
  2010.         $count += $p.Children.Length
  2011.  
  2012.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestSource\Computers
  2013.         $count += $p.Children.Length
  2014.  
  2015.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestSource\AddressRanges
  2016.         $count += $p.Children.Length
  2017.  
  2018.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestSource\Subnets
  2019.         $count += $p.Children.Length
  2020.  
  2021.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestSource\ComputerSets
  2022.         $count += $p.Children.Length
  2023.  
  2024.         $count
  2025.       </Script>
  2026.     </DataPoint>
  2027.     <DataPoint Id="136" Name="DATAID_COMPRESSION_REQUEST_DESTINATION_ITEMS">
  2028.       <!-- The count of source items in the RequestDestination -->
  2029.       <Script>
  2030.         $count = 0
  2031.  
  2032.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestDestination\Networks
  2033.         $count += $p.Children.Length
  2034.  
  2035.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestDestination\NetworkSets
  2036.         $count += $p.Children.Length
  2037.  
  2038.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestDestination\Computers
  2039.         $count += $p.Children.Length
  2040.  
  2041.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestDestination\AddressRanges
  2042.         $count += $p.Children.Length
  2043.  
  2044.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestDestination\Subnets
  2045.         $count += $p.Children.Length
  2046.  
  2047.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\RequestDestination\ComputerSets
  2048.         $count += $p.Children.Length
  2049.  
  2050.         $count
  2051.       </Script>
  2052.     </DataPoint>
  2053.     <DataPoint Id="137" Name="DATAID_COMPRESSION_WEB_LISTENERS">
  2054.       <!-- The count of web listeners -->
  2055.       <Script>
  2056.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\WebListeners
  2057.         $p.Children.Length
  2058.       </Script>
  2059.     </DataPoint>
  2060.     <DataPoint Id="138" Name="DATAID_COMPRESSION_CONTENT_TYPE_COUNT">
  2061.       <!-- The count of content types -->
  2062.       <Script>
  2063.         $p = Get-Item fpc:\ContainingArray\ArrayPolicy\WebProxy\HTTPCompressionConfiguration\CompressibleContentTypeSets
  2064.         $p.Children.Length
  2065.       </Script>
  2066.     </DataPoint>
  2067.     <!-- Network templates -->
  2068.     <DataPoint Id="139" Name="DATAID_NETWORK_TEMPLATE_USED">
  2069.       <!-- the network template used -->
  2070.       <Script>
  2071.         $p = Get-ItemProperty fpc:\ContainingArray\NetworkTemplateUsed Guid
  2072.  
  2073.         $result = 6
  2074.         if ($p.Guid -ieq "{e826736f-262a-47af-8871-980561676073}") { $result = 1 }
  2075.         if ($p.Guid -ieq "{9be6f18a-57ad-4cea-b924-2cfedfef3799}") { $result = 2 }
  2076.         if ($p.Guid -ieq "{2ef25ed2-c029-4a5b-b274-590b9953f2f5}") { $result = 3 }
  2077.         if ($p.Guid -ieq "{1c02d67f-7cf6-429c-9b46-b7805fcced41}") { $result = 4 }
  2078.         if ($p.Guid -ieq "{2c02d67f-7cf6-429c-9b46-b7805fcced42}") { $result = 5 }
  2079.         $result
  2080.       </Script>
  2081.     </DataPoint>
  2082.     <!-- Log Count -->
  2083.     <DataPoint Id="140" Name="DATAID_LOGGING_DAILY_FW_LOG_COUNT">
  2084.       <!-- Get the FW daily log count -->
  2085.       <Script>
  2086.         $result = Get-RegValue "DailyFWLogCount"
  2087.         $result
  2088.       </Script>
  2089.     </DataPoint>
  2090.     <DataPoint Id="141" Name="DATAID_LOGGING_DAILY_WP_LOG_COUNT">
  2091.       <!-- Get the WP daily log count -->
  2092.       <Script>
  2093.         $result = Get-RegValue "DailyWEBLogCount"
  2094.         $result
  2095.       </Script>
  2096.     </DataPoint>
  2097.     <DataPoint Id="142" Name="DATAID_LOGGING_MAX_DAILY_FW_LOG_COUNT">
  2098.       <!-- Get the FW daily log max count -->
  2099.       <Script>
  2100.         $result = Get-RegValue "DailyFWMaxLogRate"
  2101.         $result
  2102.       </Script>
  2103.     </DataPoint>
  2104.     <DataPoint Id="143" Name="DATAID_LOGGING_MAX_DAILY_WP_LOG_COUNT">
  2105.       <!-- Get the WP daily log max count -->
  2106.       <Script>
  2107.         $result = Get-RegValue "DailyWEBMaxLogRate"
  2108.         $result
  2109.       </Script>
  2110.     </DataPoint>
  2111.     <!-- Server info -->
  2112.     <DataPoint Id="144" Name="DATAID_SERVER_DOMAIN_MEMBERSHIP">
  2113.       <!-- Get the domain membership state of the current server -->
  2114.       <Script>
  2115.         $p = Get-ItemProperty fpc:\ContainingServer IsJoinedToDomain
  2116.         $p.IsJoinedToDomain
  2117.       </Script>
  2118.     </DataPoint>
  2119.     <!-- Windows Update -->
  2120.     <DataPoint Id="145" Name="DATAID_SERVER_AUTO_UPDATE_STATE">
  2121.       <!-- MU settings -->
  2122.       <Script>
  2123.         $result = Get-RegValue "AUOptions" -Key "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"
  2124.         $result
  2125.       </Script>
  2126.     </DataPoint>
  2127.     
  2128.     <!-- Skiped DataPoint: 146, DATAID_DATAID_SERVER_FRAMEWORK_VERSION (no longer relevant) -->
  2129.  
  2130.     <!-- Diagnostic logging -->
  2131.     <DataPoint Id="147" Name="DATAID_DIAG_LOGGING_USED">
  2132.       <!-- Was diagnostic logging used since the last SQM -->
  2133.       <Script>
  2134.         $result = Get-RegValue "ISAIsDiaglogOn" -ResetValue 1
  2135.         $result
  2136.       </Script>
  2137.     </DataPoint>
  2138.     
  2139.     <!-- Skiped DataPoint: 148, DATAID_IAG_OS_VERSION_MAJOR (IAG) -->
  2140.     <!-- Skiped DataPoint: 149, DATAID_IAG_OS_VERSION_MINOR (IAG) -->
  2141.     <!-- Skiped DataPoint: 150, DATAID_IAG_OS_SP_VERSION (IAG) -->
  2142.     <!-- Skiped DataPoint: 151, DATAID_IAG_VERSION (IAG) -->
  2143.     <!-- Skiped DataPoint: 152, DATAID_IAG_SETUP_SUCCESSFUL (IAG) -->
  2144.     <!-- Skiped DataPoint: 153, DATAID_IAG_UTM_PROXY_ENABLED (IAG) -->
  2145.     <!-- Skiped DataPoint: 154, DATAID_BPA_WAS_HELPFUL (BPA) -->
  2146.     <!-- Skiped DataPoint: 155, DATAID_DATAID_BPA_ALERTS1 (BPA) -->
  2147.     <!-- Skiped DataPoint: 156, DATAID_DATAID_BPA_ALERTS2 (BPA) -->
  2148.     <!-- Skiped DataPoint: 157, DATAID_DATAID_BPA_ALERTS3 (BPA) -->
  2149.     <!-- Skiped DataPoint: 158, DATAID_DATAID_BPA_ALERTS4 (BPA) -->
  2150.     <!-- Skiped DataPoint: 159, DATAID_DATAID_BPA_ALERTS5 (BPA) -->
  2151.     <!-- Skiped DataPoint: 160, DATAID_DATAID_BPA_ALERTS6 (BPA) -->
  2152.     <!-- Skiped DataPoint: 161, DATAID_DATAID_BPA_ALERTS7 (BPA) -->
  2153.  
  2154.     <DataPoint Id="162" Name="DATAID_FW_SRV_FAIL_REASON">
  2155.       <!-- The most significant failure reason since the last analysis -->
  2156.       <Script>
  2157.         $reason = Get-LogAnalysis "Reason"
  2158.         $reason
  2159.       </Script>
  2160.     </DataPoint>
  2161.     <DataPoint Id="163" Name="DATAID_FW_SRV_FAIL_DETAILS">
  2162.       <!-- The most significant failure aditional details since the last analysis -->
  2163.       <Script>
  2164.         $details = Get-LogAnalysis "Details"
  2165.         $details
  2166.       </Script>
  2167.     </DataPoint>
  2168.     <DataPoint Id="164" Name="DATAID_FW_SRV_UPTIME">
  2169.       <!-- The most significant failure FW SRV uptime since the last analysis -->
  2170.       <Script>
  2171.         $details = Get-LogAnalysis "Uptime"
  2172.         $details
  2173.       </Script>
  2174.     </DataPoint>
  2175.  
  2176.     <!-- Skiped DataPoint: 165, DATAID_IAG_OS_AUTO_UPDATE (IAG) -->
  2177.     <!-- Skiped DataPoint: 166, DATAID_IAG_OS_LANGUAGE (IAG) -->
  2178.     <!-- Skiped DataPoint: 167, DATAID_IAG_WFLB_APPS (IAG) -->
  2179.     <!-- Skiped DataPoint: 168, DATAID_IAG_WFLB_SERVERS (IAG) -->
  2180.     <!-- Skiped DataPoint: 169, DATAID_IAG_WFLB_QUESTIONS (IAG) -->
  2181.     
  2182.     <!-- Change tracking -->
  2183.     <DataPoint Id="170" Name="DATAID_ARRAY_CHANGE_TRACKING" Operation="BitField">
  2184.       <!-- change tracking settings -->
  2185.       <Script>
  2186.         $result = 0
  2187.  
  2188.         $p = Get-ItemProperty fpc:\ContainingArray\ChangeTracking Enabled
  2189.         if ($p.Enabled -eq "True") { $result = 1 }
  2190.  
  2191.         $result
  2192.       </Script>
  2193.     </DataPoint>
  2194.     <!-- Supportability -->
  2195.     <DataPoint Id="171" Name="DATAID_TRAFFIC_SIMULATOR_USED">
  2196.       <!-- Was the traffic simulator used since the last SQM upload -->
  2197.       <Script>
  2198.         $result = Get-RegValue "ISAIsTrafficSimulatorUsed" -ResetValue 1
  2199.         $result
  2200.       </Script>
  2201.     </DataPoint>
  2202.     <DataPoint Id="172" Name="DATAID_TEST_BUTTON_USED">
  2203.       <!-- Was the test button used since the last SQM upload -->
  2204.       <Script>
  2205.         $result = Get-RegValue "ISAIsTestButtonUsed" -ResetValue 1
  2206.         $result
  2207.       </Script>
  2208.     </DataPoint>
  2209.     <!-- Alerts -->
  2210.     <DataPoint Id="173" Name="DATAID_ALERTS">
  2211.       <!-- Signaled alerts in the last 24h -->
  2212.       <Script>
  2213.         $lastTime = (Get-Date).AddDays(-1)
  2214.         $result = @{}
  2215.         foreach ($alert in Get-ChildItem fpc:\ContainingServer\SignaledAlerts)
  2216.         {
  2217.           $count = 0
  2218.           $acknowledged = 0
  2219.           $path = "fpc:\ContainingServer\SignaledAlerts\'" + $alert.Name + "'"
  2220.           foreach ($ai in Get-ChildItem $path)
  2221.           {
  2222.             $path1 = $path + "\'" + $ai.Name + "'"
  2223.             $p = Get-ItemProperty $path1 TimeStamp
  2224.             $signalTime = Get-Date $p.TimeStamp
  2225.             if ($signalTime -gt $lastTime)
  2226.             {
  2227.               $p = Get-ItemProperty $path1 Count
  2228.               $count += $p.Count
  2229.               $p = Get-ItemProperty $path1 Acknowledged
  2230.               if ($p.Acknowledged -eq "True") { $acknowledged += $ai.Children.Length }
  2231.             }
  2232.           }
  2233.  
  2234.           if ($count -gt 0)
  2235.           {
  2236.             $Id = Get-ItemProperty $path EventGUID
  2237.             $Key = Get-ItemProperty $path AdditionalKey
  2238.             $Name = Get-ItemProperty $path Name
  2239.  
  2240.             $list = $Id.EventGUID, $Key.AdditionalKey, $Name.Name, $count, $acknowledged
  2241.             $result.Add($Id.EventGUID, $list)
  2242.           }
  2243.         }
  2244.         $result
  2245.       </Script>
  2246.     </DataPoint>
  2247.     <DataPoint Id="174" Name="DATAID_NIS_SIG_DETECT_ONLY_PERCENT">
  2248.       <!-- Percent of Network Inspection System (NIS) signatures that are applied with detect only -->
  2249.       <Script>
  2250.         $sigCount = 0
  2251.         $sigDetect = 0
  2252.         $path = "fpc:\ContainingServer\NisSignatureSet\Signatures"
  2253.         foreach ($signature in Get-ChildItem fpc:\ContainingServer\NisSignatureSet\Signatures)
  2254.         {
  2255.             $sigCount++
  2256.  
  2257.             $path1 = $path + "\'" + $signature.StorageName + "'"
  2258.             $response = Get-ItemProperty $path1 Response
  2259.             if ($response.Response -eq 1)
  2260.             {
  2261.                 $sigDetect++
  2262.             }
  2263.         }
  2264.         $p = 0
  2265.         if ($sigCount -gt 0)
  2266.         {
  2267.             $p = 100 * $sigDetect / $sigCount
  2268.         }
  2269.         $p
  2270.       </Script>
  2271.     </DataPoint>
  2272.     <DataPoint Id="175" Name="DATAID_NIS_INSPECTION_STATUS">
  2273.       <!-- Network inspection system (NIS) status -->
  2274.       <Script>
  2275.         $p = Get-ItemProperty fpc:\ContainingArray\NetworkInspectionSystem Enabled
  2276.         $p.Enabled
  2277.       </Script>
  2278.     </DataPoint>
  2279.     <DataPoint Id="176" Name="DATAID_NIS_NEW_SIG_POLICY">
  2280.       <!-- Network Inspection System (NIS) policy of applying new signatures: either default, detect, or disable -->
  2281.       <Script>
  2282.         $p = Get-ItemProperty fpc:\ContainingArray\NetworkInspectionSystem InitialSignatureConfiguration
  2283.         $p.InitialSignatureConfiguration
  2284.       </Script>
  2285.     </DataPoint>
  2286.     <DataPoint Id="177" Name="DATAID_NIS_ACTIVATED_SNAPSHOT">
  2287.     <!-- Network Inspection System (NIS) snapshot activated: most recent, second most recent, ..., fifth most recent -->
  2288.       <Script>
  2289.         $index = 0
  2290.         $p = Get-ItemProperty fpc:\ContainingArray\NetworkInspectionSystem MostRecentSignatureSetUsed 
  2291.         if ($p.MostRecentSignatureSetUsed -eq "False")
  2292.         {
  2293.             $activeDate = Get-ItemProperty fpc:\ContainingArray\NetworkInspectionSystem\ActiveSignatureSet ReleaseDate
  2294.             $path = "fpc:\ContainingArray\NetworkInspectionSystem\AvailableSignatureSets"
  2295.             foreach ($availableSigSet in Get-ChildItem fpc:\ContainingArray\NetworkInspectionSystem\AvailableSignatureSets)
  2296.             {
  2297.                 $path1 = $path + "\'" + $availableSigSet.StorageName + "'"
  2298.                 $currDate = Get-ItemProperty $path1 ReleaseDate
  2299.                 
  2300.                 if ($currDate.ReleaseDate -lt $activeDate.ReleaseDate)
  2301.                 {
  2302.                     $index++
  2303.                 }
  2304.             }
  2305.         }
  2306.         $index
  2307.       </Script>
  2308.     </DataPoint>
  2309.     <DataPoint Id="178" Name="DATAID_NIS_UPDATE_ACTION">
  2310.       <!-- Network Inspection System (NIS) automatic update action: either check and install, check only, or no automatic action -->
  2311.       <Script>
  2312.         $p =  Get-ItemProperty fpc:\ContainingArray\UpdateCenter\UpdateServices\'{464716F5-0BAB-494a-A51A-30400DDF127F}' UpdateAction
  2313.         $p.UpdateAction
  2314.       </Script>
  2315.     </DataPoint>
  2316.     <DataPoint Id="179" Name="DATAID_SPY_NET_SELECTION">
  2317.       <!-- SpyNet Selection: not joined, basic join, extended join -->
  2318.       <Script>
  2319.         $p = Get-ItemProperty fpc:\ContainingArray SpyNetLevel
  2320.         $p.SpyNetLevel
  2321.       </Script>
  2322.     </DataPoint>
  2323.     <DataPoint Id="180" Name="DATAID_NIS_SIG_DEFAULT_PERCENT">
  2324.     <!-- Percent of Network Inspection System (NIS) signatures that are applied with default response -->
  2325.       <Script>
  2326.         $sigCount = 0
  2327.         $sigDefault = 0
  2328.         $path = "fpc:\ContainingServer\NisSignatureSet\Signatures"
  2329.         foreach ($signature in Get-ChildItem fpc:\ContainingServer\NisSignatureSet\Signatures)
  2330.         {
  2331.             $sigCount++
  2332.  
  2333.             $path1 = $path + "\'" + $signature.StorageName + "'"
  2334.             $policy = Get-ItemProperty $path1 CustomPolicyUsed
  2335.             if ($policy.CustomPolicyUsed -eq "False")
  2336.             {
  2337.                 $sigDefault++
  2338.             }
  2339.         }
  2340.         $p = 0
  2341.         if ($sigCount -gt 0)
  2342.         {
  2343.             $p = 100 * $sigDefault / $sigCount
  2344.         }
  2345.         $p
  2346.       </Script>
  2347.     </DataPoint>
  2348.     <!-- SIP -->
  2349.     <DataPoint Id="181" Name="DATAID_SIP_SETTINGS">
  2350.       <!-- SIP Settings -->
  2351.       <!-- Bit 1: VOIP Exist -->
  2352.       <!-- Bit 2: Centrix scenario -->
  2353.       <!-- Bit 3: SIP Trunk scenario -->
  2354.       <Script>
  2355.         # VOIP exist if there is an access rule w/ SIP protocol (bit 1)
  2356.         # SIP Trunk scenario: server publishing rule w/ SIP_SERVER protocol
  2357.         $bit1Set = 0
  2358.         $bit3Set = 0
  2359.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  2360.         {
  2361.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  2362.  
  2363.           $p = Get-ItemProperty $path Type
  2364.           if ($p.Type -eq 0)
  2365.           {
  2366.             # access rule
  2367.             if ($bit1Set -ne 0) { continue }
  2368.             $path += "\AccessProperties"
  2369.             $p = Get-ItemProperty $path ProtocolSelectionMethod
  2370.             if ($p.ProtocolSelectionMethod -ne 1) { continue } # ignore non-specific rules
  2371.             $path1 = $path + "\SpecifiedProtocols"
  2372.             foreach ($ref in Get-ChildItem $path1)
  2373.             {
  2374.               $path2 = $path1 + "\'" + $ref.StorageName + "'"
  2375.               foreach ($protocol in Get-ChildItem $path2)
  2376.               {
  2377.                 if ($protocol.StorageName -eq "{9b5cb9f6-5b2b-47be-924e-2d6db0527292}")
  2378.                 {
  2379.                   #found SIP
  2380.                   $bit1Set = 1
  2381.                 }
  2382.               }
  2383.             }
  2384.           }
  2385.           elseif ($p.Type -eq 1)
  2386.           {
  2387.             # server publishing
  2388.             if ($bit3Set -ne 0) { continue }
  2389.             $path += "\ServerPublishingProperties\PublishedProtocol"
  2390.             foreach ($protocol in Get-ChildItem $path)
  2391.             {
  2392.               if ($protocol.StorageName -eq "{bb1a05b4-7fad-4690-8668-5103f69e7e4e}")
  2393.               {
  2394.                 #found SIP_SERVER
  2395.                 $bit3Set = 1
  2396.               }
  2397.             }
  2398.           }
  2399.           
  2400.           if (($bit1Set -ne 0) -and ($bit3Set -ne 0))
  2401.           {
  2402.             # both bits are set no need to continue
  2403.             break
  2404.           }
  2405.         }
  2406.         
  2407.         $result = 0
  2408.         if ($bit1Set -ne 0) { $result = 1 }
  2409.         
  2410.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\SipSettings ExternalRegistrationEnabled
  2411.         if ($p.ExternalRegistrationEnabled -eq "True")
  2412.         {
  2413.           $result = $result -bor 2
  2414.         }
  2415.  
  2416.         if ($bit3Set -ne 0) { $result = $result -bor 4 }
  2417.         
  2418.         $result
  2419.       </Script>
  2420.     </DataPoint>
  2421.     
  2422.     
  2423.     <DataPoint Id="182" Name="DATAID_DA_GENERAL_SETTINGS" Operation="BitField">
  2424.       <!-- General settings of Direct Access feature (bitmap).
  2425.               Bit 1 - Is DA enabled? 
  2426.         -->
  2427.       <Script>
  2428.         $bitmap = 0
  2429.         $DAEnabled = (get-itemproperty fpc:\ContainingArray\ArrayPolicy\IPv6Settings DirectAccessEnabled).DirectAccessEnabled
  2430.         if ($DAEnabled -eq "True")    {$bitmap = $bitmap -bor 1}
  2431.         $bitmap
  2432.       </Script>
  2433.     </DataPoint>
  2434.     
  2435.     
  2436.     <DataPoint Id="183" Name="DATAID_ISPR_CURRENT_POLICY">
  2437.       <!-- Current policy of ISP Redundancy -->
  2438.       <Script>
  2439.         $path="fpc:\ContainingArray\NetworkConfiguration\Networks\External\ISPRedundancyConfig"
  2440.         $currentPolicy = (Get-itemproperty $path IspRedundancyPolicy).IspRedundancyPolicy
  2441.         $currentPolicy
  2442.       </Script>
  2443.     </DataPoint>
  2444.     
  2445.     
  2446.     <DataPoint Id="184" Name="DATAID_ENAT_RULES_COUNT">
  2447.       <!-- The number of eNAT rules -->
  2448.       <Script>
  2449.         # We identify eNAT rule by having a non-default hiding address.
  2450.         $rulesCount = 0
  2451.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\NetworkConfiguration\NetworkRules)
  2452.         {
  2453.           $addrCount = 0
  2454.           $path = "fpc:\ContainingArray\NetworkConfiguration\NetworkRules\'" + $rule.Name + "'\HidingAddresses"
  2455.           Get-ChildItem $path | foreach {$addrCount += 1}
  2456.           if ($addrCount -gt 0)
  2457.           {
  2458.             $rulesCount += 1
  2459.           }
  2460.         }
  2461.         $rulesCount
  2462.       </Script>
  2463.     </DataPoint>
  2464.     
  2465.     
  2466.     <DataPoint Id="185" Name="DATAID_ENAT_VIP_RULES_COUNT">
  2467.       <!-- Number of eNAT rules that use VIP as hiding address -->
  2468.       <Script>
  2469.         #First, Retrieving all VIPs
  2470.         $allVIPs = @()
  2471.         foreach ($network in Get-ChildItem fpc:\ContainingArray\NetworkConfiguration\Networks)
  2472.         {
  2473.           $path = "fpc:\ContainingArray\NetworkConfiguration\Networks\'" + $network.name + "'"  
  2474.           if ((get-childitem $path | where {$_.name -eq "NLBCluster"}) -ne $null)
  2475.           {
  2476.             # Add the default VIP to the list
  2477.             $allVIPs += (get-itemproperty "$path\NLBCluster" VIP).VIP
  2478.           
  2479.             # Add the additional VIPs to the list    
  2480.             get-childitem "$path\NLBCluster\AdditionalVIPs" | foreach {$allVIPs += $_.name}
  2481.           }
  2482.         }
  2483.  
  2484.         # Now count rules that have VIP as a hiding address
  2485.         $rulesCount = 0
  2486.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\NetworkConfiguration\NetworkRules)
  2487.         {
  2488.           $addrCount = 0
  2489.           $path = "fpc:\ContainingArray\NetworkConfiguration\NetworkRules\'" + $rule.Name + "'\HidingAddresses"
  2490.           Get-ChildItem $path | foreach {if ($allVIPs -contains $_.name) { $addrCount += 1}}
  2491.           if ($addrCount -gt 0)
  2492.           {
  2493.             $rulesCount += 1
  2494.           }
  2495.         }
  2496.         $rulesCount
  2497.       </Script>
  2498.     </DataPoint>
  2499.     
  2500.     
  2501.     <DataPoint Id="186" Name="DATAID_ENAT_HIDING_ADDRESSES_PER_RULE">
  2502.       <!-- Average number of hiding addresses per eNAT rule -->
  2503.       <Script>
  2504.         $addressesCount = 0
  2505.         $rulesCount = 0
  2506.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\NetworkConfiguration\NetworkRules)
  2507.         {
  2508.           $ruleAddrCount = 0
  2509.           $path = "fpc:\ContainingArray\NetworkConfiguration\NetworkRules\'" + $rule.Name + "'\HidingAddresses"
  2510.           Get-ChildItem $path | foreach {$ruleAddrCount += 1}
  2511.           if ($ruleAddrCount -gt 0)
  2512.           {
  2513.             $addressesCount += $ruleAddrCount
  2514.             $rulesCount += 1
  2515.           }
  2516.         }
  2517.         # Prevent division by 0
  2518.         if ($rulesCount -eq 0)
  2519.         {
  2520.           $average = 0
  2521.         }
  2522.         else
  2523.         {
  2524.           $average = ($addressesCount/$rulesCount)
  2525.         }
  2526.         
  2527.         ($average)
  2528.           
  2529.       </Script>
  2530.     </DataPoint>
  2531.     
  2532.     
  2533.     <DataPoint Id="187" Name="DATAID_EMAIL_POLICY_ROUTES_COUNT">
  2534.       <!-- Number of Email Policy Routes -->
  2535.       <Script>
  2536.         (get-item fpc:\ContainingArray\SmtpProtectionConfiguration\SmtpRoutes).children.length
  2537.       </Script>
  2538.     </DataPoint>
  2539.  
  2540.  
  2541.     <DataPoint Id="188" Name="DATAID_EMAIL_POLICY_SECURED_ROUTES_COUNT">
  2542.       <!-- Number of Email Policy Routes that use TLS -->
  2543.       <Script>
  2544.         $count = 0
  2545.         foreach ($smtpRoute in (Get-ChildItem fpc:\ContainingArray\SmtpProtectionConfiguration\SmtpRoutes))
  2546.         {
  2547.           # Generate the path of relevant properties
  2548.           $routeAuthPath = "fpc:\ContainingArray\SmtpProtectionConfiguration\SmtpRoutes\'" + $smtpRoute.name + "'\RouteAuthenticationSettings"
  2549.           $listenerAuthPath = "fpc:\ContainingArray\SmtpProtectionConfiguration\SmtpRoutes\'" + $smtpRoute.name + "'\ListenerAuthenticationSettings"
  2550.  
  2551.           # Get the properties
  2552.           $routeTlsEnabled = (Get-ItemProperty $routeAuthPath TlsEnabled).TlsEnabled
  2553.           $listenerTlsEnabled = (Get-ItemProperty $listenerAuthPath TlsEnabled).TlsEnabled
  2554.           
  2555.           if ($listenerTlsEnabled -eq "True" -or $routeTlsEnabled -eq "True")
  2556.           {
  2557.             $count += 1
  2558.           }
  2559.         }
  2560.         $count
  2561.       </Script>
  2562.     </DataPoint>
  2563.     
  2564.     
  2565.     <DataPoint Id="189" Name="DATAID_EMAIL_POLICY_ANTIVIRUS_ENG_COUNT">
  2566.       <!-- Number of working antivirus engines -->
  2567.       <Script>
  2568.         $engines=(get-itemproperty fpc:\ContainingArray\SmtpProtectionConfiguration\AntivirusSettings EngineSubset).EngineSubset
  2569.  
  2570.         # $engines is a bitmap of which engine is on.
  2571.         # In order to count them, just count the set bits
  2572.         $bitCount=0
  2573.         while ($engines -ne 0)
  2574.         {
  2575.           if ($engines%2 -ne 0)
  2576.           {
  2577.             $bitCount+=1
  2578.           }
  2579.           $engines = [math]::floor([int] $engines / [int] 2)
  2580.         }
  2581.  
  2582.         $bitCount
  2583.       </Script>
  2584.     </DataPoint>
  2585.     
  2586.     
  2587.     <DataPoint Id="190" Name="DATAID_EMAIL_POLICY_SCL_DIALOG_USED">
  2588.       <!-- Number of times SCL dialog was used -->
  2589.       <Script>
  2590.         $result = Get-RegValue "SclDialogUsageCounter" -ResetValue 1
  2591.         $result        
  2592.       </Script>
  2593.     </DataPoint>
  2594.     
  2595.     
  2596.     <DataPoint Id="191" Name="DATAID_DA_NAT_PT_NETWORK_RULES_COUNT">
  2597.       <!--  -->
  2598.       <Script>
  2599.         $count = 0
  2600.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\NetworkConfiguration\NetworkRules)
  2601.         {
  2602.           $path = "fpc:\ContainingArray\NetworkConfiguration\NetworkRules\'" + $rule.name + "'\NatPtPrefixes"
  2603.           if ((get-childitem $path) -ne $null)
  2604.           {
  2605.             $count += 1
  2606.           }
  2607.         }
  2608.         $count
  2609.       </Script>
  2610.     </DataPoint>
  2611.     
  2612.     
  2613.     <DataPoint Id="192" Name="DATAID_DA_NAT_PT_POLICY_RULES_COUNT">
  2614.       <!--  -->
  2615.       <Script>
  2616.         # We're looking for rules with source = Anywhere (IPv6)
  2617.         $ANYWHERE_V6_ADDRESS_RANGE_GUID = "{8565A7A1-6CBA-434d-9B60-C511192B8D02}"
  2618.  
  2619.         $count = 0
  2620.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  2621.         {
  2622.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.Name + "'\SourceSelectionIPs\AddressRanges"         
  2623.           foreach ($range in Get-ChildItem $path)
  2624.           {
  2625.             $path = $path + "\'" + $range.name + "'"
  2626.             if ((Get-ItemProperty $path Guid).Guid -eq $ANYWHERE_V6_ADDRESS_RANGE_GUID)
  2627.             {
  2628.               $count += 1
  2629.             }
  2630.           }
  2631.         }
  2632.         $count
  2633.       </Script>
  2634.     </DataPoint>
  2635.     
  2636.     
  2637.     <DataPoint Id="193" Name="DATAID_EMAIL_POLICY_SETTINGS" Operation="BitField">
  2638.       <!-- General e-mail policy settings  
  2639.               bit 1 - Is Edge subscription activated?
  2640.               bit 2 - Is Stirling controlling FSE on this host?
  2641.               bit 3 - Was the SMTP protection feature enabled?
  2642.               bit 4 - Is there any web-publishing policy rule that publishes an OWA server?
  2643.               bit 5 - Is there any server-publishing rule that publishes an SMTP server?
  2644.               bit 6 - Is any file-filter defined and active?
  2645.               bit 7 - Is any message-body-filter defined and active?
  2646.       -->
  2647.       <Script>
  2648.  
  2649.         $bitmap = 0
  2650.  
  2651.         # bit 1 - Is Edge subscription activated?
  2652.           $edgeSubscriptionEnabled = (get-itemproperty fpc:\ContainingArray\SmtpProtectionConfiguration EdgeSubscriptionEnabled).EdgeSubscriptionEnabled
  2653.           
  2654.           if ($edgeSubscriptionEnabled -eq "True")
  2655.           {
  2656.             $bitmap = $bitmap -bor 1
  2657.           }
  2658.  
  2659.         # bit 2 - Is Stirling controlling FSE on this host?
  2660.           $sasAgentStatus = (get-itemproperty fpc:\ContainingArray\SecurityAssessmentSharing SecurityAssessmentAgentStatus).SecurityAssessmentAgentStatus
  2661.           $smtpProtectionControl = (get-itemproperty fpc:\ContainingArray\SecurityAssessmentSharing SmtpProtectionControl).SmtpProtectionControl
  2662.           if (($sasAgentStatus -eq "True") -and ($smtpProtectionControl -eq "True"))
  2663.           {
  2664.             $bitmap = $bitmap -bor 2
  2665.           }
  2666.  
  2667.         # bit 3 - Was the SMTP protection feature enabled?
  2668.           $SMTPProtEnabled = (get-itemproperty fpc:\ContainingArray\SmtpProtectionConfiguration Enabled).Enabled
  2669.           if ($SMTPProtEnabled -eq "True")
  2670.           {
  2671.             $bitmap = $bitmap -bor 4
  2672.           }
  2673.  
  2674.         # bit 4 - Is there any web-publishing policy rule that publishes an OWA server?
  2675.  
  2676.           $WEB_PUBLISHING_RULE_TYPE = 2
  2677.  
  2678.           $hasOwaRule = "False"
  2679.           foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  2680.           {
  2681.             # Generate the path of relevant properties
  2682.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.Name + "'"
  2683.  
  2684.             # We're interested only in web publishing rules
  2685.             if ((get-itemproperty $path Type).Type -eq $WEB_PUBLISHING_RULE_TYPE)
  2686.             {
  2687.               $path = $path + "\WebPublishingProperties\PathMappings"
  2688.               foreach ($mapping in Get-ChildItem $path)
  2689.               {
  2690.                 if (($mapping.name -match "OWA") -or ($mapping.name -match "Exchange"))
  2691.                   {
  2692.                     $hasOwaRule = "True"
  2693.                     break
  2694.                   }
  2695.               }    
  2696.             }
  2697.           }
  2698.           if ($hasOwaRule -eq "True")
  2699.           {
  2700.             $bitmap = $bitmap -bor 8
  2701.           }
  2702.         # bit 5 - Is there any server-publishing rule that publishes an SMTP server?
  2703.           $count = 0
  2704.           foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  2705.           {
  2706.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.Name + "'"
  2707.             get-childitem -Recurse  $path | where {("SMTP Server", "SMTPS Server") -contains $_.Name} | foreach {$count += 1}
  2708.           }
  2709.           if ($count -gt 0)
  2710.           {
  2711.             $bitmap = $bitmap -bor 16
  2712.           }
  2713.           
  2714.         # bit 6 - Is any file-filter defined and active?
  2715.           $fileFiltersNum = (get-item fpc:\ContainingArray\SmtpProtectionConfiguration\AntiSpamSettings\FileFilters).children.length
  2716.           if ($fileFiltersNum -gt 0)
  2717.           {
  2718.             $bitmap = $bitmap -bor 32
  2719.           }
  2720.  
  2721.         # bit 7 - Is any message-body-filter defined and active?
  2722.           $bodyFiltersNum = (get-item fpc:\ContainingArray\SmtpProtectionConfiguration\AntiSpamSettings\MessageBodyFilters).children.length
  2723.           if ($bodyFiltersNum -gt 0)
  2724.           {
  2725.             $bitmap = $bitmap -bor 64
  2726.           }
  2727.   
  2728.         $bitmap
  2729.       </Script>
  2730.     </DataPoint>
  2731.     
  2732.     <DataPoint Id="196" Name="DATAID_ENAT_DIP_RULES_COUNT">
  2733.       <!-- Number of eNAT rules that use DIP as hiding address -->
  2734.       <Script>
  2735.         #First, Retrieving all VIPs
  2736.         $allVIPs = @()
  2737.         foreach ($network in Get-ChildItem fpc:\ContainingArray\NetworkConfiguration\Networks)
  2738.         {
  2739.           $path = "fpc:\ContainingArray\NetworkConfiguration\Networks\'" + $network.name + "'"
  2740.           if ((get-childitem $path | where {$_.name -eq "NLBCluster"}) -ne $null)
  2741.           {
  2742.             # Add the default VIP to the list
  2743.             $allVIPs += (get-itemproperty "$path\NLBCluster" VIP).VIP
  2744.           
  2745.             # Add the additional VIPs to the list    
  2746.             get-childitem "$path\NLBCluster\AdditionalVIPs" | foreach {$allVIPs += $_.name}
  2747.           }
  2748.         }
  2749.  
  2750.         # Now count rules that DON'T have VIP as a hiding address
  2751.         $rulesCount = 0
  2752.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\NetworkConfiguration\NetworkRules)
  2753.         {
  2754.           $addrCount = 0
  2755.           $vipAddrCount = 0
  2756.           $path = "fpc:\ContainingArray\NetworkConfiguration\NetworkRules\'" + $rule.Name + "'\HidingAddresses"
  2757.           Get-ChildItem $path | foreach {$addrCount += 1}
  2758.           Get-ChildItem $path | foreach {if ($allVIPs -contains $_.name) {$vipAddrCount += 1}}
  2759.           if (($addrCount -gt 0) -and ($vipAddrCount -eq 0))
  2760.           {
  2761.             $rulesCount += 1
  2762.           }
  2763.         }
  2764.         $rulesCount
  2765.       </Script>
  2766.     </DataPoint>
  2767.     
  2768.     
  2769.     <DataPoint Id="197" Name="DATAID_ISPR_GENERAL_SETTINGS" Operation="BitField">
  2770.       <!-- ISP Redundancy general settings (bitmap). 
  2771.               Bit 1 - Is ISPR enabled?                   -->
  2772.       <Script>
  2773.         
  2774.         $bitmap = 0
  2775.         
  2776.         $currentPolicy = (Get-itemproperty fpc:\ContainingArray\NetworkConfiguration\Networks\External\ISPRedundancyConfig IspRedundancyPolicy).IspRedundancyPolicy
  2777.         if ($currentPolicy -ne 0)    {$bitmap = $bitmap -bor 1}
  2778.         $bitmap
  2779.       </Script>
  2780.     </DataPoint>
  2781.     
  2782.     
  2783.       <!-- EMP -->
  2784.     <DataPoint Id="198" Name="DATAID_EMP_DEFAULT_CONTENT_DELIVERY">
  2785.       <!-- EMP Default content delivery -->
  2786.       <Script>
  2787.         $p = Get-ItemProperty "fpc:\ContainingArray\MalwareInspectionSettings\ContentDeliverySettings" DefaultContentDeliveryMethod
  2788.         $p.DefaultContentDeliveryMethod
  2789.       </Script>
  2790.     </DataPoint>
  2791.     <!-- EMS -->
  2792.     <DataPoint Id="199" Name="DATAID_EMS_NUM_OF_ENTERPRISE_POLICY_RULES">
  2793.       <!-- Number of rule origin in enterprise policy -->
  2794.       <Script>
  2795.         $prefix = Get-Resource 18613
  2796.         $count = 0
  2797.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  2798.         {
  2799.           if ($rule.Name.StartsWith($prefix))
  2800.           {
  2801.             $count++
  2802.           }
  2803.         }
  2804.         $count
  2805.       </Script>
  2806.     </DataPoint>
  2807.     <DataPoint Id="200" Name="DATAID_EMS_NUM_OF_ARRAY_POLICY_RULES">
  2808.       <!-- Number of rule origin in the array (not enterprise) -->
  2809.       <Script>
  2810.         $prefix = Get-Resource 18613
  2811.         $count = 0
  2812.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  2813.         {
  2814.           if (!$rule.Name.StartsWith($prefix))
  2815.           {
  2816.             $count++
  2817.           }
  2818.         }
  2819.         $count
  2820.       </Script>
  2821.     </DataPoint>
  2822.     <!-- GSW -->
  2823.     <DataPoint Id="201" Name="DATAID_GSW_NETWORK_TOPOLOGY">
  2824.       <!-- The network topology defined by the GSW -->
  2825.       <Script>
  2826.         $result = Get-RegValue "Chosen Network Topology" -Key "SOFTWARE\Microsoft\Fpc\Getting Started Wizard"
  2827.         $result
  2828.       </Script>
  2829.     </DataPoint>
  2830.     <!-- HTTPS Inspection -->
  2831.     <DataPoint Id="202" Name="DATAID_HTTPS_INSPECTION_SETTINGS" Operation="BitField">
  2832.       <!-- HTTPS inspection settings -->
  2833.       <Script>
  2834.         $result = 0
  2835.         $p = Get-ItemProperty "fpc:\ContainingArray\ArrayPolicy\WebProxy\OutboundHTTPSInspectionConfiguration" Enabled
  2836.         if ($p.Enabled -eq "True") { $result = 1 }
  2837.  
  2838.         # check that InspectionWithCertificateValidation == fpcHttpsInspectionCertificateValidationOnly
  2839.         $p = Get-ItemProperty "fpc:\ContainingArray\ArrayPolicy\WebProxy\OutboundHTTPSInspectionConfiguration" InspectionWithCertificateValidation
  2840.         if ($p.InspectionWithCertificateValidation -eq 1) {$result = $result -bor 2 }
  2841.  
  2842.         $p = Get-ItemProperty "fpc:\ContainingArray\ArrayPolicy\WebProxy\OutboundHTTPSInspectionConfiguration" NotifyUsers
  2843.         if ($p.NotifyUsers -eq "True") { $result = $result -bor 4 }
  2844.         $result
  2845.       </Script>
  2846.     </DataPoint>
  2847.     <!-- Reports -->
  2848.     <DataPoint Id="204" Name="DATAID_REPORTS_USAGE">
  2849.       <!-- Reports usage scenario: none, ad-hoc or continuesly -->
  2850.       <Script>
  2851.         $result = 0
  2852.         foreach ($job in Get-ChildItem fpc:\ContainingArray\Reports\ReportJobs)
  2853.         {
  2854.           $path = "fpc:\ContainingArray\Reports\ReportJobs\'" + $job.StorageName + "'"
  2855.           $p = Get-ItemProperty $path Enabled
  2856.           if ($p.Enabled -ne "True") { continue }
  2857.           
  2858.           # found active job, assuming ad-hoc
  2859.           $result = 1
  2860.           $p = Get-ItemProperty $path RecurrenceType
  2861.           if ($p.RecurrenceType -gt 0)
  2862.           {
  2863.             #found a reoccuring job
  2864.             $result = 2
  2865.             break
  2866.           }
  2867.         }
  2868.         $result
  2869.       </Script>
  2870.     </DataPoint>
  2871.     <!-- Server -->
  2872.     <DataPoint Id="205" Name="DATAID_SERVER_EDITION">
  2873.       <!--Server edition: 0x10 = SE, 0x20 = EE -->
  2874.       <Script>
  2875.         $p = Get-ItemProperty fpc:\ IsaEdition
  2876.         $p.IsaEdition
  2877.       </Script>
  2878.     </DataPoint>
  2879.     <!-- Stirling integration -->
  2880.     <DataPoint Id="206" Name="DATAID_STINRLING_INTEGRATION_SETTINGS" Operation="BitField">
  2881.       <!-- Stirling integration settings -->
  2882.       <!-- bit 1: stirling integration -->
  2883.       <!-- bit 2: FSE integration -->
  2884.       <Script>
  2885.         $result = 0
  2886.         $p = Get-ItemProperty fpc:\ContainingArray\SecurityAssessmentSharing SecurityAssessmentAgentStatus
  2887.         if ($p.SecurityAssessmentAgentStatus -eq "True") { $result = 1 }
  2888.  
  2889.         $p = Get-ItemProperty fpc:\ContainingArray\SmtpProtectionConfiguration Enabled
  2890.         if ($p.Enabled -eq "True") { $result = $result -bor 2 }
  2891.  
  2892.         $result
  2893.       </Script>
  2894.     </DataPoint>
  2895.     <!-- URL Filtering -->
  2896.     <DataPoint Id="207" Name="DATAID_URLF_SETTINGS" Operation="BitField">
  2897.       <!-- URLF Settings -->
  2898.       <!-- Bit 1: URLF enabled -->
  2899.       <Script>
  2900.         $result = 0
  2901.         $p = Get-ItemProperty fpc:\ContainingArray\ArrayPolicy\WebProxy\UrlFilteringSettings Enabled
  2902.         if ($p.Enabled -eq "True") { $result = 1 }
  2903.  
  2904.         $result
  2905.       </Script>
  2906.     </DataPoint>
  2907.     <DataPoint Id="208" Name="DATAID_URLF_NUM_OF_POLICY_RULES">
  2908.       <!-- The number of policy rules w/ URLF active -->
  2909.       <Script>
  2910.         $count = 0
  2911.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  2912.         {
  2913.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  2914.  
  2915.           $p = Get-ItemProperty $path Type
  2916.           if ($p.Type -eq 0)
  2917.           {
  2918.             # access rule
  2919.             $categoriesPath = $path + "\AccessProperties\UrlCategories"
  2920.             $categorySetsPath = $path + "\AccessProperties\UrlCategorySets"
  2921.             $p1 = Get-Item $categoriesPath
  2922.             $p2 = Get-Item $categorySetsPath
  2923.             if (($p1.Children.Length -gt 0) -or ($p2.Children.Length -gt 0))
  2924.             {
  2925.               # access rule w/ URL Categories or CategorySets
  2926.               $count++
  2927.             }
  2928.           }
  2929.         }
  2930.         $count
  2931.       </Script>
  2932.     </DataPoint>
  2933.     <DataPoint Id="209" Name="DATAID_URLD_NUM_OF_DENY_POLICY_RULES">
  2934.       <!-- The number of deny policy rules w/ URLF active -->
  2935.       <Script>
  2936.         $count = 0
  2937.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  2938.         {
  2939.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  2940.  
  2941.           $p = Get-ItemProperty $path Action
  2942.           if ($p.Action -eq 1)
  2943.           {
  2944.             # deny rule
  2945.             $p = Get-ItemProperty $path Type
  2946.             if ($p.Type -eq 0)
  2947.             {
  2948.               # access rule
  2949.               $categoriesPath = $path + "\AccessProperties\UrlCategories"
  2950.               $categorySetsPath = $path + "\AccessProperties\UrlCategorySets"
  2951.               $p1 = Get-Item $categoriesPath
  2952.               $p2 = Get-Item $categorySetsPath
  2953.               if (($p1.Children.Length -gt 0) -or ($p2.Children.Length -gt 0))
  2954.               {
  2955.                 # access rule w/ URL Categories or CategorySets
  2956.                 $count++
  2957.               }
  2958.             }
  2959.           }
  2960.         }
  2961.         $count
  2962.       </Script>
  2963.     </DataPoint>
  2964.     <!-- EMP -->
  2965.     <DataPoint Id="210" Name="DATAID_EMP_SETTINGS" Operation="BitField">
  2966.       <!-- EMP Settings -->
  2967.       <!-- Bit 1: EMP Enabled -->
  2968.       <!-- Bit 2: EMP used for HTTP -->
  2969.       <!-- Bit 3: EMP used for HTTPS -->
  2970.       <!-- Bit 4: EMP used for FTP -->
  2971.       <!-- Bit 5: Progress page enabled -->
  2972.       <!-- Bit 6: Is fast trickling enabled -->
  2973.       <Script>
  2974.         $http = 0
  2975.         $https = 0
  2976.         $ftp = 0
  2977.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  2978.         {
  2979.           if (($http -gt 0) -and ($https -gt 0) -and ($ftp -gt 0)) { break }
  2980.           
  2981.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  2982.           $empPath = $path + "\MalwareInspectionProperties"
  2983.           $scanDown = Get-ItemProperty $empPath ScanDownload
  2984.           if ($scanDown -eq "True")
  2985.           {
  2986.             $p = Get-ItemProperty $path Type
  2987.             if ($p.Type -eq 0)
  2988.             {
  2989.               # access rule
  2990.               $p = Get-ItemProperty $path ProtocolSelectionMethod
  2991.               if ($p.ProtocolSelectionMethod -ne 1) { continue } # ignore non-specific rules
  2992.               $path1 = $path + "\SpecifiedProtocols"
  2993.               foreach ($ref in Get-ChildItem $path1)
  2994.               {
  2995.                 $path2 = $path1 + "\'" + $ref.StorageName + "'"
  2996.                 foreach ($protocol in Get-ChildItem $path2)
  2997.                 {
  2998.                   if ($protocol.StorageName -eq "{df6cabc0-d4a3-11d2-bbc4-00a0c9d785a6}")
  2999.                   {
  3000.                     #found HTTP
  3001.                     $http = 1
  3002.                   }
  3003.                   elseif ($protocol.StorageName -eq "{fe3e20d0-d4a3-11d2-bbc4-00a0c9d785a6}")
  3004.                   {
  3005.                     #found HTTPS
  3006.                     $https = 1
  3007.                   }
  3008.                   elseif ($protocol.StorageName -eq "{f2e5ee50-030c-11d3-acd4-00a0c9d7559D}")
  3009.                   {
  3010.                     #found FTP
  3011.                     $ftp = 1
  3012.                   }
  3013.                 }
  3014.               }
  3015.             }
  3016.           }
  3017.         }
  3018.  
  3019.         $result = 0
  3020.         $p = Get-ItemProperty fpc:\ContainingArray\MalwareInspectionSettings Enabled
  3021.         if ($p.Enabled -eq "True") { $result = 1 }
  3022.         
  3023.         if ($http -gt 0) { $result = $result -bor 2 }
  3024.  
  3025.         if ($https -gt 0) { $result = $result -bor 4 }
  3026.  
  3027.         if ($ftp -gt 0) { $result = $result -bor 8 }
  3028.  
  3029.         $p = Get-ItemProperty fpc:\ContainingArray\MalwareInspectionSettings\ContentDeliverySettings ProgressNotificationEnabled
  3030.         if ($p.ProgressNotificationEnabled -eq "True") { $result = $result -bor 16 }
  3031.  
  3032.         $p = Get-ItemProperty fpc:\ContainingArray\MalwareInspectionSettings\ContentDeliverySettings FastTricklingEnabled
  3033.         if ($p.FastTricklingEnabled -eq "True") { $result = $result -bor 32 }
  3034.  
  3035.         $result
  3036.       </Script>
  3037.     </DataPoint>
  3038.     <!-- Subscribtion services -->
  3039.     <DataPoint Id="212" Name="DATAID_WEB_ANTIVIRUS_LICENSE_STATUS">
  3040.       <!-- URLF and EMP license status -->
  3041.       <!-- 0: expired -->
  3042.       <!-- 1: eval -->
  3043.       <!-- 2: valid -->
  3044.       <Script>
  3045.         $result = 0
  3046.         $licPath = "fpc:\ContainingArray\UpdateCenter\Licenses\'{DB9AC467-82C0-4BAC-9E35-7352B7D458E3}'"
  3047.         $p = Get-ItemProperty $licPath ExpirationDate
  3048.         $expireDate = Get-Date $p.ExpirationDate
  3049.         $today = Get-Date
  3050.         if ($today -lt $expireDate)
  3051.         {
  3052.           $evalKey = Get-Resource 19717
  3053.           $p = Get-ItemProperty $licPath Key
  3054.           if ($p.Key -eq $evalKey)
  3055.           {
  3056.             $result = 1
  3057.           }
  3058.           else
  3059.           {
  3060.             $result = 2
  3061.           }
  3062.         }
  3063.         $result
  3064.       </Script>
  3065.     </DataPoint>
  3066.     <!-- Exchange web publishing -->
  3067.     <DataPoint Id="307" Name="DATAID_WEB_PUBLISH_OWA">
  3068.       <!-- Number of policy rules which are used to publish OWA -->
  3069.       <Script>
  3070.         $result = 0
  3071.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  3072.         {
  3073.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  3074.           $p = Get-ItemProperty $path Type
  3075.           if ($p.Type -eq 2)
  3076.           {
  3077.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties\PathMappings"
  3078.             foreach ($mapping in Get-ChildItem $path)
  3079.             {
  3080.                 if ($mapping.name -match "OWA")
  3081.                 {
  3082.                     $result += 1
  3083.                     break
  3084.                 }
  3085.             }
  3086.           }
  3087.         }
  3088.         $result
  3089.       </Script>
  3090.     </DataPoint>  
  3091.     <DataPoint Id="308" Name="DATAID_WEB_PUBLISH_OMA">
  3092.       <!-- Number of policy rules which are used to publish OMA -->
  3093.       <Script>
  3094.         $result = 0
  3095.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  3096.         {
  3097.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  3098.           $p = Get-ItemProperty $path Type
  3099.           if ($p.Type -eq 2)
  3100.           {
  3101.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties\PathMappings"
  3102.             foreach ($mapping in Get-ChildItem $path)
  3103.             {
  3104.                 if ($mapping.name -match "OMA")
  3105.                 {
  3106.                     $result += 1
  3107.                     break
  3108.                 }
  3109.             }
  3110.           }
  3111.         }
  3112.         $result      
  3113.       </Script>
  3114.     </DataPoint>  
  3115.     <DataPoint Id="309" Name="DATAID_WEB_PUBLISH_ACTIVE_SYNC">
  3116.       <!-- Number of policy rules which are used to publish active sync -->
  3117.       <Script>
  3118.         $result = 0
  3119.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  3120.         {
  3121.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  3122.           $p = Get-ItemProperty $path Type
  3123.           if ($p.Type -eq 2)
  3124.           {
  3125.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties\PathMappings"
  3126.             foreach ($mapping in Get-ChildItem $path)
  3127.             {
  3128.                 if ($mapping.name -match "Microsoft-Server-ActiveSync")
  3129.                 {
  3130.                     $result += 1
  3131.                     break
  3132.                 }
  3133.             }
  3134.           }
  3135.         }
  3136.         $result      
  3137.       </Script>
  3138.     </DataPoint>  
  3139.     <DataPoint Id="336" Name="DATAID_WEB_PUBLISH_ACTIVE_SYNC_CERT">
  3140.       <!-- Number of policy rules which are used to publish active sync using a client side certificate authentication -->
  3141.       <Script>
  3142.         $result = 0
  3143.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  3144.         {
  3145.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  3146.           $p = Get-ItemProperty $path Type
  3147.           if ($p.Type -eq 2)
  3148.           {
  3149.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName  + "'\WebPublishingProperties\WebListenerUsed"
  3150.             $listenerStorageName = Get-ItemProperty $path Guid
  3151.             $path = "fpc:\ContainingArray\RuleElements\WebListeners\'" + $listenerStorageName.Guid + "'\Properties"
  3152.             $listenerClientCertificate = Get-ItemProperty $path SSLCertificateAuthentication
  3153.             
  3154.             if ($listenerClientCertificate.SSLCertificateAuthentication -eq "False") { continue }
  3155.             
  3156.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.Name + "'\WebPublishingProperties\PathMappings"
  3157.             foreach ($mapping in Get-ChildItem $path)
  3158.             {
  3159.                 if ($mapping.name -match "Microsoft-Server-ActiveSync")
  3160.                 {
  3161.                     $result += 1
  3162.                     break
  3163.                 }
  3164.             }
  3165.           }
  3166.         }
  3167.         $result          
  3168.       </Script>
  3169.     </DataPoint>     
  3170.     <DataPoint Id="310" Name="DATAID_WEB_PUBLISH_RPC_OVER_HTTP">
  3171.       <!-- Number of policy rules which are used to publish RPC over HTTP -->
  3172.       <Script>
  3173.         $result = 0
  3174.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  3175.         {
  3176.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  3177.           $p = Get-ItemProperty $path Type
  3178.           if ($p.Type -eq 2)
  3179.           {
  3180.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties\PathMappings"
  3181.             foreach ($mapping in Get-ChildItem $path)
  3182.             {
  3183.                 if ($mapping.name -match "rpc")
  3184.                 {
  3185.                     $result += 1
  3186.                     break
  3187.                 }
  3188.             }
  3189.           }
  3190.         }
  3191.         $result          
  3192.       </Script>
  3193.     </DataPoint>  
  3194.     <!-- Sharepoint web publishing -->
  3195.     <DataPoint Id="311" Name="DATAID_WEB_PUBLISH_SHAREPOINT">
  3196.  
  3197.       <!-- Number of policy rules which are used to publish sharepoint -->
  3198.       <Script>
  3199.         $result = 0
  3200.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  3201.         {
  3202.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  3203.           $p = Get-ItemProperty $path Type
  3204.           if ($p.Type -eq 2)
  3205.           {
  3206.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  3207.             $loggOffUrl = Get-ItemProperty $path LogoffURL
  3208.             if ($loggOffUrl -match "/_layouts/SignOut.aspx")
  3209.             {
  3210.                 $result += 1
  3211.                 continue
  3212.             }
  3213.             
  3214.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties\PathMappings"
  3215.             foreach ($mapping in Get-ChildItem $path)
  3216.             {
  3217.                 if (($mapping.name -match "/_layouts/") -or 
  3218.                     ($mapping.name -match "/_vti_bin/") -or 
  3219.                     ($mapping.name -match "/_upresources/") -or 
  3220.                     ($mapping.name -match "/_vti_inf.html/")) 
  3221.                 {
  3222.                     $result += 1
  3223.                     break
  3224.                 }
  3225.             }
  3226.           }
  3227.         }
  3228.         $result          
  3229.       </Script>
  3230.     </DataPoint>  
  3231.     
  3232.     
  3233.     <!-- Web publishing authentication delegation -->
  3234.     <DataPoint Id="329" Name="DATAID_WEB_PUBLISHING_NO_DELEGATION_NO_AUTH"> 
  3235.       <!-- The number of web publishing rules with no delegation preventing any authentication-->
  3236.       <Script>
  3237.         $result = 0
  3238.  
  3239.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  3240.         {
  3241.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  3242.           $p = Get-ItemProperty $path Type
  3243.           if ($p.Type -eq 2)
  3244.           {
  3245.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  3246.             $p = Get-ItemProperty $path CredentialsDelegationType
  3247.             if ($p.CredentialsDelegationType -eq 1) { $result += 1 }
  3248.           }
  3249.         }
  3250.  
  3251.         $result
  3252.       </Script>
  3253.     </DataPoint>          
  3254.     <DataPoint Id="330" Name="DATAID_WEB_PUBLISHING_DELEGATION_NO"> 
  3255.       <!-- The number of web publishing rules with no delegation - passthrough authentication -->
  3256.       <Script>
  3257.         $result = 0
  3258.  
  3259.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  3260.         {
  3261.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  3262.           $p = Get-ItemProperty $path Type
  3263.           if ($p.Type -eq 2)
  3264.           {
  3265.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  3266.             $p = Get-ItemProperty $path CredentialsDelegationType
  3267.             if ($p.CredentialsDelegationType -eq 0) { $result += 1 }
  3268.           }
  3269.         }
  3270.  
  3271.         $result
  3272.       </Script>
  3273.     </DataPoint>          
  3274.     <DataPoint Id="331" Name="DATAID_WEB_PUBLISHING_DELEGATION_BASIC"> 
  3275.       <!-- The number of web publishing rules with basic delegation -->
  3276.       <Script>
  3277.         $result = 0
  3278.  
  3279.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  3280.         {
  3281.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  3282.           $p = Get-ItemProperty $path Type
  3283.           if ($p.Type -eq 2)
  3284.           {
  3285.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  3286.             $p = Get-ItemProperty $path CredentialsDelegationType
  3287.             if ($p.CredentialsDelegationType -eq 3) { $result += 1 }
  3288.           }
  3289.         }
  3290.  
  3291.         $result
  3292.       </Script>
  3293.     </DataPoint>          
  3294.     <DataPoint Id="332" Name="DATAID_WEB_PUBLISHING_DELEGATION_NTLM"> 
  3295.       <!-- The number of web publishing rules with NTLM delegation -->
  3296.       <Script>
  3297.         $result = 0
  3298.  
  3299.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  3300.         {
  3301.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  3302.           $p = Get-ItemProperty $path Type
  3303.           if ($p.Type -eq 2)
  3304.           {
  3305.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  3306.             $p = Get-ItemProperty $path CredentialsDelegationType
  3307.             if ($p.CredentialsDelegationType -eq 4) { $result += 1 }
  3308.           }
  3309.         }
  3310.  
  3311.         $result
  3312.       </Script>
  3313.     </DataPoint>          
  3314.     <DataPoint Id="333" Name="DATAID_WEB_PUBLISHING_DELEGATION_NEGOTIATE"> 
  3315.       <!-- The number of web publishing rules with negotiate delegation -->
  3316.       <Script>
  3317.         $result = 0
  3318.  
  3319.         foreach ($rule in Get-ChildItem fpc:\ContainingArray\ArrayPolicy\PolicyRules)
  3320.         {
  3321.           $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'"
  3322.           $p = Get-ItemProperty $path Type
  3323.           if ($p.Type -eq 2)
  3324.           {
  3325.             $path = "fpc:\ContainingArray\ArrayPolicy\PolicyRules\'" + $rule.StorageName + "'\WebPublishingProperties"
  3326.             $p = Get-ItemProperty $path CredentialsDelegationType
  3327.             if ($p.CredentialsDelegationType -eq 5) { $result += 1 }
  3328.           }
  3329.         }
  3330.  
  3331.         $result
  3332.       </Script>
  3333.     </DataPoint>          
  3334.   </DataPoints>
  3335. </fpcsqm:Configuration>
  3336.