Skip to content

Commit

Permalink
fix: avoid running Windows CSE multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
AbelHu committed Mar 13, 2024
1 parent 51a2a4d commit 336d656
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 29 deletions.
6 changes: 4 additions & 2 deletions parts/windows/kuberneteswindowssetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ $global:RebootNeeded = $false

# Extract cse helper script from ZIP
[io.file]::WriteAllBytes("scripts.zip", [System.Convert]::FromBase64String($zippedFiles))
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\" -Force

# Dot-source windowscsehelper.ps1 with functions that are called in this script
. c:\AzureData\windows\windowscsehelper.ps1
Expand Down Expand Up @@ -248,7 +248,7 @@ try
Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAndExpandCSEScriptPackageUrl" -TaskMessage "Start to get CSE scripts. CSEScriptsPackageUrl: $global:CSEScriptsPackageUrl"
$tempfile = 'c:\csescripts.zip'
DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows"
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" -Force
Remove-Item -Path $tempfile -Force

# Dot-source cse scripts with functions that are called in this script
Expand Down Expand Up @@ -488,6 +488,8 @@ finally
# Generate CSE result so it can be returned as the CSE response in csecmd.ps1
$ExecutionDuration=$(New-Timespan -Start $StartTime -End $(Get-Date))
Write-Log "CSE ExecutionDuration: $ExecutionDuration. ExitCode: $global:ExitCode"
# $CSEResultFilePath is used to avoid running CSE multiple times
Set-Content -Path $CSEResultFilePath -Value $global:ExitCode -Force
Logs-To-Event -TaskName "AKS.WindowsCSE.cse_main" -TaskMessage "ExitCode: $global:ExitCode. ErrorMessage: $global:ErrorMessage."
# Please not use Write-Log or Logs-To-Events after Stop-Transcript
Stop-Transcript
Expand Down
6 changes: 4 additions & 2 deletions pkg/agent/testdata/AKSWindows2019+CustomCloud/CustomData
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $global:RebootNeeded = $false

# Extract cse helper script from ZIP
[io.file]::WriteAllBytes("scripts.zip", [System.Convert]::FromBase64String($zippedFiles))
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\" -Force

# Dot-source windowscsehelper.ps1 with functions that are called in this script
. c:\AzureData\windows\windowscsehelper.ps1
Expand Down Expand Up @@ -244,7 +244,7 @@ try
Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAndExpandCSEScriptPackageUrl" -TaskMessage "Start to get CSE scripts. CSEScriptsPackageUrl: $global:CSEScriptsPackageUrl"
$tempfile = 'c:\csescripts.zip'
DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows"
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" -Force
Remove-Item -Path $tempfile -Force

# Dot-source cse scripts with functions that are called in this script
Expand Down Expand Up @@ -484,6 +484,8 @@ finally
# Generate CSE result so it can be returned as the CSE response in csecmd.ps1
$ExecutionDuration=$(New-Timespan -Start $StartTime -End $(Get-Date))
Write-Log "CSE ExecutionDuration: $ExecutionDuration. ExitCode: $global:ExitCode"
# $CSEResultFilePath is used to avoid running CSE multiple times
Set-Content -Path $CSEResultFilePath -Value $global:ExitCode -Force
Logs-To-Event -TaskName "AKS.WindowsCSE.cse_main" -TaskMessage "ExitCode: $global:ExitCode. ErrorMessage: $global:ErrorMessage."
# Please not use Write-Log or Logs-To-Events after Stop-Transcript
Stop-Transcript
Expand Down
6 changes: 4 additions & 2 deletions pkg/agent/testdata/AKSWindows2019+CustomVnet/CustomData
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $global:RebootNeeded = $false

# Extract cse helper script from ZIP
[io.file]::WriteAllBytes("scripts.zip", [System.Convert]::FromBase64String($zippedFiles))
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\" -Force

# Dot-source windowscsehelper.ps1 with functions that are called in this script
. c:\AzureData\windows\windowscsehelper.ps1
Expand Down Expand Up @@ -244,7 +244,7 @@ try
Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAndExpandCSEScriptPackageUrl" -TaskMessage "Start to get CSE scripts. CSEScriptsPackageUrl: $global:CSEScriptsPackageUrl"
$tempfile = 'c:\csescripts.zip'
DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows"
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" -Force
Remove-Item -Path $tempfile -Force

