Blog

Saturday, 26 September 2020 10:35

Turn On BitLocker for Fixed Drives in Windows 10

Written by

For extra protection, Windows 10 allows enabling BitLocker for fixed drives (drive partitions and internal storage devices). It supports protection with a smart card or password. You can also make the drive to automatically unlock when you sign in to your user account.

 

BitLocker was first introduced in Windows Vista and still exists in Windows 10. It was implemented exclusively for Windows and has no official support in alternative operating systems. BitLocker can utilize your PC's Trusted Platform Module (TPM) to store its encryption key secrets. In modern versions of Windows such as Windows 8.1 and Windows 10, BitLocker supports hardware-accelerated encryption if certain requirements are met (the drive has to support it, Secure Boot must be on and many other requirements). Without hardware encryption, BitLocker switches to software-based encryption so there is a dip in your drive's performance. BitLocker in Windows 10 supports a number of encryption methods, and supports changing a cipher strength.

Butlocker Drive Encryption

Note: In Windows 10, BitLocker Drive Encryption is only available in the Pro, Enterprise, and Education editions. BitLocker can encrypt the system drive (the drive Windows is installed on), and internal hard drives. The BitLocker To Go feature allows protecting files stored on a removable drives, such as a USB flash drive.

There are a number of methods you can use to turn on or off BitLocker for an internal fixed drive.

To Turn On BitLocker for a Fixed Data Drive in Windows 10,

  1. Configure the encryption method for BitLocker if required.
  2. Open File Explorer to the This PC folder.
  3. Right-click on the drive and select Turn on Bitlocker from the context menu.Enable Bitlocker For Fixed Drive
  4. Alternatively, click on Manage tab under Drive Tools in the Ribbon, then click on the Turn on BitLocker command.Enable Bitlocker For Fixed Drive In Ribbon
  5. Finally, you can open Control Panel\System and Security\BitLocker Drive Encryption. On the right, find your internal drive or partition, and click on the link Turn on Bitlocker.Enable Bitlocker For Fixed Drive In Control Panel
  6. In the next dialog, choose a smart card or provide a password to encrypt the drive contents.Set Bitlocker Password For Fixed Drive
  7. Choose how to backup the encryption key. For example, you can print it.Save Bitlocker Key For Fixed Drive
  8. Select how much of your drive space to encrypt. For new drives, you can choose 'used disk space only'. For drives that already contain files, choose Encrypt entire drive.Bitlocker Encrypt Space For Fixed Drive
  9. Specify which encryption mode to use.
    • New encryption mode (XTS-AES 128-bit) is supported on Windows 10.
    • Compatible mode (AES-CBC 128-bit) is supported on Windows Vista, Windows 7 and Windows 8/8.1.Bitlocker Encryption Method For Fixed Drive
  10. Click on Start encrypting.Bitlocker Start Encrypting Fixed Drive

You are done. The fixed drive will be encrypted. This could take a long time to finish depending on the data size stored on the drive, and its capacity.Bitlocker Fixed Drive Encrypted

You can now check the BitLocker encryption status for the drive.

To Turn Off BitLocker for a Fixed Drive in Windows 10,

  1. Open File Explorer to the This PC folder.
  2. Right-click on the drive and select Manage BitLocker from the context menu.Disable Bitlocker For Fixed Drive
  3. Alternatively, click on Manage tab under Drive Tools in the Ribbon, then click on the Manage BitLocker command.Disable Bitlocker For Fixed Drive In Ribbon
  4. Finally, you can open Control Panel\System and Security\BitLocker Drive Encryption.
  5. On the right side of the Drive Encryption Dialog, find your fixed drive, and click on the link Turn off BitLocker.Disable Bitlocker For Fixed Drive In Control Panel
  6. Click on the Turn off BitLocker to confirm the operation.

You are done. BitLocker will decrypting the drive contents.

You can now check the BitLocker encryption status for the drive.

Also, you can disable BitLocker for an internal drive from Command Prompt or PowerShell.

To Turn Off BitLocker for a Fixed Drive from the Command Line

  1. Open a new command prompt as Administrator.
  2. Type and run the following command: manage-bde -off <drive letter>:.
  3. Substitute <drive letter> with the actual drive letter of the drive you want to decrypt. For example: manage-bde -off D:.Bitlocker Turn Off In Command Prompt
  4. Alternatively, open PowerShell as Administrator.
  5. Type and run the following command: Disable-BitLocker -MountPoint "<drive letter>:".
  6. Substitute <drive letter> with the actual drive letter of the drive you want to decrypt. For example: Disable-BitLocker -MountPoint "D:".Bitlocker Turn Off In Power Shell

 

