Powershell - new-webbinding cmdlet not working when called via web interface

时光总嘲笑我的痴心妄想 提交于 2020-01-16 09:40:53

问题


This is a follow-up to a previous problem using a web interface for Powershell in combination with IIS commands : new-website cmdlet not working when called via web interface - that problem was fixed.

Unfortunately, when trying to add a binding to a site, the 'New-Webbinding' cmdlet fails because it cannot find the site just created via this interface (which I used to call a PS script that executes 'new-website')
error : New-WebBinding : Cannot find path 'IIS:\Sites\qlink_jan13d' because it does not exist.
However, when I do : dir iis:\sites in the PowerShell cli, the site is listed. It also shows up in IIS manager.
Also, the new-webbinding command works fine when I do it from the CLI..

Wondering if someone can get this to work via a web interface..

Check http://devinfra-us.blogspot.com/2011/02/using-powershell-20-from-aspnet-part-1.html to see how to create a web interface for Powershell

来源:https://stackoverflow.com/questions/59749805/powershell-new-webbinding-cmdlet-not-working-when-called-via-web-interface

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!