Obs/bin/ObsDep/content/Powershell/Roles/Common/DeployDirectCommon.psm1

<###################################################
 # #
 # Copyright (c) Microsoft. All rights reserved. #
 # #
 ##################################################>

$HostFile = "$Env:SystemRoot\System32\Drivers\Etc\Hosts"
# Set manually if needed
$ENABLE_DEBUGGING = $false
$DEBUG_CONNECTION_TYPE = '[DebugConnectionType]'
$DEBUG_SERIAL_PORT = '[DebugSerialPort]'
$DEBUG_SERIAL_BAUD_RATE = '[DebugSerialBaudRate]'
$DEBUG_NET_PORT_MAP_STRING = '[DebugNetPortMapString]'
$DEBUG_NET_HOST_IP = '[DebugNetHostIP]'
$DEBUG_NET_KEY = '[DebugNetKey]'
$DEBUG_NET_BUS_PARAMS = '[DebugNetBusParams]'
$ENABLE_SERIAL_CONSOLE = $false
$CONSOLE_SERIAL_PORT = '[ConsoleSerialPort]'
$CONSOLE_SERIAL_BAUD_RATE = '[ConsoleSerialBaudRate]'

# Starts all the services needed to intialize deployment on win PE
function Set-WinPEDeploymentPrerequisites
{
    $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop

    if (-not (Get-Command wpeutil*)) {
        Write-Warning "This script is intended to be execute in WinPE only."
        return
    }

    $null = wpeutil InitializeNetwork
    $null = wpeutil EnableFirewall
    $null = wpeutil WaitForNetwork

    $null = Start-Service -Name LanmanWorkstation
}

function New-NetworkDrive
{
    param (
        [Parameter(Mandatory=$true)]
        [string]
        $IPv4Address,

        [Parameter(Mandatory=$true)]
        [string]
        $HostName,

        [Parameter(Mandatory=$true)]
        [string]
        $ShareRoot,

        [Parameter(Mandatory=$true)]
        [PSCredential]
        $Credential,

        [Parameter(Mandatory=$true)]
        [string]
        $DriveLetter
    )

    $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop

    # Add Host Entry
    $hostEntry = "$IPv4Address $HostName"

    if (-not (Get-Content $HostFile).Contains($hostEntry)) {
        Write-Verbose "Add host entry: '$hostEntry'." -Verbose
        $hostEntry | Out-File -FilePath $HostFile -Append -Encoding ascii
    }

    if (Get-PSDrive | Where-Object Name -eq $DriveLetter) {
        throw [System.InvalidOperationException]::new("The letter $DriveLetter is already assigned to an existing PSDrive.")
    }

    $maxRetries = 5
    $retries = 1
    $successful = $false
    while ($retries -le $maxRetries)
    {
        try
        {
            # Set PS Drive
            if (-not (Get-PSDrive | Where-Object Name -eq $DriveLetter)) {
                Write-Verbose "Create PSDrive '$DriveLetter' to '$ShareRoot'." -Verbose
                $null = New-PSDrive -Name $DriveLetter -PSProvider FileSystem -Root $ShareRoot -Credential $Credential -Persist -Scope Global
                $successful = $true
                break
            }
        }
        catch
        {
           Write-Warning $_
           Write-Verbose "Failed to create PSDrive '$DriveLetter' to '$ShareRoot'. Sleep 60 seconds and retry $retries/$maxRetries." -Verbose
           Start-Sleep -Seconds 60
        }

        $retries ++
    }

    if ($successful) {
        Write-Verbose "Create PSDrive '$DriveLetter' to '$ShareRoot' successfully." -Verbose
    }
    else {
        throw "Failed to create PSDrive '$DriveLetter' to '$ShareRoot' after $maxRetries retries."
    }
}

