Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Web Server » Create a web page to visualize the output of BitLocker Recovery

Create a web page to visualize the output of BitLocker Recovery

Posted on 27/08/202406/11/2024 Christian By Christian No Comments on Create a web page to visualize the output of BitLocker Recovery
BitLocker result virtualization

In this article, we will create a web page to visualize the output of BitLocker Recovery. This sample web page creation assumes you already have your scripts saved. We will be utilizing the Virtual Studio Code which is a  a powerful and versatile code editor. Please see how to ​​​​​Install HTML Web Client for Microsoft RDS, How to Migrate Azure Web Apps, and “RDS client access licenses: How to install a new Per User Remote Desktop Services license“.

Visual Studio Code provides some basic support for HTML programming out of the box. With the syntax highlighting, smart completions with IntelliSense, and customizable formatting. VS Code also includes great Emmet support. Install as many extensions that you think are relevant to you.

This approach assumes that all images and scripts are in the root directory as you index filesand we will be using HTML for this. In this report, we do not care about Cascading Style Sheets (CSS) as I do not care about enhancing the style of the BitLocker status web page, and and JavaScript.

Also, see how to “Disable Developer Tools in Microsoft Edge using Registry or Group Policy in Windows‘, how to Query and display Windows information via WMI Explorer, and Query and display Windows information via WMI Explorer.

What is HTML?

HyperText Markup Language (HTML) is the standard markup language used to create and design web pages. It defines the structure and content of a web page by using a series of elements and tags.

HTML consists of elements which include text, images, links, and other multimedia content, which are interpreted by web browsers to display the page to users as we will see very shortly. That is, it instructs the browser how to display the content

Note: HTML elements label pieces of content such as “this is a heading”, “this is a paragraph”, “this is a link”, etc.

Here is a similar example: Visualize MBAM Recovery Audit Report with Python. You may want to see How to create Bitbucket Repository, and how to Fix unable to start the Application Identity Service.

Install Visual Studio Code Extensions

As described above, I will be utilizing Virtual Studio Code as my text editor/integrated development environment (IDE) due to its basic support for HTML programming out of the box.

Please see Python Automation in Windows with Visual Studio Code, How to Deploy Azure Resources Using Azure Bicep, and how to Deploy a Static Website to Azure Storage from VSCode.

I will proceed and have some of these “VSCode Extention” installed. HTML CSS Support (not needed for this article though etc.), HTML Format.

Install-HTML-Support

I have gone ahead to install some extensions that I need as shown below. You can learn more from HTML in Visual Studio Code.

image-18

With HTML, you can create your own Website. If you wish to learn more about HTML please see this link. Also, if you do not have the environment to learn or run your code, you could also use this link.

run-html-code-on-w3school

HTML Terms Explained

All HTML documents must start with a document type declaration: <!DOCTYPE html>. The document itself begins with <html> and ends with </html>. The visible part of the HTML document is between <body> and </body>.

  • The <!DOCTYPE html> declaration defines that this document is an HTML5 document
  • The <html> element is the root element of an HTML page
  • The <head> element contains meta information about the HTML page. HTML headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading: 
  • The <title> element specifies a title for the HTML page (which is shown in the browser’s title bar or in the page’s tab)
  • The <body> element defines the document’s body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
  • The <h1> element defines a large heading
  • The <p> element defines a paragraph

Below is a visualization of an HTML page structure 

HTML-Page-struture
Src: w3schools

Note: You can use either .htm or .html as file extension. There is no difference; it is up to you. That is, an HTML element is defined by a start tag, some content, and an end tag. In a nutshell, an HTML tag is everything enclosed from the start tag to the end tag.

Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag!

HyperText Markup Language code for displaying reports

Below is a very simple HTML code. This code includes the basic HTML structure, the title, header, and a pre-tag for displaying the output of the text file.

<!DOCTYPE html>
<html>
<head>
    <title>Recovery Audit Report</title>
</head>
<body>
    <h1>Enter a new report (1) heading here</h1>
    <p>place your policy text here <a href="place your link here">topic Policy</a>
    <h2>Enter a new report (2) heading here</h2>
    <p>place your policy text here</p>
    <ul>
        <li><a href="your.txt file here">description of your txt</a></li>
    <h2>Enter a new report (3) heading here</h2>
    <ul>
        <li><a href="Device-Recovering-rate-in-the-last-two-weeks.txt">Recovery in the last 2 weeks</a></li>
        <li><a href="Device-Recovering-rate-in-the-last-six-months.txt">Recovery in the last 6 months</a></li>
    </ul>
    <h2>BitLocker Event Recovery Representation</h2>
    <p>This section displays various recovery events in the last three, six months and one year.</p>
    <h2>BitLocker Event Recovery in the last six months</h2>
    <p>Download the PDF file <a href="BitLocker_Key_Recovery_Events.pdf" download>here</a>.</p>
