麻烦在Powershell中运行bcdedit [英] Trouble running bcdedit in Powershell

查看:473
本文介绍了麻烦在Powershell中运行bcdedit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好


我在PowerShell中运行BcdEdit时遇到问题。我正在从管理shell运行命令,并且PolicyExecution设置为不受限制。


我正在尝试的简单行是


" bededit" / enum


我得到了回复


bededit:术语'bededit'未被识别为cmdlet的名称,

函数,脚本文件或可操作程序。检查名称的拼写,或者如果包含路径,则为
,验证路径是否正确,然后重试。

在行:1 char:1

+ bededit / enum

+ ~~~~~~~

    + CategoryInfo         :ObjectNotFound :( bededit:String)[],CommandNotF

    oundException

    + FullyQualifiedErrorId:CommandNotFoundException



我已经尝试指定bcdedit的完整路径并收到消息


在行:1字符:36

+" c:\windows\system32 \ bcdedit.exe" / enum

+                                   〜
$
您必须在'/'运算符的右侧提供一个值表达式。

行:1 char:36

+" c:\ windows \ system32 \ bcdedit.exe" / enum

+                                    ~~~~

表达式或陈述中出现意外的令牌"枚举"。

    + CategoryInfo         :ParserError:(:) [],ParentContainsErrorRecordEx

    ception

    + FullyQualifiedErrorId:ExpectedValueExpression



谁能告诉我我做错了什么?


谢谢


Mr_P



 

解决方案

看起来像拼写错误


这个词'bededit'不被识别为cmdlet的名称,


它应该是BCDEDIT。


< pre class ="prettyprint"style =""> BCDEDIT / Enum (无需引号)

BCDEDIT /?


让我知道是否有效


Hi

I'm having trouble running BcdEdit in powershell. I'm running the commands from an administrative shell and PolicyExecution is set to unrestricted.

The simple line I'm experimenting with is

"bededit" /enum

To which I get the reply

bededit : The term 'bededit' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ bededit /enum
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (bededit:String) [], CommandNotF
   oundException
    + FullyQualifiedErrorId : CommandNotFoundException

I have tried specifying the full path of bcdedit and i get the message

At line:1 char:36
+ "c:\windows\system32\bcdedit.exe" /enum
+                                    ~
You must provide a value expression on the right-hand side of the '/' operator.
At line:1 char:36
+ "c:\windows\system32\bcdedit.exe" /enum
+                                    ~~~~
Unexpected token 'enum' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordEx
   ception
    + FullyQualifiedErrorId : ExpectedValueExpression

Can anyone tell me what I'm doing wrong?

Thanks

Mr_P

The 

解决方案

Looks like typo

The term 'bededit' is not recognized as the name of a cmdlet,

It should be BCDEDIT.

BCDEDIT /Enum     (No Quotes required)

BCDEDIT /?

Let me know if that works


这篇关于麻烦在Powershell中运行bcdedit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