# Returns back the SystemDrive
function Set-DiskConfiguration
{
    [CmdletBinding()]
    [OutputType([String])]
    param (
        [Parameter(Mandatory=$true)]
        [string]
        $LogPath,

        [Parameter(Mandatory=$false)]
        [string]
        $BootDiskConfigPath,

        [Parameter(Mandatory=$false)]
        [bool]
        $ClearExisting=$true,

        [Parameter(Mandatory=$false)]
        [bool]
        $BootFromPhysicalDisk=$false,

        [Parameter(Mandatory=$false)]
        [bool]
        $IsOneDrive=$false
    )

    $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop

    (Get-Date).ToString('yyyy/MM/dd HH:mm:ss') | Add-Content $LogPath

    if ($ClearExisting) {
        "Reset the disks and clean them of all data." | Add-Content $LogPath
        Get-Partition | Remove-Partition -Confirm:$false -ErrorAction SilentlyContinue
        # account for change in Reset-PhysicalDisk parameters in WinPE with Windows cumulative update
        $PDParam = @{}
        if ((Get-Command -Name 'Reset-PhysicalDisk').Parameters['Confirm']) {
            $PDParam.Add('Confirm',$false)
        }
        Get-PhysicalDisk | Reset-PhysicalDisk @PDParam

        Get-Disk | Where-Object PartitionStyle -ne RAW | ForEach-Object {
            $_ | Set-Disk -IsOffline:$false -ErrorAction SilentlyContinue
            $_ | Set-Disk -IsReadOnly:$false -ErrorAction SilentlyContinue
            $_ | Clear-Disk -RemoveData -RemoveOEM -Confirm:$false -ErrorAction SilentlyContinue
        }
    }
    else
    {
        "Keeping the existing partitions." | Add-Content $LogPath
    }

    Get-Disk | ForEach-Object {
        $_ | Set-Disk -IsReadOnly:$true -ErrorAction SilentlyContinue
        $_ | Set-Disk -IsOffline:$true -ErrorAction SilentlyContinue
    }

    Update-StorageProviderCache -DiscoveryLevel Full
    (Get-Date).ToString('yyyy/MM/dd HH:mm:ss') | Add-Content $LogPath
    "Select the disk to boot from." | Add-Content $LogPath

    Get-PhysicalDisk | Sort-Object DeviceId | Format-Table DeviceId, Model, BusType, MediaType, Size | Out-String | Add-Content $LogPath
    Get-Disk | Out-String | Add-Content $LogPath

    $allbootCandidateDisks = Get-PhysicalDisk
    if (-not $allbootCandidateDisks) {
        throw 'No suitable boot candidate disks found.'
    }

    # log the data about physical disks that filtering uses
    "All disks." | Add-Content $LogPath
    $allbootCandidateDisks | Sort-Object DeviceId | Select-Object FriendlyName,SerialNumber,BusType,DeviceId,Manufacturer,Model,MediaType,Size | Format-Table | Out-String | Add-Content $LogPath

    if ($bootDiskConfigPath -and (Test-Path $bootDiskConfigPath)) {
        "Boot disk configuration file '$bootDiskConfigPath' exists." | Add-Content $LogPath
        [xml] $config = Get-Content $bootDiskConfigPath
        $bootDiskConfigs = $config.disks.disk
        $filteredBootCandidateDisks = $null
        foreach ($bootDiskConfig in $bootDiskConfigs) {
            # only apply each filter if the previous filter did not return any disks
            if (-not $filteredBootCandidateDisks) {
                # log what if being used as a filter
                "Filter - BusType: $($bootDiskConfig.BusType), DeviceId: $($bootDiskConfig.DeviceId), Manufacturer: $($bootDiskConfig.Manufacturer), Model: $($bootDiskConfig.Model), MediaType: $($bootDiskConfig.MediaType), Size: $($bootDiskConfig.Size)" | Add-Content $LogPath
                $filteredBootCandidateDisks = $allbootCandidateDisks | Where-Object { ($_.BusType -like $bootDiskConfig.BusType) -and ($_.DeviceId -like $bootDiskConfig.DeviceId) -and ($_.Manufacturer -like $bootDiskConfig.Manufacturer) -and ($_.Model -like $bootDiskConfig.Model) -and ($_.MediaType -like $bootDiskConfig.MediaType) -and ($_.Size -like $bootDiskConfig.Size) }

                # if this filter returns disks, set the busTypeFilter so we can filter further for * below
                if ($filteredBootCandidateDisks) {
                    $busTypeFilter = $bootDiskConfig.BusType
                }
            }
            else {
                break
            }
        }

        # if no filtered disks after attempting all filters, we must fail
        if (-not $filteredBootCandidateDisks) {
            throw 'After filtering, no suitable boot candidate disks found.'
        }

        "Filtered disks." | Add-Content $LogPath
        $filteredBootCandidateDisks | Sort-Object DeviceId | Select-Object FriendlyName,SerialNumber,BusType,DeviceId,Manufacturer,Model,MediaType,Size | Format-Table | Out-String | Add-Content $LogPath

        ###############################################################################################
        # Temporary; after OEM extention is workin E2E, it will be removed

        $allTypeString = "*"

        if ($busTypeFilter -eq $allTypeString) {
            $filteredBootCandidateDisks = $filteredBootCandidateDisks | Where-Object BusType -in 'SATA', 'SAS', 'RAID'
        }

        "Filtered disks after the bus type filter 'SATA', 'SAS', 'RAID'." | Add-Content $LogPath
        $filteredBootCandidateDisks | Out-String | Add-Content $LogPath

        ###############################################################################################

        $bootCandidateDisks = $filteredBootCandidateDisks
    }
    else {
        $bootCandidateDisks = $allbootCandidateDisks | Where-Object BusType -in 'SATA', 'SAS', 'RAID'
    }

    if (-not $bootCandidateDisks) {
        throw 'No suitable boot candidate disk found.'
    }

    $bootCandidateDisks = $bootCandidateDisks | Where-Object DeviceId -in (Get-Disk).Number
    $bootCandidateDisks = $bootCandidateDisks | Sort-Object Size, DeviceId
    foreach ($currentDisk in $bootCandidateDisks) {
        $found = $(Get-Disk -Number $currentDisk.DeviceId | Get-Partition | Where-Object {$_.Type -eq "System"})
        if ($found) {
            "Found boot disk with system partition type" | Add-Content $LogPath
            $found | Out-String | Add-Content $LogPath
            $bootCandidateDisk = $currentDisk
            break
        }
    }
    if ($null -eq $bootCandidateDisk) {
        "Select the first candidate disk as boot disk" | Add-Content $LogPath
        $bootCandidateDisk = $bootCandidateDisks | Select-Object -First 1
    }
    $bootDiskNumber = $bootCandidateDisk.DeviceId

    if (-not $bootDiskNumber) {
        throw 'Not able to get the boot disk number.'
    }

    "Disk $bootDiskNumber will be used for boot partition." | Add-Content $LogPath

    if (-not($ClearExisting)) {
        # Remove the disk partition
        Get-Partition -DiskNumber $bootDiskNumber | Remove-Partition -Confirm:$false -ErrorAction SilentlyContinue

        # Reset only the boot disk
        $PDParam = @{}
        if ((Get-Command -Name 'Reset-PhysicalDisk').Parameters['Confirm']) {
            $PDParam.Add('Confirm',$false)
        }

        $bootCandidateDisk | Reset-PhysicalDisk @PDParam

        $disk = Get-Disk | Where-Object Number -eq $bootDiskNumber | Where-Object PartitionStyle -ne RAW

        "Disk about to be cleared:" | Add-Content $LogPath
        $disk | Out-String | Add-Content $LogPath

        $disk | ForEach-Object {
            $_ | Set-Disk -IsOffline:$false -ErrorAction SilentlyContinue
            $_ | Set-Disk -IsReadOnly:$false -ErrorAction SilentlyContinue
            $_ | Clear-Disk -RemoveData -RemoveOEM -Confirm:$false -ErrorAction SilentlyContinue
            $_ | Set-Disk -IsReadOnly:$true -ErrorAction SilentlyContinue
            $_ | Set-Disk -IsOffline:$true -ErrorAction SilentlyContinue
        }
    }

    ###############################################################################################
    # Temporary for R730; after OEM extention is working E2E, this will be removed [9282124]

    $firstDisk = $bootCandidateDisk
    $secondDisk = $bootCandidateDisks | Where-Object { $($_.DeviceId -ne $bootCandidateDisk.DeviceId) -and $($_.Size -ge $bootCandidateDisk.Size) } | Sort-Object Size, DeviceId | Select-Object -First 1

    if ($firstDisk.Size -eq $secondDisk.Size) {
        $secondDiskNumber = $secondDisk.DeviceId
        $ssdDisks = Get-PhysicalDisk | Where-Object BusType -in 'SATA', 'SAS', 'RAID', 'NVMe' | Where-Object MediaType -eq SSD
        $nonOnboardSsdDisks = $ssdDisks | Where-Object DeviceId -notin $firstDisk.DeviceId, $secondDisk.DeviceId | Sort-Object Size

        if ($nonOnboardSsdDisks -and ($secondDisk.Size -lt $nonOnboardSsdDisks[0].Size / 1.01)) {
            throw "Disk $secondDiskNumber appears to be a secondary on-board drive; it needs to be removed."
        }
    }

    ##############################################################################################

    wpeutil UpdateBootInfo | Add-Content $LogPath

    $remove = @(Get-Volume | Where-Object DriveType -ne Fixed)
    foreach ($item in $remove) {
        $vol = Get-CimInstance -ClassName Win32_Volume -Filter "DriveLetter = '$($item.DriveLetter):'"
        if ($null -ne $vol) {
            try {
                "Remove drive letter assignment '$($item.DriveLetter):' from '$($item.DriveType)'." | Add-Content $LogPath
                $vol | Set-CimInstance -Property @{DriveLetter=$null}
            }
            catch {
                "WARNING: Failed to remove drive letter assignment '$($item.DriveLetter):' from '$($item.DriveType)'." | Add-Content $LogPath
            }
        }
    }

    $peFirmwareType = (Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control).PEFirmwareType
    # Returns 0x1 if the PC is booted into BIOS mode, or 0x2 if the PC is booted in UEFI mode.
    $isLegacyBoot = $peFirmwareType -eq 1

    if ($isLegacyBoot) {
        "Create new partitions for Legacy Boot." | Add-Content $LogPath
        $null = Initialize-Disk -Number $bootDiskNumber -PartitionStyle MBR -ErrorAction SilentlyContinue
        if ($true -eq $BootFromPhysicalDisk) {
            $winPartition = New-Partition -DiskNumber $bootDiskNumber -Size 60GB -DriveLetter C -IsActive
            if (-not $winPartition) {
                throw 'Unable to create partition for physical drive OS Installation.'
            }
            $partition = New-Partition -DiskNumber $bootDiskNumber -UseMaximumSize -DriveLetter D
        }
        else {
            $partition = New-Partition -DiskNumber $bootDiskNumber -UseMaximumSize -AssignDriveLetter -IsActive
        }
        if (-not $partition) {
            throw 'Unable to create partition for OS Installation.'
        }
        $systemDrive = $partition.DriveLetter + ':'
        if ($true -eq $BootFromPhysicalDisk) {
            $null = Format-Volume -Partition $winPartition -FileSystem NTFS -Confirm:$false
        }
        $osVolume = Format-Volume -Partition $partition -FileSystem NTFS -Confirm:$false
    }
    else {
        "Create new partitions for UEFI." | Add-Content $LogPath
        $null = Initialize-Disk -Number $bootDiskNumber -ErrorAction SilentlyContinue
        $msrPartition = New-Partition -DiskNumber $bootDiskNumber -Size 128MB -GptType "{e3c9e316-0b5c-4db8-817d-f92df00215ae}" # MSR
        if ($true -eq $BootFromPhysicalDisk) {
            "Create partitions for Boot From Physical Disk scenario." | Add-Content $LogPath
             $sysPartition = New-Partition -DiskNumber $bootDiskNumber -Size 350MB -DriveLetter E -GptType "{c12a7328-f81f-11d2-ba4b-00a0c93ec93b}" # ESP
             if(!$IsOneDrive) {
                $winPartition = New-Partition -DiskNumber $bootDiskNumber -Size 60GB -DriveLetter C -GptType "{ebd0a0a2-b9e5-4433-87c0-68b6b72699c7}" # WIN
            }
            else {
                $winPartition = New-Partition -DiskNumber $bootDiskNumber -UseMaximumSize -DriveLetter C -GptType "{ebd0a0a2-b9e5-4433-87c0-68b6b72699c7}" # WIN
            }
            if (-not $winPartition) {
                throw 'Unable to create partition for physical drive OS Installation.'
            }
        }
        else {
            "Create partitions for Boot From Virtual Disk scenario." | Add-Content $LogPath
            $espPartition = New-Partition -DiskNumber $bootDiskNumber -Size 200MB -GptType "{c12a7328-f81f-11d2-ba4b-00a0c93ec93b}" # ESP
            $espPartition | Add-PartitionAccessPath -AccessPath Q:
            $null = format Q: /fs:FAT32 /v:EFS /Y
        }
        if((!$IsOneDrive) -Or (!$BootFromPhysicalDisk)) {
            $osPartition = New-Partition -DiskNumber $bootDiskNumber -UseMaximumSize -DriveLetter D -GptType "{ebd0a0a2-b9e5-4433-87c0-68b6b72699c7}" # OS
            if (-not $osPartition) {
                throw 'Unable to create the required partitions for OS Installation.'
            }
            $osVolume = Format-Volume -Partition $osPartition -FileSystem NTFS -Confirm:$false
            $systemDrive = $osPartition.DriveLetter + ':'
            "System drive letter is set to '$($systemDrive)'" | Add-Content $LogPath
        }
        if ($null -ne $winPartition) {
            $null = Format-Volume -Partition $sysPartition -FileSystem FAT32 -Confirm:$false
            $null = Format-Volume -Partition $winPartition -FileSystem NTFS -Confirm:$false
            $env:WINDOWS_DRIVE = $winPartition.DriveLetter + ':'
            "Windows OS drive letter is set to '$($env:WINDOWS_DRIVE)'" | Add-Content $LogPath
        }
    }

    return [string]$systemDrive
}

