If WScript.Arguments.Count > 1 Then
WScript.Echo "Usage:" & vbCRLF & _
" ConfigureHTTPSiInclusionList <DomainNameSetName> - add DomainNameSet to HTTPS Inspection inclusion list" & vbCRLF & _
" ConfigureHTTPSiInclusionList - remove DomainnameSet VPS" & vbCRLF
WScript.Quit(1)
End If
GUID = "{da361caa-f5ed-461a-ac23-13a02eec9867}"
Attribute = "InclusionDomainNameSetGUID"
Set Arr = CreateObject("FPC.Root").GetContainingArray()
Set VendorSets = Arr.ArrayPolicy.WebProxy.OutboundHTTPSInspectionConfiguration.VendorParametersSets
On Error Resume Next
if WScript.Arguments.Count > 0 Then
DomainNameSetName = WScript.Arguments(0)
Set DomainNameSet = Arr.RuleElements.DomainNameSets.Item(DomainNameSetName)
If Err.Number <> 0 Then
WScript.Echo "DomainNameSet " & DomainNameSetName & " does not exist"
WScript.Quit(1)
End If
End If
Set VendorSet = VendorSets.Item( GUID)
If Err.Number <> 0 Then
Err.Clear
Set VendorSet = VendorSets.Add( GUID )
CheckError
WScript.Echo "No existing VendorSet."
Else
WScript.Echo "Existing VendorSet found. Values in it:"
for each name in VendorSet.allNames
WScript.Echo " ", name, "=", VendorSet.Value(name)
next
WScript.Echo "-------------------------------------"
End If
If WScript.Arguments.Count > 0 Then
Val = DomainNameSet.PersistentName
WScript.Echo "Setting ", Attribute, " = ", Val
VendorSet.Value(Attribute) = Val
Else
WScript.Echo "Deleting", Attribute
VendorSet.RemoveValue(Attribute)
End If
Arr.Save
Sub CheckError()
If Err.Number <> 0 Then
WScript.Echo "An error occurred: 0x" & Hex(Err.Number) & " " & Err.Description
Err.Clear
End If
End Sub