@@ -5563,8 +5563,12 @@ function Install-AzStackHCIRemoteSupport{
5563
5563
param ()
5564
5564
5565
5565
Setup- Logging - LogFilePrefix " AzStackHCIRemoteSupportInstall" - DebugEnabled ($DebugPreference -ne " SilentlyContinue" )
5566
- if (Assert-IsObservabilityStackPresent ){
5567
- Write-InfoLog (" Install-AzStackHCIRemoteSupport is not available." )
5566
+
5567
+ $agentInstallType = (Get-ItemProperty - Path " HKLM:\SYSTEM\Software\Microsoft\AzureStack\Observability\RemoteSupport" - ErrorAction SilentlyContinue).InstallType
5568
+ $observabilityStackPresent = Assert-IsObservabilityStackPresent
5569
+
5570
+ if ($observabilityStackPresent -or ($agentInstallType -eq " ArcExtension" )){
5571
+ Write-InfoLog (" Install-AzStackHCIRemoteSupport is not available. Observability Stack Present: <$observabilityStackPresent >. Agent install type: <$agentInstallType >" )
5568
5572
}
5569
5573
else {
5570
5574
Install-DeployModule - ModuleName " Microsoft.AzureStack.Deployment.RemoteSupport"
@@ -5590,8 +5594,11 @@ function Remove-AzStackHCIRemoteSupport{
5590
5594
param ()
5591
5595
5592
5596
Setup- Logging - LogFilePrefix " AzStackHCIRemoteSupportRemove" - DebugEnabled ($DebugPreference -ne " SilentlyContinue" )
5593
- if (Assert-IsObservabilityStackPresent ){
5594
- Write-InfoLog (" Remove-AzStackHCIRemoteSupport is not available." )
5597
+ $agentInstallType = (Get-ItemProperty - Path " HKLM:\SYSTEM\Software\Microsoft\AzureStack\Observability\RemoteSupport" - ErrorAction SilentlyContinue).InstallType
5598
+ $observabilityStackPresent = Assert-IsObservabilityStackPresent
5599
+
5600
+ if ($observabilityStackPresent -or ($agentInstallType -eq " ArcExtension" )){
5601
+ Write-InfoLog (" Remove-AzStackHCIRemoteSupport is not available. Observability Stack Present: <$observabilityStackPresent >. Agent install type: <$agentInstallType >" )
5595
5602
}
5596
5603
else {
5597
5604
Install-DeployModule - ModuleName " Microsoft.AzureStack.Deployment.RemoteSupport"
@@ -5659,7 +5666,10 @@ function Enable-AzStackHCIRemoteSupport{
5659
5666
}
5660
5667
}
5661
5668
5662
- if (Assert-IsObservabilityStackPresent ){
5669
+ $agentInstallType = (Get-ItemProperty - Path " HKLM:\SYSTEM\Software\Microsoft\AzureStack\Observability\RemoteSupport" - ErrorAction SilentlyContinue).InstallType
5670
+ $observabilityStackPresent = Assert-IsObservabilityStackPresent
5671
+
5672
+ if ($observabilityStackPresent -or ($agentInstallType -eq " ArcExtension" )){
5663
5673
Import-Module DiagnosticsInitializer - Force
5664
5674
Enable-RemoteSupport - AccessLevel $AccessLevel - ExpireInMinutes $ExpireInMinutes - SasCredential $SasCredential - AgreeToRemoteSupportConsent:$AgreeToRemoteSupportConsent
5665
5675
}
@@ -5687,7 +5697,10 @@ function Disable-AzStackHCIRemoteSupport{
5687
5697
[CmdletBinding (SupportsShouldProcess )]
5688
5698
[OutputType ([Boolean ])]
5689
5699
param ()
5690
- if (Assert-IsObservabilityStackPresent ){
5700
+ $agentInstallType = (Get-ItemProperty - Path " HKLM:\SYSTEM\Software\Microsoft\AzureStack\Observability\RemoteSupport" - ErrorAction SilentlyContinue).InstallType
5701
+ $observabilityStackPresent = Assert-IsObservabilityStackPresent
5702
+
5703
+ if ($observabilityStackPresent -or ($agentInstallType -eq " ArcExtension" )){
5691
5704
Import-Module DiagnosticsInitializer - Force
5692
5705
Disable-RemoteSupport
5693
5706
}
@@ -5729,7 +5742,10 @@ function Get-AzStackHCIRemoteSupportAccess{
5729
5742
$IncludeExpired
5730
5743
)
5731
5744
5732
- if (Assert-IsObservabilityStackPresent ){
5745
+ $agentInstallType = (Get-ItemProperty - Path " HKLM:\SYSTEM\Software\Microsoft\AzureStack\Observability\RemoteSupport" - ErrorAction SilentlyContinue).InstallType
5746
+ $observabilityStackPresent = Assert-IsObservabilityStackPresent
5747
+
5748
+ if ($observabilityStackPresent -or ($agentInstallType -eq " ArcExtension" )){
5733
5749
Import-Module DiagnosticsInitializer - Force
5734
5750
Get-RemoteSupportAccess - IncludeExpired:$IncludeExpired
5735
5751
}
@@ -5820,7 +5836,10 @@ function Get-AzStackHCIRemoteSupportSessionHistory{
5820
5836
$FromDate = (Get-Date ).AddDays(-7 )
5821
5837
)
5822
5838
5823
- if (Assert-IsObservabilityStackPresent ){
5839
+ $agentInstallType = (Get-ItemProperty - Path " HKLM:\SYSTEM\Software\Microsoft\AzureStack\Observability\RemoteSupport" - ErrorAction SilentlyContinue).InstallType
5840
+ $observabilityStackPresent = Assert-IsObservabilityStackPresent
5841
+
5842
+ if ($observabilityStackPresent -or ($agentInstallType -eq " ArcExtension" )){
5824
5843
Import-Module DiagnosticsInitializer - Force
5825
5844
Get-RemoteSupportSessionHistory - SessionId $SessionId - FromDate $FromDate - IncludeSessionTranscript:$IncludeSessionTranscript
5826
5845
}
0 commit comments