function Set-HostVHDBoot
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string]
        $BootVHDFilePath,

        [Parameter(Mandatory=$true)]
        [string]
        $UnattendPath,

        [Parameter(Mandatory=$true)]
        [string]
        $DeploymentId,

        [Parameter(Mandatory=$true)]
        [string]
        $SystemDrive,

        [Parameter(Mandatory=$false)]
        [string]
        $MacAddress=$null,

        [Parameter(Mandatory=$true)]
        [string]
        $LogPath,

        [Parameter(Mandatory=$false)]
        [switch]
        $AddDeploymentIdToken,

        [Parameter(Mandatory=$false)]
        [string]
        $HypervisorSchedulerType='Core'
    )

    $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
    Import-Module "$PSScriptRoot\Helpers.psm1"

    try
    {
        "Mounting VHD '$BootVHDFilePath'." | Add-Content $LogPath
        $null = Mount-DiskImage -ImagePath $BootVHDFilePath
        $virtualDiskDriveLetter = Get-Disk | Where-Object BusType -like 'File Backed Virtual' | Get-Partition | Where-Object Size -gt 2Gb | ForEach-Object DriveLetter
        $bootDrive = $virtualDiskDriveLetter + ':\'

        # Test binary hashes at WinPE 2nd mount start
        Test-BinaryHash -FileSystemRoot $bootDrive -OutputFileName 'winPE2ndMountStartHash.json' -BaselineFileName 'baselineHash.json' *>&1 | Add-Content $logPath

        # Workaround for issue where script cannot find drive
        $null = New-PSDrive -Name $virtualDiskDriveLetter -Root $bootDrive -PSProvider FileSystem

        if ($AddDeploymentIdToken) {
            # Add a token file at a predefined location to detect host has booted up.
            # This will be relevant only in case of one-node stamp when it goes through baremetal deployment using WinPE
            $tempPath = "$($bootDrive)CloudBuilderTemp"
            "Inject deploymentId file '$tempPath\$($DeploymentId).txt'." | Add-Content $LogPath
            $null = New-Item -Path $tempPath -ItemType Directory -Force
            $null = Set-Content -Path "$tempPath\$($DeploymentId).txt" -Value ''
        }

        "Use-WindowsUnattend file '$UnattendPath' for offline values." | Add-Content $LogPath
        $null = Use-WindowsUnattend -Path $bootDrive  -UnattendPath $UnattendPath

        $unattendDirectory = "$($bootDrive)Windows\Panther\Unattend"
        "Inject Unattend file '$UnattendPath' to '$unattendDirectory'." | Add-Content $LogPath
        $null = New-Item -Path $unattendDirectory -ItemType Directory -Force

        if ($MacAddress) {
            $unattendContent = Get-Content $unattendPath
            "Writing MAC Address '$MacAddress' to Unattend file" | Add-Content $LogPath
            $unattendContent = $unattendContent.Replace('[MacAddress]', $MacAddress.Replace(':','-'))
            $null = Set-Content -Path "$unattendDirectory\unattend.xml" -Value $unattendContent
        }
        else {
            $null = Copy-Item -Path $unattendPath -Destination "$unattendDirectory\unattend.xml"
        }

        $computerName =  Get-ComputerNameFromUnattend -UnattendPath "$unattendDirectory\unattend.xml"

        Set-Debugging -LogPath $LogPath -ComputerName $computerName

        $peFirmwareType = (Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control).PEFirmwareType
        # Returns 0x1 if the PC is booted into BIOS mode, or 0x2 if the PC is booted in UEFI mode.
        $isLegacyBoot = $peFirmwareType -eq 1

        if ($isLegacyBoot) {
            "Set BCD Boot Legacy." | Add-Content $LogPath
            bcdboot "$($bootDrive)Windows" /s $SystemDrive | Add-Content $LogPath
        }
        else {
            "Set BCD Boot UEFI." | Add-Content $LogPath
            bcdboot "$($bootDrive)Windows" /s Q: /f UEFI /d /addlast /v | Add-Content $LogPath

            # Remove invalid Windows Boot Manager entries, left from the previous deployment.
            $bcdFirmware = bcdedit /enum firmware
            $bcdFirmware | Add-Content $LogPath
            $bcdFirmware = $bcdFirmware -join "`n"
            if ($bcdFirmware -match 'identifier\s*({\w*-[0-9a-z-]*})[^-]*?description\s*Windows Boot Manager') {
                for ($i = 0; $i -lt $matches.Count; $i++) {
                    if ($matches[$i] -like '{*') {
                        bcdedit /delete $matches[$i]
                    }
                }
            }

            bcdedit /enum firmware | Add-Content $LogPath
        }

        # https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/manage/manage-hyper-v-scheduler-types
        "Setting hypervisor scheduler type to $HypervisorSchedulerType" | Add-Content $LogPath
        $bcdOutput = & bcdedit /set `{default`} hypervisorschedulertype $HypervisorSchedulerType | Out-String
        if (-not ($bcdOutput -ilike "*successfully*")) {
            throw "BCDEdit failed to update the hypervisor scheduler type. Output: $bcdOutput"
        }

        # Output boot store entries to validate settings
        $bcdEditEnum = & bcdedit /enum | Out-String
        $bcdEdit | Add-Content $LogPath
    }
    finally
    {
        $mountedImages = Get-DiskImage -ImagePath $BootVHDFilePath
        if ($mountedImages)
        {
            # Test binary hashes at WinPE 2nd mount end
            Test-BinaryHash -FileSystemRoot $bootDrive -OutputFileName 'winPE2ndMountEndHash.json' -BaselineFileName 'baselineHash.json' *>&1 | Add-Content $logPath

            $null = Dismount-DiskImage -ImagePath $BootVHDFilePath
        }
    }
}

