Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.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
Powershell将Bitlocker状态写入文本文件_Shell_Encryption_Text_Cmd_Powershell 3.0 - Fatal编程技术网

Powershell将Bitlocker状态写入文本文件

Powershell将Bitlocker状态写入文本文件,shell,encryption,text,cmd,powershell-3.0,Shell,Encryption,Text,Cmd,Powershell 3.0,我试图通过调用cmd shell,通过powershell将bitlocker状态写入文本文件,但似乎不起作用。有什么想法吗 这是我到目前为止所做的尝试 #doesn't work cmd /c manage-bde.txt>c:\bitlockerstatus.txt # makes an empty file $oProcess = Start-Process cmd.exe -ArgumentList "manage-bde>c:\bitlo

我试图通过调用cmd shell,通过powershell将bitlocker状态写入文本文件,但似乎不起作用。有什么想法吗

这是我到目前为止所做的尝试

    #doesn't work
    cmd /c manage-bde.txt>c:\bitlockerstatus.txt


    # makes an empty file
    $oProcess = Start-Process cmd.exe -ArgumentList "manage-bde>c:\bitlockerstatus.txt" -wait -NoNewWindow -PassThru
    $oProcess.HasExited
    $oProcess.ExitCode

   #doesn't work
   [Diagnostics.Process]::Start("cmd.exe","/c manage-bde>c:\bitlockerstatus.txt")

为什么不使用
&
操作符直接从powershell调用exe

 & manage-bde.exe -status > c:\temp\bl.txt