<# .SYNOPSIS Short description This installer UI simplifies the preperation and deployment of the Azure Stack Development Kit .DESCRIPTION The Azure Stack Development Kit installer UI provides a UI with the following features - Prepare the SafeOS for deployment - Prepare the Azure Stack Development Kit Installation - Rerun and Gather Logs - Reboot to SafeOS .EXAMPLE .\asdk-installer.ps1 .NOTES To install the Azure Stack Development Kit you require - A physical server that meets the requirements - The SafeOS must be running Windows Server 2016 or Windows 10 - The latest cloudbuilder.vhdx - The installer UI script The Azure Stack Development Kit installer UI script is based on PowerShell and the Windows Presentation Foundation. It is published in this public repository so you can make improvements to it by submitting a pull request. #> #requires –runasadministrator #region Text $Text_Generic = @{} $Text_Generic.Version = "1.0.13" $Text_Generic.Password_NotMatch = "Passwords do not match" $Text_Generic.Regex_Fqdn = " can only contain A-Z, a-z, 0-9, dots and a hyphen" $Text_Generic.Regex_Computername = "Computername must be 15 characters or less and can only contain A-Z, a-z, 0-9 and a hyphen" $Text_Generic.Regex_IpAddress = "Ip Address must be specified in the x.x.x.x format" $Text_Generic.Regex_IpAddressCidr = "Ip Address must be specified in the x.x.x.x/x format" $Text_Generic.Regex_LocalAdmin = "The specified password does not match the current local administrator password" $Text_SafeOS = @{} $Text_SafeOS.Mode_Title = "Prepare for Deployment" $Text_SafeOS.Mode_LeftTitle = "Prepare Environment" $Text_SafeOS.Mode_LeftContent = "Prepare the Cloudbuilder vhdx" $Text_SafeOS.Mode_TopRightTitle = "Online documentation" $Text_SafeOS.Mode_TopRightContent = "Read the online documentation." $Text_SafeOS.Prepare_Title = "Select Cloudbuilder vhdx" $Text_SafeOS.Prepare_VHDX_IsMounted = "This vhdx is already mounted" $Text_SafeOS.Prepare_VHDX_InvalidPath = "Not a valid Path" $Text_SafeOS.Prepare_Drivers_InvalidPath = "Not a valid Path" $Text_SafeOS.Unattend_Title = "Optional settings" $Text_SafeOS.NetInterface_Title = "Select Network Interface for the Azure Stack host" $Text_SafeOS.NetInterface_Warning = "Select the network interface that will be configured for the host of the Azure Stack Development Kit. Ensure you have network connectivity to the selected network adapter before proceeding." $Text_SafeOS.NetConfig_Title = "Azure Stack host IP configuration" $Text_SafeOS.Job_Title = "Preparing the environment" $Text_SafeOS.Summary_Content = "The cloudbuilder vhdx is prepared succesfully. Please reboot. The server will boot from the CloudBuilder VHD and you can start the installation after signing in as the administrator." $Text_SafeOS.Mode_TopRightLink = "https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-run-powershell-script" $Text_SafeOS.OS_Version = "The SafeOS must be running Windows Server 2016 or Windows 10 to use the ASDK Installer. Consider upgrading the SafeOS or use PowerShell to install the ASDK https://docs.microsoft.com/en-us/azure/azure-stack/asdk/asdk-deploy-powershell" $Text_Install = @{} $Text_Install.Mode_Title = "Installation" $Text_Install.Mode_LeftTitle = "Install" $Text_Install.Mode_LeftContent = "Install the Microsoft Azure Stack Development Kit" $Text_Install.Mode_BottomRightTitle = "Recover" $Text_Install.Mode_BottomRightContent = "Install the Micrsoft Azure Stack Deployment Kit in cloud recovery mode." $Text_Install.Mode_TopRightTitle = "Reboot" $Text_Install.Mode_TopRightContent = "Select the Operating System to override the default boot order for this reboot." $Text_Install.Reboot_Title = "Reboot" $Text_Install.NetInterface_Title = "Select Network Interface for the Azure Stack host" $Text_Install.NetInterface_Warning = "Only one adapter can be used for the Azure Stack Development Kit host. Select the adapter used for the deployment. All other adapters will be disabled by the installer. Ensure you have network connectivity to the selected network adapter before proceeding." $Text_Install.NetConfig_Title = "Network Configuration" $Text_Install.Credentials_Title = "Specify Identity Provider and Credentials" $Text_Install.Restore_Title = "Backup settings" $Text_Install.Summary_Title = "Summary" $Text_Install.Summary_Content = "The following script will be used for deploying the Development Kit" $Text_Install.Summary_Warning = "You will be prompted for your Azure AD credentials 2-3 minutes after the installation starts" $Text_Install.Job_Title = "Verifying network interface card properties" $Text_Rerun = @{} $Text_Rerun.Mode_Title = "Rerun Installation" $Text_Rerun.Mode_LeftTitle = "Rerun Installation" $Text_Rerun.Mode_LeftContent = "Rerun the current Microsoft Azure Stack Developement Kit deployment from where it failed" $Text_Rerun.Mode_Title_Logs = "Gather Logs" $Text_Rerun.Mode_LeftTitle_Logs = "Gather Logs" $Text_Rerun.Mode_LeftContent_Logs = "Gather the Azure Stack deployment log files" $Text_Rerun.Summary_Title = "Rerun" $Text_Rerun.Summary_Content = "Click Rerun to resume the current Microsoft Azure Stack Developement Kit deployment from where it failed" $Text_Rerun.Summary_Title_Logs = "Gather Logs" $Text_Rerun.Summary_Content_Logs = "Gather the Azure Stack log files and save to c:\AzureStackLogs" $Text_Completed = @{} $Text_Completed.Mode_Title = "Installation completed" $Text_Completed.Mode_LeftTitle = "Gather Logs" $Text_Completed.Mode_LeftContent = "Gather the Azure Stack deployment log files" $Text_Completed.Summary_Title = "Gather Logs" $Text_Completed.Summary_Content = "Gather the Azure Stack log files and save to c:\AzureStackLogs" #endregion Text #region XAML $Xaml = @'