function Set-HostPhysicalDiskBoot
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string]
        $SystemDrive,

        [Parameter(Mandatory=$true)]
        [string]
        $UnattendPath,

        [Parameter(Mandatory=$true)]
        [string]
        $DeploymentId,

        [Parameter(Mandatory=$false)]
        [string]
        $MacAddress=$null,

        [Parameter(Mandatory=$true)]
        [string]
        $LogPath,

        [Parameter(Mandatory=$false)]
        [switch]
        $AddDeploymentIdToken,

        [Parameter(Mandatory=$false)]
        [string]
        $HypervisorSchedulerType='Core'
    )

    $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop

    try
    {
        $bootDrive = $SystemDrive

        if ($AddDeploymentIdToken) {
            # Add a token file at a predefined location to detect host has booted up.
            # This will be relevant only in case of one-node stamp when it goes through baremetal deployment using WinPE
            $tempPath = "$($bootDrive)CloudBuilderTemp"
            "Inject deploymentId file '$tempPath\$($DeploymentId).txt'." | Add-Content $LogPath
            $null = New-Item -Path $tempPath -ItemType Directory -Force
            $null = Set-Content -Path "$tempPath\$($DeploymentId).txt" -Value ''
        }

        "Use-WindowsUnattend file '$UnattendPath' for offline values." | Add-Content $LogPath
        $null = Use-WindowsUnattend -Path $bootDrive  -UnattendPath $UnattendPath

        $unattendDirectory = "$($bootDrive)Windows\Panther\Unattend"
        "Inject Unattend file '$UnattendPath' to '$unattendDirectory'." | Add-Content $LogPath
        $null = New-Item -Path $unattendDirectory -ItemType Directory -Force

        if ($MacAddress) {
            $unattendContent = Get-Content $unattendPath
            "Writing MAC Address '$MacAddress' to Unattend file" | Add-Content $LogPath
            $unattendContent = $unattendContent.Replace('[MacAddress]', $MacAddress.Replace(':','-'))
            $null = Set-Content -Path "$unattendDirectory\unattend.xml" -Value $unattendContent
        }
        else {
            $null = Copy-Item -Path $unattendPath -Destination "$unattendDirectory\unattend.xml"
        }

        $computerName =  Get-ComputerNameFromUnattend -UnattendPath "$unattendDirectory\unattend.xml"

        Set-Debugging -LogPath $LogPath -ComputerName $computerName

        $peFirmwareType = (Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control).PEFirmwareType
        # Returns 0x1 if the PC is booted into BIOS mode, or 0x2 if the PC is booted in UEFI mode.
        $isLegacyBoot = $peFirmwareType -eq 1
        if ($isLegacyBoot) {
            "Set BCD Boot Legacy." | Add-Content $LogPath
            bcdboot "$($bootDrive)\Windows" /s $bootDrive | Add-Content $LogPath
        }
        else {
            "Set BCD Boot UEFI." | Add-Content $LogPath
            bcdboot "$($bootDrive)\Windows" /s E: /f UEFI /v | Add-Content $LogPath
            bcdedit /enum firmware | Add-Content $LogPath
        }

        # https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/manage/manage-hyper-v-scheduler-types
        "Setting hypervisor scheduler type to $HypervisorSchedulerType" | Add-Content $LogPath
        $bcdOutput = & bcdedit /set `{default`} hypervisorschedulertype $HypervisorSchedulerType | Out-String
        if (-not ($bcdOutput -ilike "*successfully*")) {
            throw "BCDEdit failed to update the hypervisor scheduler type. Output: $bcdOutput"
        }

        # Output boot store entries to validate settings
        $bcdEditEnum = & bcdedit /enum | Out-String
        $bcdEdit | Add-Content $LogPath
    }
    catch
    {
        throw $PSItem
    }
}

