Skip to content

Quick Start

Pavel Andreev edited this page Apr 12, 2024 · 53 revisions

You can use this module with a pull server, an SMB share or a local file repository. The following quick start example use a local file repository. We recommend that you create a Checkpoint/Snapshot of the test deployment server after the initial prerequisites and sourcefiles have been installed/copied.

Prerequisites

cMDTBuildLab doesn't required full Active Directory infrastructure, but for easy build your images it will be much simpler.

Recommendations:

  • Domain Controller: DC01 (Windows 2012 R2 or above)
  • Windows Update Server (WSUS): WU01 (Windows 2012 R2 or above)

Requirements:

  • Deployment server: MDT01 (Windows 2016/2019)
    Disk C: - System
    Disk E: - DATA
    (Disk D: is used for Virtual DVD)
  • Hyper-V Host: HV01 (Windows 2016 or above)
  • Original media (ISO) images:
    Windows 10 1607 or above
    Windows 2019 (November 2018)

Deploy

  1. Install modules on the deployment server MDT01:

    install-module -Name cMDTBuildLab

    (modules xSmbShare and cNtfsAccessControl will be installed automatically)

  2. Copy deployment scripts from %ProgramFiles\WindowsPowerShell\Modules\cMDTBuildLab\Version\Deploy to C:\Scripts

  3. Create a source directory E:\Source on MDT server. If you use another driveletter and path you need to edit the configuration file (Deploy_MDT_Server_ConfigurationData.psd1)

  4. Use Import-ISO.ps1 script for automation
    -or-
    Create subfolders under "E:\Source" and copy content from official Windows ISO to it:

    • Windows10x86
    • Windows10x64
    • Windows2019

      Note: this is a full set of Windows images. If you want to build part of them, copy only needed.
  5. There are two Example deploy configurations:

    • "Deploy_MDT_Server_ConfigurationData_Lite.psd1" for build only Windows 10 x64 Evaluation Edition
    • "Deploy_MDT_Server_ConfigurationData.psd1" for build full set of images (Windows 10 and Windows 2019)

    Edit script
    C:\Scripts\Deploy_MDT_Server.ps1:

    #Get configuration data
    #$ConfigurationData = Invoke-Expression (Get-Content -Path "$PSScriptRoot\Deploy_MDT_Server_ConfigurationData_Lite.psd1" -Raw) # Only Windows 10 x64 Evaluation
    $ConfigurationData = Invoke-Expression (Get-Content -Path "$PSScriptRoot\Deploy_MDT_Server_ConfigurationData.psd1" -Raw)       # Full

    If needed, change OSName at Task Sequence configuration:

         #Task sqeuences; are dependent on imported Operating system and Applications in MDT
         TaskSequences   = @(
             @{
                 Name     = "Windows 10 x64"
                 Path     = "Windows 10"
                 OSName   = "Windows 10\Windows 10 Enterprise Evaluation in Windows 10 x64 install.wim"
  6. Run Powershell ISE or VSCode as Administrator and edit CustomizeIniFiles section at file
    C:\Scripts\Deploy_MDT_Server_ConfigurationData.psd1
    for your WSUS configuration:

    CustomizeIniFiles  = @(
        @{  
            Name                 = "CustomSettingsIni"
            Path                 = "\Control\CustomSettings.ini"
            Company              = "My Build Lab"
            TimeZoneName         = "Russian Standard Time"
            WSUSServer           = "http://WU01.build.lab:8530"
            UserLocale           = "ru-RU"
            KeyboardLocale       = "en-US;ru-RU"
        }
    )
  7. Open file
    C:\Scripts\Deploy_MDT_Server.ps1
    Create Checkpoint for your MDT Server virtual machine.

  8. Press F5 to run the script, enter password for MDT account. The install process will take approximately one hour (depending on internet capacity and virtualization hardware). The server will reboot ones during installing.

    You will be able to see results of installing, having executed the command

    Get-DscConfigurationStatus -All
  9. Check and enable WinRM on Hyper-V host:

    winrm quickconfig
  10. Open file
    C:\Scripts\ImageFactoryV3.xml
    and edit your Hyper-V host settings.

  11. In MDT console copy needed for build Task Sequences to REF subfolder.

  12. Run script
    C:\Scripts\ImageFactoryV3-Build.ps1
    for start build process. You can see job status with command:

    Get-Job

    After all jobs will be completed, you may see results:

    Get-Job | Receive-Job

You will be able to find the reference images in \\MDT01\MDTBuildLab$\Captures share.