Cansado da linha de comando para ver. Isso mostra status, progresso, tempo estimado para conclusão. Para sair, ctrl-c ou pára quando convertido
# 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