function Get-ComputerNameFromUnattend
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string]
        $UnattendPath
    )

    # Get host name from unattend.xml
    $computerNameSearch = Get-ChildItem -Path $unattendPath | Select-String '\<ComputerName\>([^<]*)\<'
    $computerName = $computernameSearch.Matches.Groups[1].Value

    return $computerName
}

<#
.Synopsis
     Function to test if an IP address is between two other IP addresses, inclusive
.Parameter IPAddress
     The address to test.
.Parameter BeginAddress
     The IP address at the begining of the range to test.
.Parameter EndAddress
     The IP address at the begining of the range to test.
.Example
    Test-IpAddressBetween -IPAddress 10.0.0.5 -BeginAddress 10.0.0.1 -EndAddress 10.0.0.10
    Returns True
#>

function Test-IpAddressBetween
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [String]
        $IPAddress,

        [Parameter(Mandatory=$true)]
        [String]
        $BeginAddress,

        [Parameter(Mandatory=$true)]
        [String]
        $EndAddress
    )

    # Convert all the addresses to Int32
    $originalAddressBytes = ([IPAddress]$IPAddress).GetAddressBytes()
    [array]::Reverse($originalAddressBytes)
    $ipAddressInt = [System.BitConverter]::ToInt32($originalAddressBytes, 0)

    $originalAddressBytes = ([IPAddress]$BeginAddress).GetAddressBytes()
    [array]::Reverse($originalAddressBytes)
    $beginAddressInt = [System.BitConverter]::ToInt32($originalAddressBytes, 0)

    $originalAddressBytes = ([IPAddress]$EndAddress).GetAddressBytes()
    [array]::Reverse($originalAddressBytes)
    $endAddressInt = [System.BitConverter]::ToInt32($originalAddressBytes, 0)

    $ipAddressInt -le $endAddressInt -and $ipAddressInt -ge $beginAddressInt
}

