Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
运行Get Childitem的IIS webadministration模块中出现问题_Iis_Powershell - Fatal编程技术网

运行Get Childitem的IIS webadministration模块中出现问题

运行Get Childitem的IIS webadministration模块中出现问题,iis,powershell,Iis,Powershell,我有个奇怪的问题。我有一台机器运行IIS,PowerShell 3.0,并加载了webadministration模块 我可以访问IIS:因此我知道模块正在加载,但当我将cd放入/Sites并尝试获取ChildItem时,我会收到一个错误。同样与Get网站 这里是错误 format-default : Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) + CategoryInfo

我有个奇怪的问题。我有一台机器运行IIS,PowerShell 3.0,并加载了webadministration模块

我可以访问IIS:因此我知道模块正在加载,但当我将cd放入/Sites并尝试获取ChildItem时,我会收到一个错误。同样与Get网站

这里是错误

format-default : Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
+ CategoryInfo          : NotSpecified: (:) [format-default], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.PowerShell.Commands.FormatDefaultCommand

我在网上看到的是,你需要全面运行32位(我是)。有什么想法吗?

事实证明服务器上没有安装,这是webadministration模块所要求的。

我不知道32位与64位的区别,但您的执行策略是什么(您可以使用
获取执行策略
进行检查,然后使用
设置执行策略
进行设置)?如果是
受限的
,则WebAdministration模块将无法成功加载,并且在加载WebAdministration模块时,您可能会看到一条错误消息。尝试启动新的powershell windows,确保执行策略是
RemoteSigned
(我认为这是最严格的策略)或更宽松,然后导入webadministration模块。这有什么区别吗?它被设置为受限,我已经设置为非受限,但仍然没有。我自己解决了这个问题。未在计算机上安装,因为它仅用于FTP。Web管理模块需要WAS。