# Dot-source cse scripts with functions that are called in this script
Expand Down Expand Up @@ -478,6 +478,8 @@ finally
# Generate CSE result so it can be returned as the CSE response in csecmd.ps1
$ExecutionDuration=$(New-Timespan -Start $StartTime -End $(Get-Date))
Write-Log "CSE ExecutionDuration: $ExecutionDuration. ExitCode: $global:ExitCode"
# $CSEResultFilePath is used to avoid running CSE multiple times
Set-Content -Path $CSEResultFilePath -Value $global:ExitCode -Force
Logs-To-Event -TaskName "AKS.WindowsCSE.cse_main" -TaskMessage "ExitCode: $global:ExitCode. ErrorMessage: $global:ErrorMessage."
# Please not use Write-Log or Logs-To-Events after Stop-Transcript
Stop-Transcript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $global:RebootNeeded = $false

# Extract cse helper script from ZIP
[io.file]::WriteAllBytes("scripts.zip", [System.Convert]::FromBase64String($zippedFiles))
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\" -Force

# Dot-source windowscsehelper.ps1 with functions that are called in this script
. c:\AzureData\windows\windowscsehelper.ps1
Expand Down Expand Up @@ -244,7 +244,7 @@ try
Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAndExpandCSEScriptPackageUrl" -TaskMessage "Start to get CSE scripts. CSEScriptsPackageUrl: $global:CSEScriptsPackageUrl"
$tempfile = 'c:\csescripts.zip'
DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows"
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" -Force
Remove-Item -Path $tempfile -Force

# Dot-source cse scripts with functions that are called in this script
Expand Down Expand Up @@ -478,6 +478,8 @@ finally
# Generate CSE result so it can be returned as the CSE response in csecmd.ps1
$ExecutionDuration=$(New-Timespan -Start $StartTime -End $(Get-Date))
Write-Log "CSE ExecutionDuration: $ExecutionDuration. ExitCode: $global:ExitCode"
# $CSEResultFilePath is used to avoid running CSE multiple times
Set-Content -Path $CSEResultFilePath -Value $global:ExitCode -Force
Logs-To-Event -TaskName "AKS.WindowsCSE.cse_main" -TaskMessage "ExitCode: $global:ExitCode. ErrorMessage: $global:ErrorMessage."
# Please not use Write-Log or Logs-To-Events after Stop-Transcript
Stop-Transcript
Expand Down
6 changes: 4 additions & 2 deletions pkg/agent/testdata/AKSWindows2019+K8S116/CustomData
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $global:RebootNeeded = $false

# Extract cse helper script from ZIP
[io.file]::WriteAllBytes("scripts.zip", [System.Convert]::FromBase64String($zippedFiles))
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\" -Force

# Dot-source windowscsehelper.ps1 with functions that are called in this script
. c:\AzureData\windows\windowscsehelper.ps1
Expand Down Expand Up @@ -244,7 +244,7 @@ try
Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAndExpandCSEScriptPackageUrl" -TaskMessage "Start to get CSE scripts. CSEScriptsPackageUrl: $global:CSEScriptsPackageUrl"
$tempfile = 'c:\csescripts.zip'
DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows"
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" -Force
Remove-Item -Path $tempfile -Force

# Dot-source cse scripts with functions that are called in this script
Expand Down Expand Up @@ -478,6 +478,8 @@ finally
# Generate CSE result so it can be returned as the CSE response in csecmd.ps1
$ExecutionDuration=$(New-Timespan -Start $StartTime -End $(Get-Date))
Write-Log "CSE ExecutionDuration: $ExecutionDuration. ExitCode: $global:ExitCode"
# $CSEResultFilePath is used to avoid running CSE multiple times
Set-Content -Path $CSEResultFilePath -Value $global:ExitCode -Force
Logs-To-Event -TaskName "AKS.WindowsCSE.cse_main" -TaskMessage "ExitCode: $global:ExitCode. ErrorMessage: $global:ErrorMessage."
# Please not use Write-Log or Logs-To-Events after Stop-Transcript
Stop-Transcript
Expand Down
6 changes: 4 additions & 2 deletions pkg/agent/testdata/AKSWindows2019+K8S117/CustomData
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $global:RebootNeeded = $false

# Extract cse helper script from ZIP
[io.file]::WriteAllBytes("scripts.zip", [System.Convert]::FromBase64String($zippedFiles))
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\" -Force

# Dot-source windowscsehelper.ps1 with functions that are called in this script
. c:\AzureData\windows\windowscsehelper.ps1
Expand Down Expand Up @@ -244,7 +244,7 @@ try
Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAndExpandCSEScriptPackageUrl" -TaskMessage "Start to get CSE scripts. CSEScriptsPackageUrl: $global:CSEScriptsPackageUrl"
$tempfile = 'c:\csescripts.zip'
DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows"
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" -Force
Remove-Item -Path $tempfile -Force