function Get-LogFilePath
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string]
        $UnattendPath
    )

    $computerName = Get-ComputerNameFromUnattend -UnattendPath $UnattendPath

    $logPath = [System.IO.Path]::GetDirectoryName($UnattendPath)
    $logFilePath = "$($logPath)\$($computerName).Log"

    return $logFilePath
}

function Set-Debugging
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string]
        $LogPath,

        [Parameter(Mandatory=$true)]
        [string]
        $ComputerName
    )

    $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop

    if ($ENABLE_DEBUGGING) {
        Add-Content $LogPath "Current BCD settings:"
        bcdedit /enum | Add-Content $LogPath
        Add-Content $LogPath "Enabling debugging and setting dbgsettings..."
        bcdedit /debug '{default}' on | Add-Content $LogPath
        bcdedit /bootdebug '{default}' on | Add-Content $LogPath

        if ($DEBUG_CONNECTION_TYPE -eq 'serial') {
            bcdedit /dbgsettings serial debugport:$DEBUG_SERIAL_PORT baudrate:$DEBUG_SERIAL_BAUD_RATE | Add-Content $LogPath
        }
        elseif ($DEBUG_CONNECTION_TYPE -eq 'net') {
            $portMap = @{}
            $DEBUG_NET_PORT_MAP_STRING -split ';' | Where-Object { $_ } | ForEach-Object {
                $portRecord = $_ -split ','
                $portMap.($portRecord[0]) = $portRecord[1]
            }

            $port = $portMap.$ComputerName
            Add-Content $LogPath "Port: $port"
            bcdedit /dbgsettings net hostip:$DEBUG_NET_HOST_IP port:$port key:$DEBUG_NET_KEY | Add-Content $LogPath
            bcdedit /set '{dbgsettings}' busparams "$DEBUG_NET_BUS_PARAMS" | Add-Content $LogPath
        }
        else {
            Add-Content $LogPath "Debugging connection type '$DEBUG_CONNECTION_TYPE' is not expected."
        }

        Add-Content $LogPath "Debug settings are now set:"
        bcdedit /enum | Add-Content $LogPath
        bcdedit /dbgsettings | Add-Content $LogPath
    }

    if ($ENABLE_SERIAL_CONSOLE) {
        Add-Content $LogPath "Current BCD settings:"
        bcdedit /enum | Add-Content $LogPath
        Add-Content $LogPath "Enabling Emergency Management Services..."
        bcdedit /ems '{default}' on | Add-Content $LogPath

        bcdedit /emssettings emsport:$CONSOLE_SERIAL_PORT emsbaudrate:$CONSOLE_SERIAL_BAUD_RATE | Add-Content $LogPath
        Add-Content $LogPath "EMS settings are now set:"
        bcdedit /enum | Add-Content $LogPath
    }
}

<#
.Synopsis
     Function to get the local machine System Management BIOS Guid without dashes or brackets
.Example
    Get-LocalSMBIOSGuid
    Returns 1742B000CD3611E10000AC162D024F2F
#>

function Get-LocalSMBIOSGuid
{
    $smBiosGuid = Get-WmiObject Win32_ComputerSystemProduct UUID
    $smBiosGuid.UUID.Replace('-', '')
}

<#
.Synopsis
     Function to get a path to the file that will contain the MAC address on a deploying machine
.Example
    Get-MACAddressOutputPath -RemoteUnattendPath \\foo\bar
    Returns \\foo\bar\1742B000CD3611E10000AC162D024F2F.MACAddress.txt
#>

function Get-MACAddressOutputPath
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string]
        $RemoteUnattendPath
    )

    $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop

    # Always use the smbios guid, since this is an externally discoverable identifier
    $smBiosGuid = Get-LocalSMBIOSGuid

    $macAddressOutputFilePath = $smBiosGuid | ForEach-Object { "$RemoteUnattendPath\$_.MACAddress.txt" }

    return $macAddressOutputFilePath
}


function Get-UnattendFilePath
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string]
        $RemoteUnattendPath
    )

    $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop

    $macAddress = Get-CimInstance Win32_NetworkAdapterConfiguration | Where-Object MACAddress | ForEach-Object MACAddress | ForEach-Object { $_ -replace ':', '-' } | Where-Object { "$remoteUnattendPath\$_.xml" | Where-Object {Test-Path $_} }

    if ($macAddress) {
        $unattendPath = $macAddress | ForEach-Object { "$RemoteUnattendPath\$_.xml" }
    }
    else {
        # No unattend file matching the MAC address was found, attempt to find an unattend file with the smbios guid instead
        $smBiosGuid = Get-LocalSMBIOSGuid

        $unattendPath = $smBiosGuid | ForEach-Object { "$RemoteUnattendPath\$_.xml" }
    }

    return $unattendPath
}


