Skip to content

Commit fe4c506

Browse files
authored
[StackHCI] Shared/generation/stackhci (#19951)
* update stackhci.ps1 * update stackhci.ps1
1 parent f2feb70 commit fe4c506

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/StackHCI/custom/stackhci.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4886,6 +4886,7 @@ function Install-DeployModule {
48864886
$ModuleName
48874887
)
48884888

4889+
Setup-Logging -LogFilePrefix "AzStackHCIRemoteSupportInstallModule" -DebugEnabled ($DebugPreference -ne "SilentlyContinue")
48894890
if(Get-Module | Where-Object { $_.Name -eq $ModuleName }){
48904891
Write-InfoLog("$ModuleName is loaded already ...")
48914892
}
@@ -4917,7 +4918,8 @@ function Install-AzStackHCIRemoteSupport{
49174918
[CmdletBinding(SupportsShouldProcess)]
49184919
[OutputType([Boolean])]
49194920
param()
4920-
4921+
4922+
Setup-Logging -LogFilePrefix "AzStackHCIRemoteSupportInstall" -DebugEnabled ($DebugPreference -ne "SilentlyContinue")
49214923
if(Assert-IsObservabilityStackPresent){
49224924
Write-InfoLog("Install-AzStackHCIRemoteSupport is not available.")
49234925
}
@@ -4944,6 +4946,7 @@ function Remove-AzStackHCIRemoteSupport{
49444946
[OutputType([Boolean])]
49454947
param()
49464948

4949+
Setup-Logging -LogFilePrefix "AzStackHCIRemoteSupportRemove" -DebugEnabled ($DebugPreference -ne "SilentlyContinue")
49474950
if(Assert-IsObservabilityStackPresent){
49484951
Write-InfoLog("Remove-AzStackHCIRemoteSupport is not available.")
49494952
}
@@ -5097,10 +5100,11 @@ function Assert-IsObservabilityStackPresent{
50975100
[OutputType([Boolean])]
50985101
param()
50995102

5103+
Setup-Logging -LogFilePrefix "AzStackHCIRemoteSupportObsStackPresent" -DebugEnabled ($DebugPreference -ne "SilentlyContinue")
51005104
try{
51015105
$obsService = Get-Service -Name "*Observability RemoteSupportAgent*" -ErrorAction SilentlyContinue
51025106
$deviceType = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\AzureStack" -ErrorAction SilentlyContinue).DeviceType
5103-
if($obsService -or $deviceType -eq "AzureEdge"){
5107+
if($null -ne $obsService -or $deviceType -eq "AzureEdge"){
51045108
Write-InfoLog("AzureStack device type is AzureEdge.")
51055109
return $true
51065110
}

0 commit comments

Comments
 (0)