我想知道是否有可能使用C#应用程序列出和检索连接的网络上的所有IIS实例。
我知道有可能恢复SqlServer的所有实例
EnumAvailableSqlServers method in the SMO
但是我不知道对于IIS是否存在类似的方法。我已经尝试在Internet上搜索,但是找不到答案。
非常感谢 。
Get-Service IIS* -computer ... #(all computers in the domain or on the network)
虽然这是powershell,但是您可以从C#执行它:在这里:使用命令行参数从C#执行PowerShell脚本,或者在这里:从C#调用powershell cmdlet
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句