<#
.Synopsis
    This function returns the node specific RemoteUnattend path e.g. when passed RemoteUnattend, we will get back
    RemoteUnattend\<NodeName>. If node's unattend files are in RemoteUnattend *and* RemoteUnattend\NodeName, we will
    return the path containing the latest files. This scenario can happen during the following sequence
    Old build + FRU X (writes to RemoteUnattend) + PnU (new build that writes to NodeName) + FRU X during PnU
#>

function Get-NodeSpecificRemoteUnattendPath
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string]
        $UnattendPathToResolve
    )

    $macAddresses = Get-CimInstance Win32_NetworkAdapterConfiguration | Where-Object MACAddress | ForEach-Object MACAddress | ForEach-Object { $_ -replace ':', '-' }

    foreach ($macAddress in $macAddresses) {
        $unattendFile = Get-ChildItem -Path $UnattendPathToResolve -Include "$macAddress.xml" -Recurse -Force -File | Sort-Object LastWriteTime -Descending | Select-Object -First 1
        if ($unattendFile)  {
            return $unattendFile.Directory.FullName
        }
    }

    $smBiosGuid = Get-LocalSMBIOSGuid

    $unattendFile = Get-ChildItem -Path $UnattendPathToResolve -Include "$smBiosGuid.xml" -Recurse -Force -File  | Sort-Object LastWriteTime -Descending | Select-Object -First 1
    if ($unattendFile)  {
        return $unattendFile.Directory.FullName
    }

    return $UnattendPathToResolve
}

function Get-BootDiskConfigPath
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string]
        $RemoteUnattendPath
    )

    $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop

    $macAddress = Get-CimInstance Win32_NetworkAdapterConfiguration | Where-Object MACAddress | ForEach-Object MACAddress | ForEach-Object { $_ -replace ':', '-' } | Where-Object { "$remoteUnattendPath\$_.BootDisk.xml" | Where-Object {Test-Path $_} }

    if ($macAddress) {
        $bootDiskConfigPath = $macAddress | ForEach-Object { "$RemoteUnattendPath\$_.BootDisk.xml" }
    }
    else {
        # No boot disk file matching the MAC address was found, attempt to find a boot disk file with the smbios guid instead
        $smBiosGuid = Get-LocalSMBIOSGuid

        $bootDiskConfigPath = $smBiosGuid | ForEach-Object { "$RemoteUnattendPath\$_.BootDisk.xml" }
    }

    return $bootDiskConfigPath
}

function Test-AzsHostTPMOwnership
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string] $LogPath
    )

    $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
    "Testing TPM ownership for AzureStack host" | Add-Content $LogPath

    try
    {
        "Getting Win32_TPM object in namespace root\cimv2\security\microsofttpm" | Add-Content $LogPath
        $tpmWMIObject = Get-WmiObject -Namespace "root\cimv2\security\microsofttpm" -Class Win32_TPM
        if ($null -eq $tpmWMIObject) {
            throw "Failed to get WMI object Win32_TPM"
        }

        "Calling TPM method IsOwned() to check if TPM is properly owned" | Add-Content $LogPath
        $tpmIsOwnedRet = $tpmWMIObject.IsOwned()
        if ($null -eq $tpmIsOwnedRet) {
            throw "Failed call to tpm method IsOwned()"
        }

        if ($tpmIsOwnedRet.ReturnValue -ne 0) {
            throw "Failed call to tpm method IsOwned(). ReturnValue is $($tpmIsOwnedRet.ReturnValue)"
        }

        if ($tpmIsOwnedRet.IsOwned -eq $true) {
            "TPM IsOwned() method confirmed that TPM is owned. No need to explicitly call TPM method TakeOwnerShip()" | Add-Content $LogPath
            return
        }

        "TPM is NOT owned. Will explicitly call TPM method TakeOwnerShip()" | Add-Content $LogPath
        "Calling TPM method TakeOwnerShip()" | Add-Content $LogPath
        $tpmTakeOwnerShipRet = $tpmWMIObject.TakeOwnerShip()
        if ($null -eq $tpmTakeOwnerShipRet) {
            throw "Failed call to TPM method TakeOwnerShip()"
        }

        if ($tpmTakeOwnerShipRet.ReturnValue -ne 0) {
            throw "Failed call to TPM method TakeOwnerShip(). ReturnValue is $($tpmTakeOwnerShipRet.ReturnValue)"
        }

        "Calling TPM method IsOwned() to check if TPM is properly owned after calling TPM method TakeOwnerShip()" | Add-Content $LogPath
        $tpmIsOwnedRet = $tpmWMIObject.IsOwned()
        if ($null -eq $tpmIsOwnedRet) {
            throw "Failed call to tpm method IsOwned()"
        }

        if ($tpmIsOwnedRet.ReturnValue -ne 0) {
            throw "Failed call to tpm method IsOwned(). ReturnValue is $($tpmIsOwnedRet.ReturnValue)"
        }

        if ($tpmIsOwnedRet.IsOwned -eq $false) {
            throw "Failure: TPM method IsOwned() shows that TPM is NOT owned even after calling TPM method TakeOwnerShip()"
        }

        "TPM is now owned after calling TPM method TakeOwnerShip()" | Add-Content $LogPath
    }
    catch
    {
        "Azs host test TPM ownership did not complete. Exception: $($_.Exception)" | Add-Content $LogPath
        "Test TPM ownership did not complete becaue of the following error/warning: $($_.Exception.Message)" | Add-Content $LogPath
    }
}