# Dot-source cse scripts with functions that are called in this script
Expand Down Expand Up @@ -478,6 +478,8 @@ finally
# Generate CSE result so it can be returned as the CSE response in csecmd.ps1
$ExecutionDuration=$(New-Timespan -Start $StartTime -End $(Get-Date))
Write-Log "CSE ExecutionDuration: $ExecutionDuration. ExitCode: $global:ExitCode"
# $CSEResultFilePath is used to avoid running CSE multiple times
Set-Content -Path $CSEResultFilePath -Value $global:ExitCode -Force
Logs-To-Event -TaskName "AKS.WindowsCSE.cse_main" -TaskMessage "ExitCode: $global:ExitCode. ErrorMessage: $global:ErrorMessage."
# Please not use Write-Log or Logs-To-Events after Stop-Transcript
Stop-Transcript
Expand Down
6 changes: 4 additions & 2 deletions pkg/agent/testdata/AKSWindows2019+K8S118/CustomData
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $global:RebootNeeded = $false

# Extract cse helper script from ZIP
[io.file]::WriteAllBytes("scripts.zip", [System.Convert]::FromBase64String($zippedFiles))
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\" -Force

# Dot-source windowscsehelper.ps1 with functions that are called in this script
. c:\AzureData\windows\windowscsehelper.ps1
Expand Down Expand Up @@ -244,7 +244,7 @@ try
Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAndExpandCSEScriptPackageUrl" -TaskMessage "Start to get CSE scripts. CSEScriptsPackageUrl: $global:CSEScriptsPackageUrl"
$tempfile = 'c:\csescripts.zip'
DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows"
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" -Force
Remove-Item -Path $tempfile -Force

# Dot-source cse scripts with functions that are called in this script
Expand Down Expand Up @@ -478,6 +478,8 @@ finally
# Generate CSE result so it can be returned as the CSE response in csecmd.ps1
$ExecutionDuration=$(New-Timespan -Start $StartTime -End $(Get-Date))
Write-Log "CSE ExecutionDuration: $ExecutionDuration. ExitCode: $global:ExitCode"
# $CSEResultFilePath is used to avoid running CSE multiple times
Set-Content -Path $CSEResultFilePath -Value $global:ExitCode -Force
Logs-To-Event -TaskName "AKS.WindowsCSE.cse_main" -TaskMessage "ExitCode: $global:ExitCode. ErrorMessage: $global:ErrorMessage."
# Please not use Write-Log or Logs-To-Events after Stop-Transcript
Stop-Transcript
Expand Down
6 changes: 4 additions & 2 deletions pkg/agent/testdata/AKSWindows2019+K8S119+CSI/CustomData
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $global:RebootNeeded = $false

# Extract cse helper script from ZIP
[io.file]::WriteAllBytes("scripts.zip", [System.Convert]::FromBase64String($zippedFiles))
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\" -Force

# Dot-source windowscsehelper.ps1 with functions that are called in this script
. c:\AzureData\windows\windowscsehelper.ps1
Expand Down Expand Up @@ -244,7 +244,7 @@ try
Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAndExpandCSEScriptPackageUrl" -TaskMessage "Start to get CSE scripts. CSEScriptsPackageUrl: $global:CSEScriptsPackageUrl"
$tempfile = 'c:\csescripts.zip'
DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows"
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" -Force
Remove-Item -Path $tempfile -Force

# Dot-source cse scripts with functions that are called in this script
Expand Down Expand Up @@ -478,6 +478,8 @@ finally
# Generate CSE result so it can be returned as the CSE response in csecmd.ps1
$ExecutionDuration=$(New-Timespan -Start $StartTime -End $(Get-Date))
Write-Log "CSE ExecutionDuration: $ExecutionDuration. ExitCode: $global:ExitCode"
# $CSEResultFilePath is used to avoid running CSE multiple times
Set-Content -Path $CSEResultFilePath -Value $global:ExitCode -Force
Logs-To-Event -TaskName "AKS.WindowsCSE.cse_main" -TaskMessage "ExitCode: $global:ExitCode. ErrorMessage: $global:ErrorMessage."
# Please not use Write-Log or Logs-To-Events after Stop-Transcript
Stop-Transcript
Expand Down
6 changes: 4 additions & 2 deletions pkg/agent/testdata/AKSWindows2019+K8S119+FIPS/CustomData
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $global:RebootNeeded = $false

# Extract cse helper script from ZIP
[io.file]::WriteAllBytes("scripts.zip", [System.Convert]::FromBase64String($zippedFiles))
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\" -Force

