AzStackHciUpgrade/AzStackHci.Upgrade.Helpers.psm1
Import-LocalizedData -BindingVariable luTxt -FileName AzStackHci.Upgrade.Strings.psd1 Import-Module $PSScriptRoot\..\AzStackHciHardware\AzStackHci.Hardware.Helpers.psm1 -Force -DisableNameChecking -Global function Test-AzureStackHCISubscriptionState { <# .SYNOPSIS Test Azure Stack HCI Subscription State .DESCRIPTION Test Azure Stack HCI Subscription State is Active .EXAMPLE PS C:\> Test-AzureStackHCISubscriptionState #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { $remoteOutput = @() $sb = { $subscriptions = @() $subscriptions = Invoke-Command -ScriptBlock { Get-AzureStackHCISubscriptionStatus } $azureStackHCISubscription = $subscriptions | Where-Object SubscriptionName -like "Azure Stack HCI*" if ($null -eq $azureStackHCISubscription -or @($azureStackHCISubscription).Count -eq 0) { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME SubscriptionFound = $false } } else { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME SubscriptionFound = $true SubscriptionStatus = $azureStackHCISubscription.Status } } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { if ($output.SubscriptionFound -eq $false) { $status = 'FAILURE' $detail = $luTxt.AzureStackHCISubscriptionNotFound -f $output.ComputerName Log-Info $detail -Type CRITICAL } elseif ($output.SubscriptionStatus.Value -ne 'Active') { $status = 'FAILURE' $detail = $luTxt.AzureStackHCISubscriptionNotActive -f $output.ComputerName Log-Info $detail -Type CRITICAL } else { $status = 'SUCCESS' $detail = $luTxt.AzureStackHCISubscriptionActive -f $output.ComputerName Log-Info $detail } $params = @{ Name = 'AzStackHci_Subscription_State' Title = 'Test Azure Stack HCI Subscription State' DisplayName = 'Test Azure Stack HCI Subscription State' Severity = 'CRITICAL' Description = 'Checking Azure Stack HCI Subscription is Active' Tags = @{} Remediation = 'https://aka.ms/UpgradeRequirements' TargetResourceID = 'AzureStackHCISubscription' TargetResourceName = 'AzureStackHCISubscription' TargetResourceType = 'Subscription' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $ENV:COMPUTERNAME Resource = 'Azure Stack HCI Subscription' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } catch { throw $_ } } function Test-RequiredWindowsVersionForUpgrade { <# .SYNOPSIS Test Windows OS is Supported .DESCRIPTION Test Windows OS is Supported .EXAMPLE PS C:\> Test-RequiredWindowsVersionForUpgrade Test Windows OS is supported on localhost. #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { Import-Module "$PsScriptRoot\..\AzStackHciSoftware\AzStackHci.Software.Helpers.psm1" -Force $OsVersion = GetOSVersion -PsSession $PsSession #region Check for 24H2 # Block 24H2 for 2505 $24H2InstanceResults = @() foreach ($os in $OsVersion) { $detail = $luTxt.UpgradeTest24H2NotInstalled -f $os.ComputerName, $os.OsVersion.Build if ($os.OsVersion.Build -ge 26100) { $status = 'FAILURE' Log-Info $detail -Type CRITICAL } else { $status = 'SUCCESS' Log-Info $detail } $params = @{ Name = 'AzStackHci_Upgrade_Test_24H2_Not_Installed' Title = 'Test 24H2 OS Build is not installed' DisplayName = 'Test 24H2 OS Build is not installed' Severity = 'CRITICAL' Description = 'Checking 24H2 OS Build is not installed' Tags = @{} Remediation = 'https://aka.ms/UpgradeRequirements' TargetResourceID = $os.ComputerName TargetResourceName = $os.ComputerName TargetResourceType = 'OperatingSystem' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $os.ComputerName Resource = 'OS Build' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $24H2InstanceResults += New-AzStackHciResultObject @params } if ('FAILURE' -in $24H2InstanceResults.Status) { # If any of the nodes has 24H2 installed, then we don't need to check for supported version. # We can return the results here. Log-Info "24H2 is installed on one or more nodes. Please remove 24H2 from all nodes." -ConsoleOut -Type CRITICAL return $24H2InstanceResults } #endregion $supportedVersion = Get-SupportOsVersion if ([string]::IsNullOrEmpty($supportedVersion)) { # Fall back to 23H2 greater and equal to 6B Log-Info "Unable to determine the supported version. Please ensure all nodes are fully patched up to date." -ConsoleOut -Type WARNING $supportedVersion = '10.0.25398.1663' } $instanceResults = Test-OSVersion -PsSession $PsSession -MinimumVersion $supportedVersion foreach ($instanceResult in $instanceResults) { $instanceResult.Name = 'AzStackHci_Upgrade_Windows_OS_Version' $instanceResult.Title = 'Test Windows OS is Supported' $instanceResult.DisplayName = 'Test Windows OS is Supported' $instanceResult.Description = 'Checking Windows OS is Supported' $instanceResult.Tags = @{} $instanceResult.Severity = 'CRITICAL' $instanceResult.Remediation = 'https://aka.ms/UpgradeRequirements' $instanceResult.TargetResourceID = $instanceResult.TargetResourceName $instanceResult.TargetResourceType = 'OS' $instanceResult.HealthCheckSource = $ENV:EnvChkrId } return $instanceResults } catch { throw $_ } } function Test-RequiredWindowsFeature { <# .SYNOPSIS Test if the required Windows feature is installed .DESCRIPTION Test if the required Windows feature is installed .EXAMPLE PS C:\> Test-RequiredWindowsFeature Test if the required Windows feature is installed on localhost. .EXAMPLE PS C:\> $Credential = Get-Credential -Message "Credential for $RemoteSystem" PS C:\> $RemoteSystemSession = New-PSSession -Computer #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { $remoteOutput = @() $sb = { # Can be dedup with windowsOptionalFeatureToCheck $windowsFeatureTocheck = @( "Failover-Clustering", "NetworkATC", "RSAT-AD-Powershell", "RSAT-Hyper-V-Tools", "Data-Center-Bridging", "NetworkVirtualization", "RSAT-AD-AdminCenter" ) $windowsOptionalFeatureToCheck = @( "Server-Core", "ServerManager-Core-RSAT", "ServerManager-Core-RSAT-Role-Tools", "ServerManager-Core-RSAT-Feature-Tools", "DataCenterBridging-LLDP-Tools", "Microsoft-Hyper-V", "Microsoft-Hyper-V-Offline", "Microsoft-Hyper-V-Online", "RSAT-Hyper-V-Tools-Feature", "Microsoft-Hyper-V-Management-PowerShell", "NetworkVirtualization", "RSAT-AD-Tools-Feature", "RSAT-ADDS-Tools-Feature", "DirectoryServices-DomainController-Tools", "ActiveDirectory-PowerShell", "DirectoryServices-AdministrativeCenter", "DNS-Server-Tools", "EnhancedStorage", "WCF-Services45", "WCF-TCP-PortSharing45", "NetworkController", "NetFx4ServerFeatures", "NetFx4", "MicrosoftWindowsPowerShellRoot", "MicrosoftWindowsPowerShell", "Server-Psh-Cmdlets", "KeyDistributionService-PSH-Cmdlets", "TlsSessionTicketKey-PSH-Cmdlets", "Tpm-PSH-Cmdlets", "FSRM-Infrastructure", "ServerCore-WOW64", "SmbDirect", "FailoverCluster-AdminPak", "Windows-Defender", "SMBBW", "FailoverCluster-FullServer", "FailoverCluster-PowerShell", "Microsoft-Windows-GroupPolicy-ServerAdminTools-Update", "DataCenterBridging", "BitLocker", "FileServerVSSAgent", "FileAndStorage-Services", "Storage-Services", "File-Services", "CoreFileServer", "SystemDataArchiver", "ServerCoreFonts-NonCritical-Fonts-MinConsoleFonts", "ServerCoreFonts-NonCritical-Fonts-BitmapFonts", "ServerCoreFonts-NonCritical-Fonts-TrueType", "ServerCoreFonts-NonCritical-Fonts-UAPFonts", "ServerCoreFonts-NonCritical-Fonts-Support", "ServerCore-Drivers-General", "ServerCore-Drivers-General-WOW64", "NetworkATC" ) $windowsFeatureNotInstalled = @() foreach ($featureName in $windowsFeatureToCheck) { if (-not (Get-WindowsFeature -Name $featureName | Where-Object InstallState -eq Installed)) { $windowsFeatureNotInstalled += $featureName } } $windowsOptionalFeatureNotEnabled = @() foreach ($featureName in $windowsOptionalFeatureToCheck) { if (-not (Get-WindowsOptionalFeature -Online -FeatureName $featureName | Where-Object State -eq Enabled)) { $windowsOptionalFeatureNotEnabled += $featureName } } return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME list = $windowsFeatureNotInstalled + $windowsOptionalFeatureNotEnabled result = ($windowsFeatureNotInstalled.Count -eq 0) -and ($windowsOptionalFeatureNotEnabled.Count -eq 0) } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { if ($output.result) { $status = 'SUCCESS' $detail = $luTxt.RequiredWindowsFeatureEnabled -f $output.ComputerName Log-Info $detail } else { $status = 'FAILURE' $featureList = ($output.list) -join ', ' $detail = $luTxt.RequiredWindowsFeatureNotEnabled -f $featureList, $output.ComputerName Log-Info $detail -Type CRITICAL } $params = @{ Name = 'AzStackHci_Required_Windows_Features' Title = 'Test Required Windows features' DisplayName = 'Test Required Windows features' Severity = 'Critical' Description = 'Checks that all nodes have the required Windows features installed' Tags = @{} Remediation = "https://aka.ms/UpgradeRequirements" TargetResourceID = $output.ComputerName TargetResourceName = $output.ComputerName TargetResourceType = 'Feature' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'Required Windows features ' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } catch { throw $_ } } function Test-NetworkAtcIntents { <# .SYNOPSIS Test the required Network ATC intents are present and in heathy state .DESCRIPTION Test the required Network ATC intents are present and in heathy state .EXAMPLE PS C:\> Test-NetworkAtcIntents Test the required Network ATC intents are present and in heathy state. .EXAMPLE PS C:\> $Credential = Get-Credential -Message "Credential for $RemoteSystem" PS C:\> $RemoteSystemSession = New-PSSession -Computer #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { $remoteOutput = @() $sb = { $networkATC = [bool](Get-WindowsFeature -Name NetworkATC | Where-Object InstallState -eq 'Installed') return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $networkATC } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $hasError = $false $instanceResults = @() foreach ($output in $remoteOutput) { if ($output.result) { $status = 'SUCCESS' $detail = $luTxt.NetworkAtcEnabled -f $output.ComputerName Log-Info $detail } else { $status = 'FAILURE' $hasError = $true $detail = $luTxt.NetworkAtcNotEnabled -f $output.ComputerName Log-Info $detail -Type CRITICAL } $params = @{ Name = 'AzStackHci_Upgrade_Test_NetworkATCFeature_Installed' Title = 'Test Network ATC feature is installed on the node' DisplayName = 'Test Network ATC feature is installed on the node' Severity = 'CRITICAL' Description = 'Checking Network ATC feature is enabled on the node' Tags = @{} Remediation = 'https://aka.ms/UpgradeNetworkATC' TargetResourceID = 'NetworkAtcFeature' TargetResourceName = 'NetworkAtcFeature' TargetResourceType = 'NetworkAtcFeature' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'Network ATC' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } # If there is a node that doesn't have Network ATC enabled, then the cluster won't have proper network ATC intents configured. So no need to check further. if ($hasError) { return $instanceResults } # Check if the Network ATC service is running on the nodes $remoteOutput = @() $sb = { $atcService = Get-Service NetworkATC -ErrorAction SilentlyContinue $atcServiceRunning = $atcService -and $atcService.Status -eq [System.ServiceProcess.ServiceControllerStatus]::Running return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $atcServiceRunning } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } foreach ($output in $remoteOutput) { if ($output.result) { $status = 'SUCCESS' $detail = $luTxt.NetworkAtcServiceRunning -f $output.ComputerName Log-Info $detail } else { $status = 'FAILURE' $detail = $luTxt.NetworkAtcServiceNotRunning -f $output.ComputerName Log-Info $detail -Type CRITICAL } $params = @{ Name = 'AzStackHci_Upgrade_Test_NetworkATCService_Running' Title = 'Test NetworkATC service is running on the node' DisplayName = 'Test NetworkATC service is running on the node' Severity = 'CRITICAL' Description = 'Checking NetworkATC service is running on the node' Tags = @{} Remediation = 'Make sure NetworkAtc service is running on the node. If not, start the service.' TargetResourceID = 'NetworkAtcService' TargetResourceName = 'NetworkAtcService' TargetResourceType = 'NetworkAtcService' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'Network ATC' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } # Check if the required Network ATC intents are present $remoteOutput = @() $sb = { $intents = Get-NetIntent -ErrorAction SilentlyContinue return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $intents } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $clusterNodesCount = (Get-ClusterNode).Count foreach ($output in $remoteOutput) { if ($null -eq $output.result) { $status = 'FAILURE' $detail = $luTxt.NetworkAtcIntentsNotPresent -f $output.ComputerName Log-Info $detail -Type CRITICAL $params = @{ Name = 'AzStackHci_Upgrade_Test_NetworkATCIntents_Present' Title = 'Test NetworkATC intents are present on the node' DisplayName = 'Test NetworkATC intents are present on the node' Severity = 'CRITICAL' Description = 'Checking NetworkATC intents are present on the node' Tags = @{} Remediation = 'Make sure NetworkATC intents are properly configured on the node.' TargetResourceID = 'NetworkAtcIntents' TargetResourceName = 'NetworkAtcIntents' TargetResourceType = 'NetworkAtcIntents' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'Network ATC' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } else { $outputResultString = $output.result | Out-String log-info "Get-NetIntent returned from node $($output.ComputerName) : $outputResultString" $isManagementIntentPresent = $output.result | Where-Object { $_.IsManagementIntentSet -eq $true } $isStorageIntentPresent = $output.result | Where-Object { $_.IsStorageIntentSet -eq $true } if (-not $isManagementIntentPresent) { $status = 'FAILURE' $detail = $luTxt.NetworkAtcManagementIntentNotPresent -f $output.ComputerName Log-Info $detail -Type CRITICAL $params = @{ Name = 'AzStackHci_Upgrade_Test_NetworkATCManagementIntent_Present' Title = 'Test NetworkATC management intent is present on the node' DisplayName = 'Test NetworkATC management intent is present on the node' Severity = 'CRITICAL' Description = 'Checking NetworkATC management intent is present on the node' Tags = @{} Remediation = 'Make sure NetworkATC management intent is properly configured on the node.' TargetResourceID = 'NetworkAtcManagementIntent' TargetResourceName = 'NetworkAtcManagementIntent' TargetResourceType = 'NetworkAtcManagementIntent' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'Network ATC' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } elseif (-not $isStorageIntentPresent -and $clusterNodesCount -gt 1) { $status = 'FAILURE' $detail = $luTxt.NetworkAtcStorageIntentNotPresent -f $output.ComputerName Log-Info $detail -Type CRITICAL $params = @{ Name = 'AzStackHci_Upgrade_Test_NetworkATCStorageIntent_Present' Title = 'Test NetworkATC storage intent is present on the node' DisplayName = 'Test NetworkATC storage intent is present on the node' Severity = 'CRITICAL' Description = 'Checking NetworkATC storage intent is present on the node' Tags = @{} Remediation = 'Make sure NetworkATC storage intent is properly configured on the node if it is multi-node HCI system.' TargetResourceID = 'NetworkAtcStorageIntent' TargetResourceName = 'NetworkAtcStorageIntent' TargetResourceType = 'NetworkAtcStorageIntent' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'Network ATC' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } else { $status = 'SUCCESS' $detail = $luTxt.NetworkAtcRequiredIntentsArePresent -f $output.ComputerName Log-Info $detail $params = @{ Name = 'AzStackHci_Upgrade_Test_NetworkATCRequiredIntents_Present' Title = 'Test NetworkATC required intents are present on the node' DisplayName = 'Test NetworkATC required intents are present on the node' Severity = 'CRITICAL' Description = 'Checking NetworkATC required intents are present on the node' Tags = @{} Remediation = 'https://aka.ms/UpgradeNetworkATC' TargetResourceID = 'NetworkAtcIntents' TargetResourceName = 'NetworkAtcIntents' TargetResourceType = 'NetworkAtcIntents' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'Network ATC' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } } } # check if the intents on the nodes are in healthy state $remoteOutput = @() $sb = { $stopWatch = [diagnostics.stopwatch]::StartNew() $intentStatus = $null # NetworkATC might doing drift detection (every 15 min), and intent status might be at "Validating" state for a while. # So we will wait for some time to make sure we can get expected Success/Completed status. while ($stopWatch.Elapsed.TotalSeconds -lt 1080) { [PSObject[]] $intentStatus = Get-NetIntentStatus -ErrorAction SilentlyContinue [PSObject[]] $notCompletedOrNotSuccessIntents = $intentStatus | Where-Object { $_.ConfigurationStatus -ne 'Success' -or $_.ProvisioningStatus -ne 'Completed' } [PSObject[]] $failedIntents = $intentStatus | Where-Object { $_.ConfigurationStatus -eq 'Failed' } if (($notCompletedOrNotSuccessIntents.Count -eq 0) -or ($failedIntents.Count -gt 0)) { break } Start-Sleep -seconds 5 } return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $intentStatus } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } foreach ($output in $remoteOutput) { $resultString = $output.result | Out-String log-info "Get-NetIntentStatus returned from node $($output.ComputerName) : $resultString" $failedIntents = $output.result | Where-Object { $_.ConfigurationStatus -ne 'Success' -or $_.ProvisioningStatus -ne 'Completed' } if ($null -ne $failedIntents) { $status = 'FAILURE' $detail = $luTxt.NetworkAtcIntentsStatusNotHealthy -f $output.ComputerName Log-Info $detail -Type CRITICAL $params = @{ Name = "AzStackHci_Upgrade_Test_NetworkATCIntent_HealthyState" Title = "Test NetworkAtc intent configuration and provisioning status" DisplayName = "Test NetworkAtc intent configuration and provisioning status" Severity = 'CRITICAL' Description = "Checking Test NetworkAtc intent configuration and provisioning status" Tags = @{} Remediation = "Use Get-NetIntentStatus cmdlet to check the status of the intent and take necessary action to fix the issue." TargetResourceID = "NetworkAtcIntents" TargetResourceName = "NetworkAtcIntents" TargetResourceType = "NetworkAtcIntents" Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = "NetworkAtcIntents" Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } elseif ($null -eq $output.result) { $status = 'FAILURE' $detail = $luTxt.NetworkAtcIntentsStatusNull -f $output.ComputerName Log-Info $detail -Type CRITICAL $params = @{ Name = "AzStackHci_Upgrade_Test_NetworkATCIntent_StatusNull" Title = "Test NetworkAtc intent configuration and provisioning status" DisplayName = "Test NetworkAtc intent configuration and provisioning status" Severity = 'CRITICAL' Description = "Checking Test NetworkAtc intent configuration and provisioning status" Tags = @{} Remediation = "Use Get-NetIntentStatus cmdlet to check the status of the intents and take necessary action to fix the issue." TargetResourceID = "NetworkAtcIntents" TargetResourceName = "NetworkAtcIntents" TargetResourceType = "NetworkAtcIntents" Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = "NetworkAtcIntents" Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } else { $status = 'SUCCESS' $detail = $luTxt.NetworkAtcIntentsHealthy -f $output.ComputerName Log-Info $detail $params = @{ Name = "AzStackHci_Upgrade_Test_NetworkATCIntent_HealthyState" Title = "Test NetworkAtc intent configuration and provisioning status" DisplayName = "Test NetworkAtc intent configuration and provisioning status" Severity = 'CRITICAL' Description = "Checking Test NetworkAtc intent configuration and provisioning status" Tags = @{} Remediation = 'https://aka.ms/UpgradeNetworkATC' TargetResourceID = "NetworkAtcIntents" TargetResourceName = "NetworkAtcIntents" TargetResourceType = "NetworkAtcIntents" Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = "NetworkAtcIntents" Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } } return $instanceResults } catch { throw $_ } } function Test-TPMHealth { [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { $results = @() $results += Test-TpmVersion -PsSession $PsSession $results += Test-TpmProperties -PsSession $PsSession $results += Test-TpmCertificates -PsSession $PsSession $results | % { $_.Name = $_.Name -replace 'Hardware','Upgrade' $_.Severity = 'WARNING' } return $results } catch { throw $_ } } function Test-BitlockerSuspension { <# .SYNOPSIS Test if bitlocker is enabled but not in suspended state. .DESCRIPTION Test if bitlocker is enabled but not in suspended state. .EXAMPLE PS C:\> function Test-BitlockerSuspension Test if bitlocker is enabled but not in suspended state for all volumes. .EXAMPLE PS C:\> $Credential = Get-Credential -Message "Credential for $RemoteSystem" PS C:\> $RemoteSystemSession = New-PSSession -Computer #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) $remoteOutput = @() try { $sb = { try { $volumes = $null try { $volumes = Get-BitLockerVolume } catch { # Return test result as True/Pass because we dont want to fail test if bitlocker feature is not available. return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME Details = "Could not fetch bitlocker volumes. Error: " + $_.Exception.Message error = $_.Exception.Message result = $true isBitlockerFeatureInstalled = $false } } $volumeDetails = "" $overallStatus = $true if($volumes) { $criticalVolumes = $volumes |? {$_.KeyProtector.KeyProtectorType -contains "Tpm"} foreach ($volume in $criticalVolumes) { # Get volume information $volumeInfo = Get-BitLockerVolume -MountPoint $volume.MountPoint $volumeMountPoint = $volumeInfo.MountPoint $volumeProtectionStatus = $volumeInfo.ProtectionStatus $volumeType = $volumeInfo.VolumeType # Check if BitLocker protection is enabled if($volumeInfo.ProtectionStatus -eq "On") { $overallStatus = $false } $volumeDetails += "Volume with mount point: $volumeMountPoint and type : $volumeType has a protection status of $volumeProtectionStatus. `n" } } else { $volumeDetails = "No bitlocker volumes found." } return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME Details = $volumeDetails result = $overallStatus } } catch { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME Details = $volumeDetails + $_.Exception.Message error = $_.Exception.Message result = $false } } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { Log-Info $output.Details if ($output.result -eq $true) { if(($output.isBitlockerFeatureInstalled -ne $null) -and ($output.isBitlockerFeatureInstalled -eq $false)) { $status = 'SUCCESS' $detail = $luTxt.BitlockerFeatureNotInstalled -f $output.ComputerName Log-Info $detail -Type CRITICAL } else { $status = 'SUCCESS' $detail = $luTxt.BitlockerEncryptedVolumesSuspended -f $output.ComputerName Log-Info $detail } } else { $status = 'FAILURE' $detail = $luTxt.BitlockerEncryptedVolumesNotSuspended -f $output.ComputerName Log-Info $detail -Type CRITICAL } $params = @{ Name = 'AzStackHci_Upgrade_BitlockerSuspension' Title = 'Test Bitlocker Suspension' DisplayName = 'Test Bitlocker Suspension' Severity = 'CRITICAL' Description = 'Checking if any volumes have bitlocker suspended.' Tags = @{} Remediation = 'https://aka.ms/UpgradeRequirements' TargetResourceID = $output.ComputerName TargetResourceName = $output.ComputerName TargetResourceType = 'Security' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'Bitlocker Suspension' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } catch { throw $_ } } function Test-WdacEnablement { <# .SYNOPSIS Test if WDAC is enabled .DESCRIPTION Test if WDAC is enabled .EXAMPLE PS C:\> function Test-WdacEnablement Test if WDAC is enabled on localhost. .EXAMPLE PS C:\> $Credential = Get-Credential -Message "Credential for $RemoteSystem" PS C:\> $RemoteSystemSession = New-PSSession -Computer #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { $remoteOutput = @() $sb = { # Bug 32694371: filter out policy files that cannot be applied $cipFiles = Get-ChildItem -Path "$env:SystemRoot\System32\CodeIntegrity\CiPolicies\Active" -Filter *.cip | Where-Object { $_.Name -imatch "^\{[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}\}\.cip$" } if ($cipFiles.Count -gt 0) { # Refresh the current policy and check if audit mode is enabled from the lastest event Invoke-CimMethod -Namespace 'root\Microsoft\Windows\CI' -ClassName 'PS_UpdateAndCompareCIPolicy' -MethodName 'Update' -Arguments @{FilePath = $cipFiles[0].FullName} | Out-Null $events = Get-WinEvent -LogName "Microsoft-Windows-CodeIntegrity/Operational" -ErrorAction SilentlyContinue $targetEvent = $events | Where-Object { ($_.Id -in @('3099','3096')) -and ($_.Message -imatch $cipFiles[0].BaseName) } | Sort-Object TimeCreated -Descending | Select-Object -First 1 $eventXml = [XML]$targetEvent.ToXml() $eventData = $eventXml.Event.EventData.Data $policyOptions = [System.Convert]::ToInt64($eventData[6].'#text', 16) # SYSTEM_INTEGRITY_POLICY_ENABLE_AUDIT_MODE 1 << 16 => 65536 $policyResult = (($policyOptions -band 65536) -eq 0) } else { # No WDAC policy file found $policyResult = $false } return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $policyResult } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { if ($output.result) { $status = 'FAILURE' $detail = $luTxt.WdacEnabled -f $output.ComputerName Log-Info $detail -Type CRITICAL } else { $status = 'SUCCESS' $detail = $luTxt.WdacNotEnabled -f $output.ComputerName Log-Info $detail } $params = @{ Name = 'AzStackHci_Upgrade_WDACEnablement' Title = 'Test WDAC Enablement' DisplayName = 'Test WDAC Enablement' Severity = 'CRITICAL' Description = 'Checking if WDAC is enabled' Tags = @{} Remediation = 'https://aka.ms/UpgradeRequirements' TargetResourceID = $output.ComputerName TargetResourceName = $output.ComputerName TargetResourceType = 'Security' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'WDAC Enablement' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } catch { throw $_ } } function Test-AzureSupportedCloudType { <# .SYNOPSIS Test if cluster is connected to Azure Public Cloud. .DESCRIPTION Upgrade is only supported for clusters connected to Azure Public Cloud. .EXAMPLE PS C:\> function Test-AzureSupportedCloudType .EXAMPLE #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) $sb= { try { if(Test-Path -Path "C:\Program Files\AzureConnectedMachineAgent\azcmagent.exe") { $overallStatus = $true $testDetails = "" $arcAgentStatus = Invoke-Expression -Command "& 'C:\Program Files\AzureConnectedMachineAgent\azcmagent.exe' show -j" # Parsing the status received from Arc agent $arcAgentStatusParsed = $arcAgentStatus | ConvertFrom-Json # Throw an error if the node is Arc enabled to any other cloud apart from Azure Public cloud. # Other supported values which are not supported for Upgrade : AzureUSGovernment , AzureChinaCloud if ([string]::IsNullOrEmpty($arcAgentStatusParsed.cloud)) { $overallStatus = $false $testDetails = "Unable to determine Azure cloud type. ARC Agent status read: [{0}]" -f $arcAgentStatus } elseif (($arcAgentStatusParsed.cloud -ne "AzureCloud")) { $overallStatus = $false $testDetails = "{0}: Arc Agent is connected to {1}: cloud, which is not supported for upgrade." -f $ENV:COMPUTERNAME,$arcAgentStatusParsed.cloud } } else { $overallStatus = $false $testDetails ="ARC agent installation cannot be found at : C:\Program Files\AzureConnectedMachineAgent\azcmagent.exe" } return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME Details = $testDetails result = $overallStatus } } catch { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME Details = $_.Exception.Message result = $false } } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { Log-Info $output.Details if ($output.result) { $status = 'SUCCESS' $detail = $luTxt.CloudSupported -f $output.ComputerName Log-Info $detail } else { $status = 'FAILURE' $detail = $luTxt.CloudNotSupported -f $output.ComputerName Log-Info $detail -Type CRITICAL } $params = @{ Name = 'AzStackHci_Upgrade_SupportedCloud' Title = 'Test Supported Cloud Type' DisplayName = 'Test Supported Cloud Type' Severity = 'CRITICAL' Description = 'Checking if any node is connected to an unsupported cloud' Tags = @{} Remediation = 'https://learn.microsoft.com/en-us/azure-stack/hci/concepts/system-requirements-23h2' TargetResourceID = $output.ComputerName TargetResourceName = $output.ComputerName TargetResourceType = 'Feature' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'Azure Cloud' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } function Test-AzureStackHCIRegistrationState { <# .SYNOPSIS Test if cluster registration state is connected. .DESCRIPTION Upgrade is only supported for clusters which are succesfully registered to azure. .EXAMPLE PS C:\> function Test-AzureStackHCIRegistrationState .EXAMPLE #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) $sb= { $severity = 'CRITICAL' try { $hciRegCmdlet = Get-Command Get-AzureStackHCI -Type Cmdlet -ErrorAction Ignore if($null -ne $hciRegCmdlet) { $overallStatus = $true $testDetails = "" $clusterRegistrationStatus = $(Get-AzureStackHCI) if ($null -eq $clusterRegistrationStatus) { $overallStatus = $false $testDetails = "Unable to determine Cluster registration status: [{0}]" -f $clusterRegistrationStatus } elseif ($clusterRegistrationStatus.RegistrationStatus -ne "Registered") { $overallStatus = $false $testDetails = "{0}: Cluster Registration status is: {1} , expected status: 'Registered'" -f $ENV:COMPUTERNAME,$clusterRegistrationStatus.RegistrationStatus } } else { $overallStatus = $false $testDetails ="Unable to find 'get-azurestackhci' cmdlet. Azure Stack HCI cluster registration status can only be checked on an Azure Stack HCI node." } return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME Details = $testDetails result = $overallStatus } } catch { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME Details = $_.Exception.Message result = $false } } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { Log-Info $output.Details if ($output.result) { $status = 'SUCCESS' $detail = $luTxt.CloudSupported -f $output.ComputerName Log-Info $detail } else { $status = 'FAILURE' $detail = $luTxt.CloudNotSupported -f $output.ComputerName Log-Info $detail -Type CRITICAL } $params = @{ Name = 'AzStackHci_Upgrade_ClusterRegistrationState' Title = 'Test Cluster Registration state' DisplayName = 'Test Cluster Registration state' Severity = 'CRITICAL' Description = 'Checking if the cluster is successfully registered to azure cloud' Tags = @{} Remediation = 'https://learn.microsoft.com/en-us/azure-stack/hci/concepts/system-requirements-23h2' TargetResourceID = $output.ComputerName TargetResourceName = $output.ComputerName TargetResourceType = 'Feature' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'Azure Cloud' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } function Test-AksHciInstallState { <# .SYNOPSIS Test Windows Deduplication is enabled .DESCRIPTION Test Windows Deduplication is enabled .EXAMPLE PS C:\> Test-WindowsDeduplication Test if Windows Deduplication is enabled on localhost. .EXAMPLE PS C:\> $Credential = Get-Credential -Message "Credential for $RemoteSystem" PS C:\> $RemoteSystemSession = New-PSSession -Computer #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { $remoteOutput = @() $sb = { Import-Module AksHci -ErrorAction SilentlyContinue $result = [bool](Get-Module AksHci) if($result) { try { $installState = (Get-AksHciConfig).AksHci.installState -ne "NotInstalled" if($installState) { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $false error = "AksHci is installed" } } } catch { #NOOP } } return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $true error = "" } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { if ($output.result) { $status = 'SUCCESS' $detail = $luTxt.AksHciNotInstalled -f $output.ComputerName Log-Info $detail } else { $status = 'FAILURE' $detail = $luTxt.AksHciInstalled -f $output.ComputerName Log-Info $detail -Type CRITICAL } $params = @{ Name = 'AzStackHci_Upgrade_AksHci' Title = 'Test AKS HCI install state' DisplayName = "Test AKS HCI install state on $($output.ComputerName)" Severity = 'CRITICAL' Description = 'Checking if AKS HCI is installed' Tags = @{} Remediation = 'https://aka.ms/UpgradeRequirements' TargetResourceID = $output.ComputerName TargetResourceName = $output.ComputerName TargetResourceType = 'Feature' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'AKS HCI' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } catch { throw $_ } } function Test-MocInstallState { <# .SYNOPSIS Test Windows Deduplication is enabled .DESCRIPTION Test Windows Deduplication is enabled .EXAMPLE PS C:\> Test-WindowsDeduplication Test if Windows Deduplication is enabled on localhost. .EXAMPLE PS C:\> $Credential = Get-Credential -Message "Credential for $RemoteSystem" PS C:\> $RemoteSystemSession = New-PSSession -Computer #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { $remoteOutput = @() $sb = { Import-Module Moc -ErrorAction SilentlyContinue $result = [bool](Get-Module Moc) if($result) { try { $installState = (Get-MocConfig).installState -ne "NotInstalled" if($installState) { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $false error = "Moc is installed" } } } catch { #NOOP } } return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $true error = "" } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { if ($output.result) { $status = 'SUCCESS' $detail = $luTxt.MocNotInstalled -f $output.ComputerName Log-Info $detail } else { $status = 'FAILURE' $detail = $luTxt.MocInstalled -f $output.ComputerName Log-Info $detail -Type CRITICAL } $params = @{ Name = 'AzStackHci_Upgrade_Moc' Title = 'Test MOC install state' DisplayName = "Test MOC install state on $($output.ComputerName)" Severity = 'CRITICAL' Description = 'Checking if MOC is installed' Tags = @{} Remediation = 'https://aka.ms/UpgradeRequirements' TargetResourceID = $output.ComputerName TargetResourceName = $output.ComputerName TargetResourceType = 'Feature' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'MOC' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } catch { throw $_ } } function Test-MocServicesInstallState { <# .SYNOPSIS Test Windows Deduplication is enabled .DESCRIPTION Test Windows Deduplication is enabled .EXAMPLE PS C:\> Test-WindowsDeduplication Test if Windows Deduplication is enabled on localhost. .EXAMPLE PS C:\> $Credential = Get-Credential -Message "Credential for $RemoteSystem" PS C:\> $RemoteSystemSession = New-PSSession -Computer #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { $remoteOutput = @() $sb = { $service = Get-Service -Name wssdcloudagent -ErrorAction SilentlyContinue if($null -ne $service) { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $false error = "wssdcloudagent service is running" } } $service = Get-Service -Name wssdagent -ErrorAction SilentlyContinue if($null -ne $service) { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $false error = "wssdagent service is running" } } $service = Get-Service -Name MocHostAgent -ErrorAction SilentlyContinue if($null -ne $service) { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $false error = "MocHostAgent service is running" } } return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME result = $true error = "" } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { if ($output.result) { $status = 'SUCCESS' $detail = $luTxt.MocServicesNotInstalled -f $output.ComputerName Log-Info $detail } else { $status = 'FAILURE' $detail = $luTxt.MocServicesInstalled -f $output.ComputerName Log-Info $detail -Type CRITICAL } $params = @{ Name = 'AzStackHci_Upgrade_MocServices' Title = 'Test MOC services running' DisplayName = "Test MOC services running on $($output.ComputerName)" Severity = 'CRITICAL' Description = 'Checking MOC services running state' Tags = @{} Remediation = 'https://aka.ms/UpgradeRequirements' TargetResourceID = $output.ComputerName TargetResourceName = $output.ComputerName TargetResourceType = 'Feature' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'MOC services' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } catch { throw $_ } } function Test-Language { <# .SYNOPSIS Test if the language is English-US #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { $remoteOutput = @() $sb = { $lang = Get-WinUserLanguageList return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME Language = $lang } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { Log-Info "Langauges on $($output.ComputerName) :" Log-Info ($output.Language | Out-String) if ($output.Language.LanguageTag -like 'en-*') { $status = 'SUCCESS' $detail = $luTxt.LanguageEnglishUS -f $output.ComputerName Log-Info $detail } else { $status = 'FAILURE' $detail = $luTxt.LanguageNotEnglishUS -f $output.ComputerName, $output.Language.LanguageTag Log-Info $detail -Type CRITICAL } $params = @{ Name = 'AzStackHci_Upgrade_Language' Title = 'Test Language is English' DisplayName = 'Test Language is English' Severity = 'CRITICAL' Description = 'Checking if the language is English' Tags = @{} Remediation = "https://aka.ms/UpgradeRequirements" TargetResourceID = $output.ComputerName TargetResourceName = $output.ComputerName TargetResourceType = 'Language' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = "Language: $($output.Language.LanguageTag)" Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } catch { throw $_ } } function Test-Storage { [CmdletBinding()] param () try { $results = @() $poolConfigXml = [xml]'<StoragePool><Volumes><Volume Name="Infrastructure_1" Size="256GB" MinNodeCount="1" ></Volume></Volumes></StoragePool>' $results += Invoke-AzStackHciStorageValidation -PoolConfigXml $poolConfigXml -PassThru $results | % { $_.Name = $_.Name -replace 'AzStackHci_Storage','AzStackHci_Upgrade' } return $results } catch { throw $_ } } function Test-LCMVersion { <# .SYNOPSIS Test if the LCM version meets the minimum requirement .DESCRIPTION Test if the LCM version meets the minimum requirement .EXAMPLE PS C:\> function Test-LCMVersion Test if the LCM version meets the minimum requirement #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { $remoteOutput = @() $sb = { $lcmControllerService = Get-CimInstance -ClassName Win32_Service | Where-Object { $_.Name -eq 'LcmController' } if ($lcmControllerService.State -eq "Running") { $lcmPathParts = $lcmControllerService.PathName -split '\\' $lcmNugetName = $lcmPathParts | Where-Object {$_ -like "Microsoft.AzureStack.Solution.LCMControllerWinService*"} if ($lcmNugetName -match '\.(\d+\.\d+\.\d+\.\d+)$') { $lcmVersion = $matches[1] } else { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME Details = "Fail to extract Controller service version." hasVersion = $false } } return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME lcmVersion = $lcmVersion hasVersion = $true } } else { return New-Object PSObject -Property @{ ComputerName = $ENV:COMPUTERNAME Details = "LCM Controller service is not in running state." hasVersion = $false } } } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { if ($output.hasVersion -eq $false) { $status = 'FAILURE' $detail = $luTxt.LCMVersionNotAvailable -f $output.ComputerName, $output.Details Log-Info $detail -Type CRITICAL } else { $minLcmVersion = "10.2408.0.537" Log-Info "LCM controllver minimum version requirement is $minLcmVersion" $lcmVersion = $output.lcmVersion Log-Info "LCM controllver version on $($output.ComputerName) : $lcmVersion" $minVersion = [System.Version]$minLcmVersion $version = [System.Version]$lcmVersion # Compare versions if ($version -ge $minVersion) { $status = 'SUCCESS' $detail = $luTxt.LCMVersionMeetMinRequirement -f $output.ComputerName, $lcmVersion, $minLcmVersion Log-Info $detail } else { $status = 'FAILURE' $detail = $luTxt.LCMVersionNotMeetMinRequirement -f $output.ComputerName, $lcmVersion, $minLcmVersion Log-Info $detail -Type CRITICAL } } $params = @{ Name = 'AzStackHci_Upgrade_Minimum_LCM_Version' Title = 'Test LCM Version meets minimum requirement' DisplayName = 'Test LCM Version meets minimum requirement' Severity = 'Critical' Description = 'Checks that all nodes have the minimum LCM version' Tags = @{} Remediation = "https://aka.ms/UpgradeRequirements" TargetResourceID = $output.ComputerName TargetResourceName = $output.ComputerName TargetResourceType = 'LCMService' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'LCM Version' Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } catch { throw $_ } } function Get-SupportOsVersion { try { Log-Info "Getting the supported OS version" $nugetPath = Get-ASArtifactPath -NugetName Microsoft.AzureStack.Solution.Deploy.ProductNugets $xmlPath = Join-Path -Path $nugetPath -ChildPath ProductNugets.xml Log-Info "Reading the xml file from $xmlPath" [xml]$xml = Get-Content -Path $xmlPath Log-info "Getting the OS version from the xml file $xmlPath" $osVersion = $xml| Select-Xml -XPath "//NuGetPackage[@Name='Microsoft.AzureStack.OSUpdates']" | Select-Object -ExpandProperty Node | Select-Object -ExpandProperty RequiredVersion Log-info "Found supported OS version: $osVersion" return $osVersion } catch { Log-Info "Failed to get the supported OS version. Error: $_" -Type WARNING } } function Test-FreeMemory { [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [System.Management.Automation.Runspaces.PSSession[]] $PsSession ) try { $RequiredMemoryGB = 8 # Required for ARB VM $severity = 'CRITICAL' $remoteOutput = @() $sb = { $AvailableMemoryGB = [System.Math]::Round((Get-WmiObject -Class Win32_OperatingSystem).FreePhysicalMemory * 1KB / 1GB,2) return (New-Object psobject -Property @{ AvailableMemoryGB = $AvailableMemoryGB ComputerName = $ENV:COMPUTERNAME } ) } if ($PsSession) { $remoteOutput += Invoke-Command -ScriptBlock $sb -Session $PsSession } else { $remoteOutput += Invoke-Command -ScriptBlock $sb } $instanceResults = @() foreach ($output in $remoteOutput) { $dtl = $luTxt.AvailableMemory -f $output.ComputerName, [System.Math]::Round($output.AvailableMemoryGB,2), ($RequiredMemoryGB) if ($output.AvailableMemoryGB -gt $RequiredMemoryGB) { $status = 'SUCCESS' Log-Info $dtl } else { $status = 'FAILURE' Log-Info $dtl -Type CRITICAL } $params = @{ Name = 'AzStackHci_Upgrade_FreeMemory' Title = 'Test Free Memory' DisplayName = 'Test Free Memory' Severity = $severity Description = 'Checking if there is enough free memory' Tags = @{} Remediation = 'https://aka.ms/UpgradeRequirements' TargetResourceID = $output.ComputerName TargetResourceName = $output.ComputerName TargetResourceType = 'Memory' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $output.ComputerName Resource = 'Memory' Detail = $dtl Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResults += New-AzStackHciResultObject @params } return $instanceResults } catch { throw $_ } } Export-ModuleMember -Function Test-* # SIG # Begin signature block # MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC01c5/NIm1AuEH # EV9m1RDXR8mmPTZl8ZZQoS+34vXymqCCDYUwggYDMIID66ADAgECAhMzAAAEA73V # lV0POxitAAAAAAQDMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQ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