# Function Clear-AzsHostTPM
# It is a precautionary mechanism to avoid issues with
# TPM. If TPM could not be cleared
# an error will be reported but deployment
# should proceed. A common reason for TPM not to be cleared
# is a host that requies user confirmation upon reboot.
# In this case an error will be reported but deployment
# should proceed
function Clear-AzsHostTPM
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string] $LogPath
    )

    $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop

    (Get-Date).ToString('yyyy/MM/dd HH:mm:ss') | Add-Content $LogPath
    "Clear TPM for AzureStack host" | Add-Content $LogPath

    try
    {
        "Retrieving a WMI object win32_TPM in namespace root\cimv2\security\microsofttpm" | Add-Content $LogPath
        $tpmWMIObject = Get-WmiObject -Namespace "root\cimv2\security\microsofttpm" -Class Win32_TPM
        if ($null -eq $tpmWMIObject) {
            throw "Aborting clear TPM. Failed to retrieve TPM WMI object. Make sure TPM is available and ready."
        }

        "Checking status of TPM" | Add-Content $LogPath
        if ((!$tpmWMIObject.IsActivated_InitialValue) -or (!$tpmWMIObject.IsEnabled_InitialValue)) {
            throw "Aborting clear TPM. TPM is either not activated or is not enabled"
        }

        "Testing TPM ownership. Calling Test-AzsHostTPMOwnership" | Add-Content $LogPath
        Test-AzsHostTPMOwnership -LogPath $LogPath

        "Retrieving a new WMI win32_TPM object after testing ownership in namespace root\cimv2\security\microsofttpm" | Add-Content $LogPath
        $tpmWMIObject = Get-WmiObject -Namespace "root\cimv2\security\microsofttpm" -Class Win32_TPM
        if ($null -eq $tpmWMIObject) {
            throw "Aborting clear TPM. Failed to retrieve TPM WMI object. Make sure TPM is available and ready."
        }

        "Starting process to clear TPM" | Add-Content $LogPath
        "Calling WMI TPM method GetPhysicalPresenceConfirmationStatus() with Operation input parameter set to 22 (Enable + Activate + Clear + Enable + Activate)" | Add-Content $LogPath
        $physicalPresenceConfRet = $tpmWMIObject.GetPhysicalPresenceConfirmationStatus(22)
        if ($null -eq $physicalPresenceConfRet) {
            throw "Aborting clear TPM. Failed call to WMI TPM method GetPhysicalPresenceConfirmationStatus()"
        }

        "Checking ReturnValue of WMI TPM method GetPhysicalPresenceConfirmationStatus()" | Add-Content $LogPath
        "ReturnValue of WMI TPM method GetPhysicalPresenceConfirmationStatus() is $($physicalPresenceConfRet.ReturnValue)" | Add-Content $LogPath
        if ($physicalPresenceConfRet.ReturnValue -ne 0) {
            throw "Aborting clear TPM. Failed call to TPM method GetPhysicalPresenceConfirmationStatus() with ReturnValue $($physicalPresenceConfRet.ReturnValue)"
        }

        "Checking ConfirmationStatus of WMI TPM method GetPhysicalPresenceConfirmationStatus()" | Add-Content $LogPath
        "ConfirmationStatus of WMI TPM method GetPhysicalPresenceConfirmationStatus() is $($physicalPresenceConfRet.ConfirmationStatus)" | Add-Content $LogPath
        if ($physicalPresenceConfRet.ConfirmationStatus -ne 4) {
            throw "Aborting clear TPM. Call to WMI TPM method GetPhysicalPresenceConfirmationStatus() returned ConfirmationStatus $($physicalPresenceConfRet.ConfirmationStatus). Host may require user intervention or BIOS change to enable clear TPM."
        }

        "Clearing TPM by calling WMI TPM method SetPhysicalPresenceRequest() with request input parameter set to 22 (Enable + Activate + Clear + Enable + Activate)" | Add-Content $LogPath
        $physicalPresenceRequestRet = $tpmWMIObject.SetPhysicalPresenceRequest(22)
        if ($null -eq $physicalPresenceRequestRet) {
            throw "Aborting clear TPM. Failed call to WMI TPM method SetPhysicalPresenceRequest()"
        }

        "Checking ReturnValue of WMI TPM method SetPhysicalPresenceRequest()" | Add-Content $LogPath
        "ReturnValue of WMI TPM method SetPhysicalPresenceRequest() is $($physicalPresenceRequestRet.ReturnValue)" | Add-Content $LogPath
        if ($physicalPresenceRequestRet.ReturnValue -ne 0) {
            throw "Aborting clear TPM. Failed call to WMI TPM method SetPhysicalPresenceRequest() with ReturnValue $($physicalPresenceRequestRet.ReturnValue)"
        }

        "Clearing host TPM configuration has completed. Changes will be applied after reboot" | Add-Content $LogPath
    }
    catch
    {
        "Azs host clear TPM did not complete. Exception: $($_.Exception)" | Add-Content $LogPath
        "Clear TPM did not complete becaue of the following error/warning: $($_.Exception.Message)" | Add-Content $LogPath
    }
}

Export-ModuleMember -Function Get-BootDiskConfigPath
Export-ModuleMember -Function Get-ComputerNameFromUnattend
Export-ModuleMember -Function Get-LocalSMBIOSGuid
Export-ModuleMember -Function Get-LogFilePath
Export-ModuleMember -Function Get-MACAddressOutputPath
Export-ModuleMember -Function Get-UnattendFilePath
Export-ModuleMember -Function Get-NodeSpecificRemoteUnattendPath
Export-ModuleMember -Function New-NetworkDrive
Export-ModuleMember -Function Set-Debugging
Export-ModuleMember -Function Set-DiskConfiguration
Export-ModuleMember -Function Set-HostVHDBoot
Export-ModuleMember -Function Set-HostPhysicalDiskBoot
Export-ModuleMember -Function Set-WinPEDeploymentPrerequisites
Export-ModuleMember -Function Test-IpAddressBetween
Export-ModuleMember -Function Clear-AzsHostTPM

# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIB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