【发布时间】:2020-11-19 23:27:24
【问题描述】:
我正在尝试使用 1.1.0.0 版本的 IISAdministration PowerShell 模块。我已经安装并在我当前的会话中。但是,未列出 1.1.0.0 中新增的两种方法(Remove-IISSiteBinding 和 New-IISSiteBinding),当我尝试调用它们时,我得到“该术语未被识别为 cmdlet 的名称...... ' .有人可以指出我可能做错了什么。以下是我所看到的。
服务器 2016,Powershell 5.1
当我打开一个全新的会话并运行时:
import-module -Name IISAdministration -RequiredVersion 1.1.0.0
$mod = Get-Module -Name IISAdministration
$mod.Version
$mod.ExportedCmdlets | Format-Table
我明白了:
Major Minor Build Revision
----- ----- ----- --------
1 1 0 0
Key Value
--- -----
Clear-IISCentralCertProvider Clear-IISCentralCertProvider
Clear-IISConfigCollection Clear-IISConfigCollection
Disable-IISCentralCertProvider Disable-IISCentralCertProvider
Disable-IISSharedConfig Disable-IISSharedConfig
Enable-IISCentralCertProvider Enable-IISCentralCertProvider
Enable-IISSharedConfig Enable-IISSharedConfig
Export-IISConfiguration Export-IISConfiguration
Get-IISAppPool Get-IISAppPool
Get-IISCentralCertProvider Get-IISCentralCertProvider
Get-IISConfigAttributeValue Get-IISConfigAttributeValue
Get-IISConfigCollection Get-IISConfigCollection
Get-IISConfigCollectionElement Get-IISConfigCollectionElement
Get-IISConfigElement Get-IISConfigElement
Get-IISConfigSection Get-IISConfigSection
Get-IISServerManager Get-IISServerManager
Get-IISSharedConfig Get-IISSharedConfig
Get-IISSite Get-IISSite
New-IISConfigCollectionElement New-IISConfigCollectionElement
New-IISSite New-IISSite
Remove-IISConfigAttribute Remove-IISConfigAttribute
Remove-IISConfigCollectionElement Remove-IISConfigCollectionElement
Remove-IISConfigElement Remove-IISConfigElement
Remove-IISSite Remove-IISSite
Reset-IISServerManager Reset-IISServerManager
Set-IISCentralCertProvider Set-IISCentralCertProvider
Set-IISCentralCertProviderCredential Set-IISCentralCertProviderCredential
Set-IISConfigAttributeValue Set-IISConfigAttributeValue
Start-IISCommitDelay Start-IISCommitDelay
Start-IISSite Start-IISSite
Stop-IISCommitDelay Stop-IISCommitDelay
Stop-IISSite Stop-IISSite
【问题讨论】:
标签: powershell iis