I'm trying to delete a network bridge if present on a computer. The
following script was intended to disable sharing and delete the network
bridge, but only the former works correctly. I've included excerpts
from the script below. Any help (new approaches, fixes to this one,
etc.) would be appreciated. The portion that is commented is the
commands that produce the error.

Error: Object required

--Begin Script--
Dim objShare
Dim objEveryColl
Dim objNetConn

Set objShare = Wscript.CreateObject("HNetCfg.HNetShare.1")
If(IsObject(objShare) = True ) then
Set objEveryColl = objShare.EnumEveryConnection
If (IsObject(objEveryColl) = TRUE) then
For Each objNetConn in objEveryColl
Dim objShareCfg
Set objShareCfg =
objShare.INetSharingConfigurationForINetConnection(objNetConn)
If (IsObject(objShareCfg) = TRUE) then
If objShareCfg.SharingEnabled Then
objShareCfg.DisableSharing
End If
Dim objNCProps
Set objNCProps = objShare.NetConnectionProps(objNetConn)
If (IsObject(objNCProps) = TRUE) then
If objNCProps.MediaType = 7 Then
wscript.echo objNCProps.Name
'objNetConn.Disconnect
'objNetConn.Delete
End If
End If
End If
Next

End If
End IF