# Dot-source windowscsehelper.ps1 with functions that are called in this script
. c:\AzureData\windows\windowscsehelper.ps1
Expand Down Expand Up @@ -244,7 +244,7 @@ try
Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAndExpandCSEScriptPackageUrl" -TaskMessage "Start to get CSE scripts. CSEScriptsPackageUrl: $global:CSEScriptsPackageUrl"
$tempfile = 'c:\csescripts.zip'
DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows"
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" -Force
Remove-Item -Path $tempfile -Force

# Dot-source cse scripts with functions that are called in this script
Expand Down Expand Up @@ -478,6 +478,8 @@ finally
# Generate CSE result so it can be returned as the CSE response in csecmd.ps1
$ExecutionDuration=$(New-Timespan -Start $StartTime -End $(Get-Date))
Write-Log "CSE ExecutionDuration: $ExecutionDuration. ExitCode: $global:ExitCode"
# $CSEResultFilePath is used to avoid running CSE multiple times
Set-Content -Path $CSEResultFilePath -Value $global:ExitCode -Force
Logs-To-Event -TaskName "AKS.WindowsCSE.cse_main" -TaskMessage "ExitCode: $global:ExitCode. ErrorMessage: $global:ErrorMessage."
# Please not use Write-Log or Logs-To-Events after Stop-Transcript
Stop-Transcript
Expand Down
6 changes: 4 additions & 2 deletions pkg/agent/testdata/AKSWindows2019+K8S119/CustomData
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $global:RebootNeeded = $false

# Extract cse helper script from ZIP
[io.file]::WriteAllBytes("scripts.zip", [System.Convert]::FromBase64String($zippedFiles))
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\" -Force

# Dot-source windowscsehelper.ps1 with functions that are called in this script
. c:\AzureData\windows\windowscsehelper.ps1
Expand Down Expand Up @@ -244,7 +244,7 @@ try
Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAndExpandCSEScriptPackageUrl" -TaskMessage "Start to get CSE scripts. CSEScriptsPackageUrl: $global:CSEScriptsPackageUrl"
$tempfile = 'c:\csescripts.zip'
DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows"
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" -Force
Remove-Item -Path $tempfile -Force

# Dot-source cse scripts with functions that are called in this script
Expand Down Expand Up @@ -478,6 +478,8 @@ finally
# Generate CSE result so it can be returned as the CSE response in csecmd.ps1
$ExecutionDuration=$(New-Timespan -Start $StartTime -End $(Get-Date))
Write-Log "CSE ExecutionDuration: $ExecutionDuration. ExitCode: $global:ExitCode"
# $CSEResultFilePath is used to avoid running CSE multiple times
Set-Content -Path $CSEResultFilePath -Value $global:ExitCode -Force
Logs-To-Event -TaskName "AKS.WindowsCSE.cse_main" -TaskMessage "ExitCode: $global:ExitCode. ErrorMessage: $global:ErrorMessage."
# Please not use Write-Log or Logs-To-Events after Stop-Transcript
Stop-Transcript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $global:RebootNeeded = $false

# Extract cse helper script from ZIP
[io.file]::WriteAllBytes("scripts.zip", [System.Convert]::FromBase64String($zippedFiles))
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\" -Force

# Dot-source windowscsehelper.ps1 with functions that are called in this script
. c:\AzureData\windows\windowscsehelper.ps1
Expand Down Expand Up @@ -244,7 +244,7 @@ try
Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAndExpandCSEScriptPackageUrl" -TaskMessage "Start to get CSE scripts. CSEScriptsPackageUrl: $global:CSEScriptsPackageUrl"
$tempfile = 'c:\csescripts.zip'
DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows"
Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" -Force
Remove-Item -Path $tempfile -Force

# Dot-source cse scripts with functions that are called in this script
Expand Down Expand Up @@ -478,6 +478,8 @@ finally
# Generate CSE result so it can be returned as the CSE response in csecmd.ps1
$ExecutionDuration=$(New-Timespan -Start $StartTime -End $(Get-Date))
Write-Log "CSE ExecutionDuration: $ExecutionDuration. ExitCode: $global:ExitCode"
# $CSEResultFilePath is used to avoid running CSE multiple times
Set-Content -Path $CSEResultFilePath -Value $global:ExitCode -Force
Logs-To-Event -TaskName "AKS.WindowsCSE.cse_main" -TaskMessage "ExitCode: $global:ExitCode. ErrorMessage: $global:ErrorMessage."
# Please not use Write-Log or Logs-To-Events after Stop-Transcript
Stop-Transcript
Expand Down
Loading

0 comments on commit 336d656

Please sign in to comment.