@@ -28,6 +28,7 @@ The Azure Stack Development Kit installer UI script is based on PowerShell and t
2828
2929# region Text
3030$Text_Generic = @ {}
31+ $Text_Generic.Version = " 1.0.06"
3132$Text_Generic.Password_NotMatch = " Passwords do not match"
3233$Text_Generic.Regex_Fqdn = " <yourtenant.onmicrosoft.com> can only contain A-Z, a-z, 0-9, dots and a hyphen"
3334$Text_Generic.Regex_Computername = " Computername must be 15 characters or less and can only contain A-Z, a-z, 0-9 and a hyphen"
@@ -543,7 +544,11 @@ $Xaml = @'
543544 <Grid>
544545 <DockPanel LastChildFill="True" >
545546 <StackPanel DockPanel.Dock="Left" Width="550" HorizontalAlignment="Left" Margin="50,0,0,0" >
546- <TextBlock FontSize="24" FontFamily="Segoe UI Light" Foreground="#EBEBEB" Margin="0,25,0,0" Text="Microsoft Azure Stack" />
547+ <StackPanel Orientation="Horizontal" Margin="0,25,0,0">
548+ <TextBlock FontSize="24" FontFamily="Segoe UI Light" Foreground="#EBEBEB" Text="Microsoft Azure Stack" />
549+ <TextBlock FontSize="11.5" FontFamily="Segoe UI Light" Foreground="#EBEBEB" Margin="210,3,0,0" Text="Installer UI version: " />
550+ <TextBlock x:Name="Control_Header_Tbl_Version" FontSize="11.5" FontFamily="Segoe UI Light" Foreground="#FF4590CE" Margin="0,3,0,0" />
551+ </StackPanel>
547552 <TextBlock FontSize="44" FontFamily="Segoe UI Light" Foreground="#EBEBEB" Text="Development Kit" />
548553 <TextBlock x:Name="Control_Header_Tbl_Title" FontSize="20" FontFamily="Segoe UI" Foreground="#EBEBEB" Margin="0,50,0,30" Text="Title" />
549554 <!--#region Mode-->
@@ -836,6 +841,10 @@ $xaml.SelectNodes("//*[@*[contains(translate(name(.),'n','N'),'Name')]]") | Wher
836841# endregion
837842
838843# region Data
844+ # region Version
845+ $syncHash.Control_Header_Tbl_Version.Text = $Text_Generic.Version
846+ # endregion
847+
839848# region AuthEndpoints
840849$AuthEndpoints = @ {
841850 ' Azure Cloud' = @ {
@@ -1301,66 +1310,64 @@ Write-Host "." -NoNewline -ForegroundColor Cyan
13011310
13021311# Get environment details
13031312# CloudBuilder
1304- if (test-path " C:\CloudDeployment\Setup\InstallAzureStackPOC.ps1" ) {
1305-
1306- if (! (test-path " C:\CloudDeployment\ECEngine\EnterpriseCloudEngine.psd1" )){
1307- # Deployment not initialized
1308- $Script :Initialized = " CloudBuilder_Install"
1309- $syncHash.Control_Header_Tbl_Title.Text = $Text_Install.Mode_Title
1310- $syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Install.Mode_LeftTitle
1311- $syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Install.Mode_LeftContent
1312- }
1313- else {
1314- # Import module to check current deployment status
1315- Import-Module " C:\CloudDeployment\ECEngine\EnterpriseCloudEngine.psd1" - Force - Verbose:$false
1316- $actionProgress = Get-ActionProgress - ActionType Deployment
1317- # Deployment not started
1318- if (! ($actionProgress )){
1313+ if (test-path " C:\CloudDeployment\Setup\InstallAzureStackPOC.ps1" ) {
1314+ if (! (test-path " C:\CloudDeployment\ECEngine\EnterpriseCloudEngine.psd1" )){
1315+ # Deployment not initialized
13191316 $Script :Initialized = " CloudBuilder_Install"
13201317 $syncHash.Control_Header_Tbl_Title.Text = $Text_Install.Mode_Title
13211318 $syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Install.Mode_LeftTitle
13221319 $syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Install.Mode_LeftContent
13231320 }
1324- # Deployment in progress
1325- elseif ($actionProgress.LastAttribute.Value -eq ' InProgress' ){
1326- # Not deployed with deployment UI
1327- if (! (test-path " C:\CloudDeployment\Rerun\config.xml" )){
1328- New-Item C:\CloudDeployment\Rerun - type directory - Force
1329- ' <config status="rerun" run="0"/>' | Out-File C:\CloudDeployment\Rerun\config.xml
1330- $Script :Initialized = " CloudBuilder_Rerun"
1331- $syncHash.Control_Header_Tbl_Title.Text = $Text_Rerun.Mode_Title
1332- $syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Rerun.Mode_LeftTitle
1333- $syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Rerun.Mode_LeftContent
1334- }
1335- # Deployed with deployment UI
1336- else {
1337- $Status = [XML ](Get-Content " C:\CloudDeployment\Rerun\config.xml" )
1338- # Contains only 1 or 2 deployment logs
1339- if ($status.config.status -eq " Rerun" -and [int ]$status.config.run -le 2 ){
1321+ else {
1322+ # Import module to check current deployment status
1323+ Import-Module " C:\CloudDeployment\ECEngine\EnterpriseCloudEngine.psd1" - Force - Verbose:$false
1324+ $actionProgress = Get-ActionProgress - ActionType Deployment
1325+ # Deployment not started
1326+ if (! ($actionProgress )){
1327+ $Script :Initialized = " CloudBuilder_Install"
1328+ $syncHash.Control_Header_Tbl_Title.Text = $Text_Install.Mode_Title
1329+ $syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Install.Mode_LeftTitle
1330+ $syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Install.Mode_LeftContent
1331+ }
1332+ # Deployment completed successfully
1333+ elseif ($actionProgress.Attribute (" Status" ).Value -eq ' Success' ){
1334+ $Script :Initialized = " CloudBuilder_Completed_GatherLogs"
1335+ $syncHash.Control_Header_Tbl_Title.Text = $Text_Completed.Mode_Title
1336+ $syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Completed.Mode_LeftTitle
1337+ $syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Completed.Mode_LeftContent
1338+ }
1339+ # Deployment in progress or stopped
1340+ else {
1341+ # Not deployed with deployment UI
1342+ if (! (test-path " C:\CloudDeployment\Rerun\config.xml" )){
1343+ New-Item C:\CloudDeployment\Rerun - type directory - Force
1344+ ' <config status="rerun" run="0"/>' | Out-File C:\CloudDeployment\Rerun\config.xml
13401345 $Script :Initialized = " CloudBuilder_Rerun"
13411346 $syncHash.Control_Header_Tbl_Title.Text = $Text_Rerun.Mode_Title
13421347 $syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Rerun.Mode_LeftTitle
13431348 $syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Rerun.Mode_LeftContent
1344- }
1345- # Contains 2 or more deplployment logs
1349+ }
1350+ # Deployed with deployment UI
13461351 else {
1347- $Script :Initialized = " CloudBuilder_Rerun_GatherLogs"
1348- $syncHash.Control_Header_Tbl_Title.Text = $Text_Rerun.Mode_Title_Logs
1349- $syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Rerun.Mode_LeftTitle_Logs
1350- $syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Rerun.Mode_LeftContent_Logs
1352+ $Status = [XML ](Get-Content " C:\CloudDeployment\Rerun\config.xml" )
1353+ # Contains only 1 or 2 deployment logs
1354+ if ($status.config.status -eq " Rerun" -and [int ]$status.config.run -le 2 ){
1355+ $Script :Initialized = " CloudBuilder_Rerun"
1356+ $syncHash.Control_Header_Tbl_Title.Text = $Text_Rerun.Mode_Title
1357+ $syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Rerun.Mode_LeftTitle
1358+ $syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Rerun.Mode_LeftContent
1359+ }
1360+ # Contains 2 or more deployment logs
1361+ else {
1362+ $Script :Initialized = " CloudBuilder_Rerun_GatherLogs"
1363+ $syncHash.Control_Header_Tbl_Title.Text = $Text_Rerun.Mode_Title_Logs
1364+ $syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Rerun.Mode_LeftTitle_Logs
1365+ $syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Rerun.Mode_LeftContent_Logs
13511366 }
13521367 }
13531368 }
1354- else {
1355- # Deployment completed
1356- $Script :Initialized = " CloudBuilder_Completed_GatherLogs"
1357- $syncHash.Control_Header_Tbl_Title.Text = $Text_Completed.Mode_Title
1358- $syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Completed.Mode_LeftTitle
1359- $syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Completed.Mode_LeftContent
13601369 }
13611370
1362- }
1363-
13641371 # Reboot options
13651372 F_Reboot_Options
13661373 $syncHash.Control_Mode_Tbl_RightTitle.Text = $Text_Install.Mode_RightTitle
@@ -1679,6 +1686,10 @@ If ($synchash.Control_NetConfig_Tbx_TimeServer.Text.Length -gt 0){
16791686 $InstallScript += " -TimeServer "
16801687 $InstallScript += $synchash.Control_NetConfig_Tbx_TimeServer.Text
16811688 }
1689+ Else {
1690+ $InstallScript += " -TimeServer "
1691+ $InstallScript += " pool.ntp.org"
1692+ }
16821693
16831694$syncHash.Control_Summary_Tbx_Content1.Text = $InstallScript
16841695
@@ -1753,6 +1764,9 @@ Function F_Install {
17531764 If ($synchash.Control_NetConfig_Tbx_TimeServer.Text.Length -gt 0 ){
17541765 ' -TimeServer "' + $synchash.Control_NetConfig_Tbx_TimeServer.Text + ' "' | Add-Content $filepath - NoNewline
17551766 }
1767+ Else {
1768+ ' -TimeServer "' + ' pool.ntp.org' + ' "' | Add-Content $filepath - NoNewline
1769+ }
17561770
17571771 # endregion
17581772
@@ -1764,7 +1778,7 @@ Function F_Install {
17641778 # endregion Rerun Count
17651779
17661780 # region Install
1767- Start-Process powershell $filepath
1781+ Start-Process powershell - ArgumentList " -noexit " , " -file $filepath "
17681782 # endregion
17691783
17701784}
0 commit comments