Did you follow the suggestion in the "WARNING:" message?
If you want to load this module into PowerShell please use 'Import-Module -SkipEditionCheck' syntax.
Deserialized objects don't have methods. They're text-only.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Try to use PowerShell script to bind a new certificate, but AddSslCertificate failed. Can you help?
Import-Module WebAdministration
$bindings = Get-WebBinding
Write-Host $bindings
Get-WebBinding |
Foreach-Object {
$_.AddSslCertificate($newCert.Thumbprint,'My')
}
Got the following output with warning and error:
WARNING: Module WebAdministration is loaded in Windows PowerShell using WinPSCompatSession remoting session; please note that all input and output of commands from this module will be deserialized objects. If you want to load this module into PowerShell please use 'Import-Module -SkipEditionCheck' syntax.
https *:443:tax-direct-dc-test.aka.amazon.com sslFlags=1 https *:443:tax-direct-le-test.aka.amazon.com sslFlags=1 https *:443:tax-direct-wf-test.aka.amazon.com sslFlags=1
Line |
26 | Foreach-Object {
| ~~~~~~~~~~~~~~~~
| Method invocation failed because
| [Deserialized.Microsoft.IIs.PowerShell.Framework.ConfigurationElement#bindings#binding] does not contain a
| method named 'AddSslCertificate'.
Did you follow the suggestion in the "WARNING:" message?
If you want to load this module into PowerShell please use 'Import-Module -SkipEditionCheck' syntax.
Deserialized objects don't have methods. They're text-only.