You are done!

Source: https://winaero.com/blog/turn-on-bitlocker-for-fixed-drives-in-windows-10/

PDF

Saturday, 25 January 2020 19:17

Convert XML to CSV with PHP

Written by

I'm using the following code to convert my XML file to a CSV format. Unfortunately, it seems to not be recognizing each entry in the XML and so the XML file ends up being blank.

<?php
$filexml='test.xml';
if (file_exists($filexml)) {
  echo 'File Exists';
$xml = simplexml_load_file($filexml);
  $f = fopen('test.csv', 'w');
  foreach ($xml->Item as $item) {
        fputcsv($f, get_object_vars($item),',','"');
  }
  fclose($f);
}
?>

An example of my XML file is below...

<Item MaintenanceType="C">
  <HazardousMaterialCode>N</HazardousMaterialCode>
  <ItemLevelGTIN GTINQualifier="UP">090127000380</ItemLevelGTIN>
  <PartNumber>0-1848-1</PartNumber>
  <BrandAAIAID>BBVL</BrandAAIAID>
  <BrandLabel>Holley</BrandLabel>
  <PartTerminologyID>5904</PartTerminologyID>
  <Descriptions>
    <Description MaintenanceType="C" DescriptionCode="DES" LanguageCode="EN">Street Carburetor</Description>
    <Description MaintenanceType="C" DescriptionCode="SHO" LanguageCode="EN">Crb</Description>
  </Descriptions>
  <Prices>
    <Pricing MaintenanceType="C" PriceType="JBR">
      <PriceSheetNumber>L30779-13</PriceSheetNumber>
      <CurrencyCode>USD</CurrencyCode>
      <EffectiveDate>2013-01-01</EffectiveDate>
      <Price UOM="PE">462.4600</Price>
    </Pricing>
    <Pricing MaintenanceType="C" PriceType="RET">
      <PriceSheetNumber>L30779-13</PriceSheetNumber>
      <CurrencyCode>USD</CurrencyCode>
      <EffectiveDate>2013-01-01</EffectiveDate>
      <Price UOM="PE">380.5500</Price>
    </Pricing>
    <Pricing MaintenanceType="C" PriceType="WD1">
      <PriceSheetNumber>L30779-13</PriceSheetNumber>
      <CurrencyCode>USD</CurrencyCode>
      <EffectiveDate>2013-01-01</EffectiveDate>
      <Price UOM="PE">314.4700</Price>
    </Pricing>
  </Prices>
  <ExtendedInformation>
    <ExtendedProductInformation MaintenanceType="C" EXPICode="CTO" LanguageCode="EN">US</ExtendedProductInformation>
    <ExtendedProductInformation MaintenanceType="C" EXPICode="NPC" LanguageCode="EN">A</ExtendedProductInformation>
    <ExtendedProductInformation MaintenanceType="C" EXPICode="HTS" LanguageCode="EN">8409914000</ExtendedProductInformation>
    <ExtendedProductInformation MaintenanceType="C" EXPICode="NAF" LanguageCode="EN">B</ExtendedProductInformation>
  </ExtendedInformation>
  <ProductAttributes>
    <ProductAttribute MaintenanceType="C" AttributeID="SKU" LanguageCode="EN">BBVL0-1848-1</ProductAttribute>
    <ProductAttribute MaintenanceType="C" AttributeID="ModDate" LanguageCode="EN">2012-12-31</ProductAttribute>
  </ProductAttributes>
  <Packages>
    <Package MaintenanceType="C">
      <PackageLevelGTIN>00090127000380</PackageLevelGTIN>
      <PackageUOM>EA</PackageUOM>
      <QuantityofEaches>1</QuantityofEaches>
      <Dimensions UOM="IN">
        <Height>7.5000</Height>
        <Width>11.0000</Width>
        <Length>12.2500</Length>
      </Dimensions>
      <Weights UOM="PG">
        <Weight>13.500</Weight>
        <DimensionalWeight>6.09</DimensionalWeight>
      </Weights>
    </Package>
  </Packages>
</Item>
$filexml='test.xml';

    if (file_exists($filexml)) 
           {
       $xml = simplexml_load_file($filexml);
       $f = fopen('test.csv', 'w');
       createCsv($xml, $f);
       fclose($f);
    }

    function createCsv($xml,$f)
    {

        foreach ($xml->children() as $item) 
        {

           $hasChild = (count($item->children()) > 0)?true:false;

        if( ! $hasChild)
        {
           $put_arr = array($item->getName(),$item); 
           fputcsv($f, $put_arr ,',','"');

        }
        else
        {
         createCsv($item, $f);
        }
     }

    }
Page 2 of 3