【问题标题】:PowerShell IISAdministration 1.1.0.0 Missing CommandsPowerShell IISAdministration 1.1.0.0 缺少命令
【发布时间】: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


    【解决方案1】:

    IISAdministration IIS 10.0 之前不支持 PowerShell Cmdlet

    请检查您的 iis 版本。

    【讨论】:

    • 如上所述,我在 Windows Server 2016 上运行 IIS 10,服务器上安装的 IIS 版本不会影响模块中可用的命令,是吗?
    • 使用这个命令Get-Command -Module 'IISAdministration',然后检查这个模块是否包含Remove-IISSiteBinding和New-IISSiteBinding。
    猜你喜欢
    • 2016-06-12
    • 1970-01-01
    • 2016-07-04
    • 2013-07-11
    • 2015-04-17
    • 1970-01-01
    • 2016-01-20
    • 2016-10-28
    • 2019-01-12
    相关资源
    最近更新 更多