private/BootMedia/Steps/Step-BootImageDismSettings.ps1
|
#Requires -PSEdition Core function Step-BootImageDismSettings { <# .SYNOPSIS Sets timezone, international, and input locale settings via dism.exe. .NOTES Author: David Segura Version: 0.1.0 #> [CmdletBinding()] param () $MountPath = $global:BuildMedia.MountPath $LogsPath = $global:BuildMedia.LogsPath $SetTimeZone = $global:BuildMedia.SetTimeZone $SetAllIntl = $global:BuildMedia.SetAllIntl $SetInputLocale = $global:BuildMedia.SetInputLocale Write-Verbose "[$($MyInvocation.MyCommand.Name)] MountPath: $MountPath" Write-OSDeployCoreProgress "Set-TimeZone to $SetTimeZone" $CurrentLog = "$LogsPath\$((Get-Date).ToString('yyMMdd-HHmmss'))-Set-TimeZone.log" dism.exe /quiet /image:"$MountPath" /Set-TimeZone:"$SetTimeZone" /LogPath:"$CurrentLog" Write-OSDeployCoreProgress 'Log current Get-Intl configuration' $CurrentLog = "$LogsPath\$((Get-Date).ToString('yyMMdd-HHmmss'))-Get-Intl.log" dism.exe /quiet /image:"$MountPath" /Get-Intl /LogPath:"$CurrentLog" if ($SetAllIntl) { Write-OSDeployCoreProgress "Set-AllIntl to $SetAllIntl" $CurrentLog = "$LogsPath\$((Get-Date).ToString('yyMMdd-HHmmss'))-Set-AllIntl.log" dism.exe /quiet /image:"$MountPath" /Set-AllIntl:$SetAllIntl /LogPath:"$CurrentLog" } if ($SetInputLocale) { Write-OSDeployCoreProgress "Set-InputLocale to $SetInputLocale" $CurrentLog = "$LogsPath\$((Get-Date).ToString('yyMMdd-HHmmss'))-Set-InputLocale.log" dism.exe /quiet /image:"$MountPath" /Set-InputLocale:$SetInputLocale /LogPath:"$CurrentLog" } } |