15

Booted into the Windows 8 recovery menu to see if I could decrypt my secondary HDD with the recovery tools. Found that I can do it in the dos prompt there after unlocking the drive.

However, after typing this:

X:\>manage-bde -off C:

The output can be found below. There is NO indication of how long its going to take:

BitLocker Drive Encryption: Configuration Tool version 6.2.9200
Copyright (C) 2012 Microsoft Corporation. All rights reserved.

Decryption is now in progress.

X:\Sources>

Did I miscalculate? Should it be showing me the decryption progress? Or is this expected and should I go back to bed and do it's thing until tomorrow (it's an SSD)?

1

3 Answers 3

18

The answer is "it is expected." From a command prompt run as admin, use the following to check the status of the decryption:

manage-bde -status C:

Booyah! You should see the following output:

BitLocker Drive Encryption: Configuration Tool version 6.2.9200
Copyright (C) 2012 Microsoft Corporation. All rights reserved.

Volume C: [Windows 8.1 Pro]
[Data Volume]

  Size:                         238.47 GB
  ... Edit: There is more below including decryption status, too much to type ...

Source: Technet on manage-bde command line tool

1
  • But this answer doesn't tell you how do you know when the decryption is complete.
    – wisbucky
    Commented Jan 2, 2022 at 23:46
3

Got tired of command line bumping to see. This shows status, progress, estimated time to complete. To exit, ctrl-c or it stops when converted

# Author - Jack D. Pond
# license: Available under the Creative Commons Attribution-ShareAlike License  additional terms may apply.
# Description: DecryptRemainingStatus   
# 
#    1. Escalates to administrator (if not already)
#    2 Uses the "Write-Progress" to create a bar and provide some status
#       information (as well as anticipated length based on current) for
#       decryption status
#
# NOTE:  You need executable status for powershell scripts.  If you get an error:
# If you downloaded this, you need to unblock the script
# See what your current execution ability is:
#   Get-ExecutionPolicy
# Set it to something reasonable (temporarily)
#   Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
# Don't forget to reset it to whatever it was before (In this case, Restricted) after your run the script
#  Set-ExecutionPolicy -ExecutionPolicy Restricted
# 
# @Params
# 
# -seconds [number of seconds in each monitor interval, defaults to 5]
#
# @example:
#
# PS>.\DecryptRemainingStatus.ps1 -Seconds 10
#
# Get "Seconds" param
#
[CmdletBinding()]param(
    [int]$Seconds = 5
)
# Set-PSDebug -Trace 1

#elevate to "Administrator" (Required for manage-bde)
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{  
    $arguments = "& '" + $myinvocation.mycommand.definition + "'" + " -Seconds $Seconds"
    Start-Process powershell -Verb runAs  -ArgumentList $arguments 
    Break
}
[int] $millisecs = ($Seconds -as[int])*1000
[decimal] $xval = 100
[int] $intervals = 0
$xtext = (((manage-bde -status C: | findstr "Encrypted").trim()) -split '\s+')[2]
[decimal] $startval = ($xtext.substring(0,$xtext.Length - 1) -as[decimal])
while ($xval -gt 0) {
    $xtext = (((manage-bde -status C: | findstr "Encrypted").trim()) -split '\s+')[2]
    $xval = ($xtext.substring(0,$xtext.Length - 1) -as[decimal])
    [decimal] $completed = ($startval-$xval)
    [timespan] $elapsed = New-TimeSpan -Seconds ($intervals*$millisecs/1000)
    [decimal] $secsleft = If ($startval -gt $xval) {($intervals/($completed)*$xval)*($millisecs/1000)} Else {-1}
    Write-Progress -Activity "Remaining Encrypted: $xtext Elapsed: $elapsed Completed: %$completed)" -PercentComplete (100-$xval) -status "Decrypting" -SecondsRemaining $secsleft
    Start-Sleep -Milliseconds $millisecs
    $intervals += 1
}
echo "Decryption Finished"
pause
0
0

Put this in a bat file and run it. Leave it running in a command terminal.

@echo off
SET /A"timer=0"
manage-bde -status G: |findstr Percentage >initial.txt
:while
cls
manage-bde -status G: |findstr Percentage
SET /A "timer=timer+1"
SET /A "mins=timer/60"
echo %timer% seconds ( in minutes: %mins% ) passed. Counting since: 
type initial.txt
ping 127.0.0.1 -n 2 > nul
goto :while
del initial.txt

This will show you when you have started to count seconds you will wait for 20 minutes or so and see how many % has it progressed. With simple math you will get what you want. Terminal Output

I have kept the code simple on purpose.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .