Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions src/StackHCI/StackHCI.Autorest/custom/stackhci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,22 @@ function Confirm-UserAcknowledgmentToUpgradeOS {
[Microsoft.Azure.PowerShell.Cmdlets.StackHCI.DoNotExportAttribute()]
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')]
param(
[Parameter(Mandatory=$true)]
[Parameter(Mandatory=$false)]
[System.Management.Automation.Runspaces.PSSession]
$ClusterNodeSession
)

$osVersionDetectoid = { $displayVersion = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").DisplayVersion; $buildNumber = (Get-CimInstance -ClassName CIM_OperatingSystem).BuildNumber; New-Object -TypeName PSObject -Property @{'DisplayVersion'=$displayVersion; 'BuildNumber'=$buildNumber} }
$osVersionInfo = Invoke-Command -Session $clusterNodeSession -ScriptBlock $osVersionDetectoid

if ($ClusterNodeSession)
{
$osVersionInfo = Invoke-Command -Session $ClusterNodeSession -ScriptBlock $osVersionDetectoid
}
else
{
$osVersionInfo = & $osVersionDetectoid
}

$isOSVersion22H2 = ([Int]::Parse($osVersionInfo.BuildNumber) -le $22H2BuildNumber)

$doNotAbort = $true
Expand Down Expand Up @@ -6042,7 +6051,7 @@ param(
try
{

$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails
$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails -newSession $false
Confirm-UserAcknowledgmentToUpgradeOS -ClusterNodeSession $clusterNodeSession

$LogFilePrefix = "AddAzStackHCIVMAttestation"
Expand Down Expand Up @@ -6238,7 +6247,7 @@ param(

try
{
$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails
$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails -newSession $false
Confirm-UserAcknowledgmentToUpgradeOS -ClusterNodeSession $clusterNodeSession

$LogFilePrefix = "RemoveAzStackHCIVMAttestation"
Expand Down Expand Up @@ -6366,7 +6375,7 @@ param(
{
try
{
$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails
$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails -newSession $false
Confirm-UserAcknowledgmentToUpgradeOS -ClusterNodeSession $clusterNodeSession

$getImdsOutputList = [System.Collections.ArrayList]::new()
Expand Down Expand Up @@ -6533,7 +6542,7 @@ function Invoke-DeploymentModuleDownload{
$retryCount = 3
try
{
$_, $IsClusterRegistered, $clusterNodeSession, $_ = Get-SetupLoggingDetails
$_, $IsClusterRegistered, $clusterNodeSession, $_ = Get-SetupLoggingDetails -newSession $false
Setup-Logging -LogFilePrefix "AzStackHCIRemoteSupport" -DebugEnabled ($DebugPreference -ne "SilentlyContinue") -ClusterNodeSession $clusterNodeSession -IsClusterRegistered $IsClusterRegistered | Out-Null

if ($Null -ne $clusterNodeSession)
Expand Down Expand Up @@ -6572,7 +6581,7 @@ function Install-DeployModule {
$ModuleName
)

$_, $IsClusterRegistered, $clusterNodeSession, $_ = Get-SetupLoggingDetails
$_, $IsClusterRegistered, $clusterNodeSession, $_ = Get-SetupLoggingDetails -newSession $false
Setup-Logging -LogFilePrefix "AzStackHCIRemoteSupportInstallModule" -DebugEnabled ($DebugPreference -ne "SilentlyContinue") -ClusterNodeSession $clusterNodeSession -IsClusterRegistered $IsClusterRegistered | Out-Null

if ($Null -ne $clusterNodeSession)
Expand Down Expand Up @@ -6612,7 +6621,7 @@ function Install-AzStackHCIRemoteSupport{
[OutputType([Boolean])]
param()

$_, $IsClusterRegistered, $clusterNodeSession, $_ = Get-SetupLoggingDetails
$_, $IsClusterRegistered, $clusterNodeSession, $_ = Get-SetupLoggingDetails -newSession $false

Confirm-UserAcknowledgmentToUpgradeOS -ClusterNodeSession $clusterNodeSession

Expand Down Expand Up @@ -6652,7 +6661,7 @@ function Remove-AzStackHCIRemoteSupport{
[OutputType([Boolean])]
param()

$_, $IsClusterRegistered, $clusterNodeSession, $_ = Get-SetupLoggingDetails
$_, $IsClusterRegistered, $clusterNodeSession, $_ = Get-SetupLoggingDetails -newSession $false
Confirm-UserAcknowledgmentToUpgradeOS -ClusterNodeSession $clusterNodeSession
Setup-Logging -LogFilePrefix "AzStackHCIRemoteSupportRemove" -DebugEnabled ($DebugPreference -ne "SilentlyContinue") -ClusterNodeSession $clusterNodeSession -IsClusterRegistered $IsClusterRegistered | Out-Null
if ($Null -ne $clusterNodeSession)
Expand Down Expand Up @@ -6720,7 +6729,7 @@ function Enable-AzStackHCIRemoteSupport{
$AgreeToRemoteSupportConsent
)

$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails
$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails -newSession $false
Confirm-UserAcknowledgmentToUpgradeOS -ClusterNodeSession $clusterNodeSession

if ($AgreeToRemoteSupportConsent -ne $true)
Expand Down Expand Up @@ -6767,7 +6776,7 @@ function Disable-AzStackHCIRemoteSupport{
[OutputType([Boolean])]
param()

$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails
$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails -newSession $false
Confirm-UserAcknowledgmentToUpgradeOS -ClusterNodeSession $clusterNodeSession

$agentInstallType = (Get-ItemProperty -Path "HKLM:\SYSTEM\Software\Microsoft\AzureStack\Observability\RemoteSupport" -ErrorAction SilentlyContinue).InstallType
Expand Down Expand Up @@ -6815,7 +6824,7 @@ function Get-AzStackHCIRemoteSupportAccess{
$IncludeExpired
)

$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails
$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails -newSession $false
Confirm-UserAcknowledgmentToUpgradeOS -ClusterNodeSession $clusterNodeSession

$agentInstallType = (Get-ItemProperty -Path "HKLM:\SYSTEM\Software\Microsoft\AzureStack\Observability\RemoteSupport" -ErrorAction SilentlyContinue).InstallType
Expand Down Expand Up @@ -6917,7 +6926,7 @@ function Get-AzStackHCIRemoteSupportSessionHistory{
$FromDate = (Get-Date).AddDays(-7)
)

$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails
$_, $_, $clusterNodeSession, $_ = Get-SetupLoggingDetails -newSession $false
Confirm-UserAcknowledgmentToUpgradeOS -ClusterNodeSession $clusterNodeSession

$agentInstallType = (Get-ItemProperty -Path "HKLM:\SYSTEM\Software\Microsoft\AzureStack\Observability\RemoteSupport" -ErrorAction SilentlyContinue).InstallType
Expand Down
1 change: 1 addition & 0 deletions src/StackHCI/StackHCI/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Resolved double hop authentication issue.

## Version 2.6.2
* Preannounced breaking changes. Please refer to https://go.microsoft.com/fwlink/?linkid=2333229
Expand Down