</body>
</html>

When you are done writing (creating your HTML) page, you should ensure that it is saved in the following format “.html”.

Name the file “index.html” and set the encoding to UTF-8 (which is the preferred encoding for HTML files). You have to ensure that the files are available index root folder.

To do this, save this file and if move it to the index root folder. At this point, you are ready to open your HTML file in your browser so that you can view your web page.

Now you should be able to access this report via the URL with the FQDN/mbamreports/index.html for example.

Note: If you are using any additional CSS or JavaScript files, you can create subdirectories like css and js within the MBAM directory and save those files there.

Virtualize mbam reports

Note: In order to ensure these files do not display same information over time. I have created a script to replace these file based on my requirements. For example, every two weeks, weeks and months etc.

I also created some task scheduled to ensure these processes are automated.

task scheduler

An example of this is saving the bar graph as a PNG and TXT file to the root index folder as shown below. I did the same for all other files. Please note that these are not the complete script but showing you only that the files are being saved to the index root folder.

plt.savefig(“//techdirectarchive.com//www//MBAMReports//BitLockerRecoveryEvents_Lastthreemonths.png”)

# Save the output to a text file
with open("//techdirectarchive.com//www//MBAMReports//Devices-Recovered-rate-in-the-last-two-weeks.txt", 'w') as file:
    file.write("Rate of BitLocker key recovery success by computer in the last two weeks:\n")
    for computer_name, rate in rates.items():
        file.write("{}: {:.2f}%\n".format(computer_name, rate * 100))

To learn more about these errors:  Task Scheduler Errors and Success Codes: What does the Error Code 0x41301 Mean, how to fix Windows Task Scheduler 0x2 Error, and how to Fix Windows Task Scheduler Error 0x1.

View Web Result

To do this, we will leverage any of the web browsers. The purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read HTML documents and display them correctly.

Web result

Note: A browser does not display the HTML tags, but uses them to determine how to display the document.

I hope you found this article very useful in learning the steps to create a web page to visualize the output of BitLocker Recovery. Please feel free to leave a comment below.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Web Server Tags:Python

Post navigation

Previous Post: Query and display Windows information via WMI Explorer
Next Post: Prevent OS Reinstallation: Change from legacy BIOS to UEFI

Related Posts

  • Wordpress banner
    Fix WordPress Error “The Link You Followed Has Expired” Web Server
  • Secure Web Server
    How to secure a Web Server on a Windows VM in Azure using TLS/SSL Certificates Saved in Azure Key Vault AWS/Azure/OpenShift
  • ssl
    SSL Encrypted Communications explained Web Server
  • Capture 91
    How to install IIS Web Server on Windows Server Web Server
  • banner 3
    How to Create a React App with Vite Version Control System
  • Update Wampserver
    How to update WampServer to Latest Version Web Server

More Related Articles

Wordpress banner Fix WordPress Error “The Link You Followed Has Expired” Web Server
Secure Web Server How to secure a Web Server on a Windows VM in Azure using TLS/SSL Certificates Saved in Azure Key Vault AWS/Azure/OpenShift
ssl SSL Encrypted Communications explained Web Server
Capture 91 How to install IIS Web Server on Windows Server Web Server
banner 3 How to Create a React App with Vite Version Control System
Update Wampserver How to update WampServer to Latest Version Web Server

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • 33
    The wim file needs to be remounted: Fix error 0xc1510114 Windows Server
  • Trellix Native Encryption
    Manage BitLocker and FileVault with Trellix Native Encryption Mac
  • Featured image Desktop Stickers
    How to create Desktop Stickers in Windows 11 Windows
  • Windows10 SCCM 20161
    What is ADK, MDT, Microsoft Endpoint Configuration Manager (SCCM), Intune, Autopilot, and WSUS Windows Server
  • SSL on WAMPServer
    Setup VirtualHost with SSL on WAMP Server Linux
  • LAPs on Windows Part of the OS
    How to configure Windows LAPS Windows
  • Slide1 1
    Create Multiple Users with Passwords in Ubuntu Linux Linux
  • ext
    The DriveLock server returned an invalid or unrecognized response Security | Vulnerability Scans and Assessment

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,825 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.