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
# MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIB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