【发布时间】:2014-05-05 23:36:24
【问题描述】:
我需要远程添加一个应用程序池,我正在尝试使用以下内容:
$script = {
Import-Module WebAdministration;
New-Item IIS:\AppPools\$IRTPoolName;
}
Invoke-Command -ComputerName $targetName -ScriptBlock $script -credential $cred -UseSSL
问题是,一旦我运行它,我会得到一个提示:type:
我在身份验证方面没有任何问题,我可以调用其他命令,例如简单的目录,但不是那个。有什么想法吗?
【问题讨论】:
标签: powershell invoke-command import-module web-administration