Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Erstellt eine SSL-Bindung (Secure Sockets Layer).
Syntax
oWebAdmin.Get("SSLBinding").Create(
IPAddress,
Port,
CertificateHash,
StoreName
);
oWebAdmin.Get("SSLBinding").Create
IPAddress,
Port,
CertificateHash,
StoreName
Parameter
| Name | Beschreibung |
|---|---|
CertificateHash |
Ein string Wert, der den Zertifikathash für die SSL-Bindung angibt. |
IPAddress |
Ein string Wert, der die IP-Adresse für die SSL-Bindung angibt. |
Port |
Ein uint32 Wert, der die Portnummer für die SSL-Bindung angibt. |
StoreName |
Ein string Wert, der den Namen des Zertifikatspeichers für die SSL-Bindung angibt. |
Rückgabewert
Diese Methode gibt keinen Wert zurück.
Hinweise
Das folgende Skript zeigt die verschiedenen Formate, die Sie für den IPAddress Parameter verwenden können:
' This is the standard format for a specific IP address.
oWebAdmin.Get("SSLBinding").Create "172.30.190.122", 443, "fbbca460988a482227ec71122177045e47f9f2ff", "MyStoreName"
' Each of the following formats is an acceptable way to create a secure binding
' to port 443 on all IP addresses.
oWebAdmin.Get("SSLBinding").Create "*", 443, "fbbca460988a482227ec71122177045e47f9f2ff", "MyStoreName"
oWebAdmin.Get("SSLBinding").Create "0.0.0.0", 443, "fbbca460988a482227ec71122177045e47f9f2ff", "MyStoreName"
oWebAdmin.Get("SSLBinding").Create "", 443, "fbbca460988a482227ec71122177045e47f9f2ff", "MyStoreName"
Beispiel
Im folgenden Beispiel wird eine sichere Bindung erstellt und einer Website hinzugefügt.
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
' Create the secure binding.
oWebAdmin.Get("SSLBinding").Create "*", 443, "fbbca460988a482227ec71122177045e47f9f2ff", "MyStoreName"
' Create a new binding element.
Set oBinding = oWebAdmin.Get("BindingElement").SpawnInstance_
oBinding.BindingInformation = "*:443:"
oBinding.Protocol = "https"
' Get the default Web site.
Set oSite = oWebAdmin.Get("Site.Name='Default Web Site'")
' Increase the size of the array in the site's Bindings property.
arrBindings = oSite.Bindings
ReDim Preserve arrBindings(UBound(arrBindings) + 1)
' Add the new binding to the array.
Set arrBindings(UBound(arrBindings)) = oBinding
' Assign the array to the Site.Bindings property.
oSite.Bindings = arrBindings
Set oPath = oSite.Put_
Anforderungen
| type | Beschreibung |
|---|---|
| Client | - IIS 7.0 unter Windows Vista. - IIS 7.5 unter Windows 7 - IIS 8.0 unter Windows 8 - IIS 10.0 unter Windows 10 |
| Server | - IIS 7.0 unter Windows Server 2008 - IIS 7.5 unter Windows Server 2008 R2 - IIS 8.0 auf Windows Server 2012 - IIS 8.5 unter Windows Server 2012 R2 - IIS 10.0 auf Windows Server 2016 |
| Produkt | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
| MOF-Datei | WebAdministration.mof |