Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Windows 7 Enterprise には BitLocker というハードディスク暗号化機能が搭載されています。
こちらの暗号化機能の特徴として、OS のインストール時に自動的に暗号化処理を行わせることが可能といった点があります。そこで、今回は BitLocker による暗号化を自動で行うために必要な情報をご紹介します。
なお、本投稿の詳細については、以下のコンテンツに詳細が記載されいますので、併せてご覧ください。
BitLocker Drive Encryption Deployment Guide for Windows 7
https://technet.microsoft.com/en-us/library/dd875547(WS.10).aspx
全体の流れ
今回ご紹介する方法は以下のような流れです。
(1) BitLocker を適用するツールの入手
(2) 参照コンピューターの作成とツールの組み込み
(3) 応答ファイルの作成
OS のインストール イメージにあらかじめ BitLocker を有効にするコマンドをインストールしておき、応答ファイルでコマンドを自動実行させて暗号化を行う仕組みになっています。
なお、今回の方法は USB メモリをスタートアップ キーとして構成する手法です。
(1) ツールの入手
今回は、Technet で公開されている enablebitlocker.vbs を用いて、BitLocker を有効にしたいと思います。ツールは下記のサイトからダウンロード可能です。
BitLocker Deployment Sample Resources
https://code.msdn.microsoft.com/bdedeploy → enablebitlocker.vbs をダウンロード
なお、今回は取り上げませんでしたが、BitLocker は標準で WMI のインターフェースを持っています。WMI を利用すると上記の .vbs のように BitLocker を制御するスクリプトを簡単に自作することが可能です。また、WMI は .NET 環境との親和性が高いので、PowerShell などからも簡単に利用できます。
BitLocker Drive Encryption Provider
https://msdn.microsoft.com/en-us/library/aa376409(VS.85).aspx
(2) 参照コンピューターの作成と OS イメージへのツールの組み込み
以前の投稿 を参考に、参照コンピューター をセットアップします。
【Windows 7 展開のコツ】 監査モードを使ってマスター イメージ (ひな形) を作成する (1)
【Windows 7 展開のコツ】 監査モードを使ってマスター イメージ (ひな形) を作成する (2)
参照コンピューター上に の c:\windows\Distribution\Bitlocker\ に enablebitlocker.vbs をコピーしてください。
> copy enablebitlocker.vbs c:\windows\Distribution\Bitlocker\EnableBitlocker.vbs
GUI でコピーしても構いません。
また、参照コンピューターを使わず、OS のインストーラーの WIM ファイルを直接編集することも可能です。
方法については、Dism.exe を利用したイメージのカスタマイズ方法を参照して下さい。
新しい DISM ツールを使用して Windows イメージを準備およびサービスする
https://technet.microsoft.com/ja-jp/windows/ee183884.aspx
(3) 応答ファイルの作成
OS のイメージに組み込んだ、BitLocker 有効化スクリプトを自動実行するための定義は以下の通りです。
・インストールフェーズ:OOBE System
・コンポーネント:x86_Microsoft-Windows-Shell-Setup_neutral
・項目:FirstLogonCommand → SyncronousCommand
パラメーターとして下記を設定します。
・Command Line: (enablebitlocker.vbs を パス:\windows\Distribution\Bitlocker にコピーしている場合)
wscript.exe //B //nologo %windir%\Distribution\Bitlocker\EnableBitlocker.vbs /on:usb /rk /promptuser /l:%windir%\Distribution\Bitlocker\enable.log
その他、パーティションの設定や、PC 名などの定義については、下記のコンテンツを参考にしてください。
Windows® 7 標準クライアント イメージの作成手順
https://technet.microsoft.com/ja-jp/windows/ee517406.aspx
作成した応答ファイルは、OS のインストール時に自動的に参照される、autounattend.xml と名前を付けて USB メモリに保存しておいてください。
あとは、応答ファイルが格納されているメディアをインストールする PC に取り付け、(2) で作成したメディアで OS をインストールすると、OOBE フェーズで自動的に BitLocker 有効化のコマンドが実行されます。 すると、取り付けた USB メモリが OS のスタートアップキーとして構成されます。
以下は、今回使用した応答ファイルのサンプルです。
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="https://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"> <DiskConfiguration> <Disk wcm:action="add"> <CreatePartitions> <!-- ブートパーティションを作成 --> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>200</Size> <Type>Primary</Type> </CreatePartition> <!-- OS パーティションを作成 --> <CreatePartition wcm:action="add"> <Order>2</Order> <Type>Primary</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <!-- ブートパーティションを初期化 --> <Active>true</Active> <Extend>false</Extend> <Format>NTFS</Format> <Label>Boot</Label> <Letter>S</Letter> <Order>1</Order> <PartitionID>1</PartitionID> <TypeID>0x27</TypeID> </ModifyPartition> <ModifyPartition wcm:action="add"> <!-- OS パーティションを初期化 --> <Active>false</Active> <Extend>false</Extend> <Format>NTFS</Format> <Label>Windows 7 Enterprise</Label> <Letter>C</Letter> <Order>2</Order> <PartitionID>2</PartitionID> <TypeID>0x7</TypeID> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <!-- 一度ディスクを初期化していますのでご注意ください。--> <WillWipeDisk>true</WillWipeDisk> </Disk> </DiskConfiguration> <ComplianceCheck> <DisplayReport>OnError</DisplayReport> </ComplianceCheck> </component> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="https://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>ja-JP</UILanguage> </SetupUILanguage> <InputLocale>0411:00000411</InputLocale> <LayeredDriver>6</LayeredDriver> <SystemLocale>ja-JP</SystemLocale> <UILanguage>ja-JP</UILanguage> <UILanguageFallback>ja-JP</UILanguageFallback> <UserLocale>ja-JP</UserLocale> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="https://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"> <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <!-- 暗号化のコマンドを実行 --> <CommandLine>wscript.exe //B //nologo %windir%\Distribution\BitLocker\EnableBitLocker.vbs /on:usb /rk /promptuser /l:%windie%\Distribution\BitLocker\enable.log</CommandLine> <Description>Enable BitLocker with USB only and Create Recovery password and Recovery Key</Description> <Order>1</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> </FirstLogonCommands> <OOBE> <HideEULAPage>true</HideEULAPage> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> <NetworkLocation>Work</NetworkLocation> <ProtectYourPC>1</ProtectYourPC> <SkipMachineOOBE>false</SkipMachineOOBE> <SkipUserOOBE>false</SkipUserOOBE> </OOBE> <AutoLogon> <Password> <Value>cABhAHMAcwB3AG8AcgBkAFAAYQBzAHMAdwBvAHIAZAA=</Value> <PlainText>false</PlainText> </Password> <Domain>WORKGROUP</Domain> <Enabled>true</Enabled> <LogonCount>5</LogonCount> <Username>user</Username> </AutoLogon> <UserAccounts> <LocalAccounts> <LocalAccount wcm:action="add"> <Password> <Value>cABhAHMAcwB3AG8AcgBkAFAAYQBzAHMAdwBvAHIAZAA=</Value> <PlainText>false</PlainText> </Password> <Description>Local Admin</Description> <DisplayName>user</DisplayName> <Group>Administrators</Group> <Name>User</Name> </LocalAccount> </LocalAccounts> </UserAccounts> <TimeZone>Tokyo Standard Time</TimeZone> </component> <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="https://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"> <InputLocale>0411:00000411</InputLocale> <SystemLocale>ja-JP</SystemLocale> <UILanguage>ja-JP</UILanguage> <UILanguageFallback>ja-JP</UILanguageFallback> <UserLocale>ja-JP</UserLocale> </component> </settings> <settings pass="specialize"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="https://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"> <ComputerName>*</ComputerName> </component> </settings> <cpi:offlineImage cpi:source="catalog:h:/sources/install_windows 7 enterprise.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend> |
※ そのまま使うと、ディスクをすべて消去してしまうので、取扱いにはご注意ください。