Obs/bin/SBRPClient/content/Microsoft.AzureStack.Diagnostics.SupportService.psm1

<###################################################
 # #
 # Copyright (c) Microsoft. All rights reserved. #
 # #
 ##################################################>


if (Test-Path "$PSScriptRoot\bin")
{
    # Loaded from WindowsPowerShell\Modules
    $clientBinaryDirectory = "$PSScriptRoot\bin"
}
elseif (Test-Path "$PSScriptRoot\..\lib\net46")
{
    # Loaded from NugetStore
    $clientBinaryDirectory = "$PSScriptRoot\..\lib\net46"
}
elseif (Test-Path "$PSScriptRoot\..\..\lib")
{
    # Loaded from NugetStore : used in Remote Support
    $clientBinaryDirectory = "$PSScriptRoot\..\..\lib"
}
elseif (Test-Path "$PSScriptRoot\..\lib")
{
    # Loaded from NugetStore : used in Log Collection
    $clientBinaryDirectory = "$PSScriptRoot\..\lib"
}
else
{
    throw "Unknown $PSScriptRoot"
}

Write-Verbose  "Client Binary resolved to - [$clientBinaryDirectory], All the binaries will be loaded from here" -Verbose

Add-Type -Path "$clientBinaryDirectory\Newtonsoft.Json.dll" -ErrorAction Stop -Verbose:$false | Out-Null
Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.SupportBridge.LogCollector.Client.Contract.dll" -ErrorAction Stop -Verbose:$false | Out-Null
Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.SupportBridge.LogCollector.Client.dll" -ErrorAction Stop -Verbose:$false | Out-Null
Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.SupportBridge.LogCollector.Client.Models.dll" -ErrorAction Stop -Verbose:$false | Out-Null
Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.Common.Operations.Contract.dll" -ErrorAction Stop -Verbose:$false | Out-Null
Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.SupportBridge.Management.Client.Contract.dll" -ErrorAction Stop -Verbose:$false | Out-Null
Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.SupportBridge.Management.Client.dll" -ErrorAction Stop -Verbose:$false | Out-Null
Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.SupportBridge.Mgmt.Client.Models.dll" -ErrorAction Stop -Verbose:$false | Out-Null
Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.Common.Infrastructure.ServiceRegistry.ServiceTypeRegistry.dll" -ErrorAction Stop -Verbose:$false | Out-Null

function Create-SupportControllerClientWithApplicationGateway
{
    [CmdletBinding()]
    Param(
      [Parameter(Mandatory = $false, ValueFromPipeline = $true)]
      [string]
      $Endpoint = 'https://ASAppGateway:4443'
    )
    # Create Instance of Support Controller Client Object.
    [System.TimeSpan] $defaultDelay = [System.TimeSpan]::FromSeconds(5)
    [System.TimeSpan] $maxRetryTime = [System.TimeSpan]::FromSeconds(30)
        
    #Create Instance with gateway resolver.
    $subrControllerClient = [Microsoft.AzureStack.SupportBridge.LogCollector.Client.LogCollectorClientFactory]::CreateGatewayInstance($Endpoint, $defaultDelay, $maxRetryTime)
    return $subrControllerClient
}

# This works while reaching out to SUBR from other VM's where SF is installed and SDN is working
# as this requires VIP name resolution.
function Create-SupportControllerClientWithServiceResolver {
    [CmdletBinding()]
    Param([string[]]$clientConnectionEndpoints = 'ASSRSFClient:19000' )

    #Bugfix: Bug 3140655: Accessing ERCS VM Fails With "Unable to load DLL 'FabricClient.dll'"
    $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine")

    Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.Common.Infrastructure.ServiceDiscovery.ServiceFabric.Contract.dll" -ErrorAction Stop -Verbose:$false | Out-Null
    Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.Common.Infrastructure.ServiceDiscovery.ServiceFabric.dll" -ErrorAction Stop -Verbose:$false | Out-Null
    Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.Common.Infrastructure.ServiceRegistry.ServiceFabricTypeRegistry.dll" -ErrorAction Stop -Verbose:$false | Out-Null

    $resolver = [Microsoft.AzureStack.Common.Infrastructure.ServiceDiscovery.ServiceFabric.ServiceResolverFactory]::CreateServiceResolver(
        [Microsoft.AzureStack.Common.Infrastructure.ServiceRegistry.ServiceFabricTypeRegistry.ServiceFabricTypes]::TypeMap, $clientConnectionEndpoints)

    # Create Instance of Support Controller Client Object.
    [System.TimeSpan] $defaultDelay = [System.TimeSpan]::FromSeconds(5)
    [System.TimeSpan] $maxRetryTime = [System.TimeSpan]::FromSeconds(60)

    #Create Instance with gateway resolver.
    $subrControllerClient = [Microsoft.AzureStack.SupportBridge.LogCollector.Client.LogCollectorClientFactory]::CreateInstanceUsingServiceResolver($resolver, $defaultDelay, $maxRetryTime)
    return $subrControllerClient
}

# This works when service is running as WinSvC locally on the node.
function Create-LogCollectorClienttWithLocalServiceResolver {

    $serviceId = [System.Guid]"754dbc04-8f91-4cb6-a10f-899dac573fa0"
    $serviceUri = [System.Uri]'http://localhost:7345'
    $dict = New-Object "System.Collections.Generic.Dictionary``2[System.Guid,System.Uri]"
    $dict.Add($serviceId, $serviceUri)

    # Create Instance of Support Controller Client Object.
    [System.TimeSpan] $defaultDelay = [System.TimeSpan]::FromSeconds(5)
    [System.TimeSpan] $maxRetryTime = [System.TimeSpan]::FromSeconds(60)

    Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.Common.Infrastructure.ServiceDiscovery.WinSvc.dll" -ErrorAction Stop -Verbose:$false | Out-Null 
    $resolver = New-Object -TypeName 'Microsoft.AzureStack.Common.Infrastructure.ServiceDiscovery.WinSvc.ServiceResolver' -ArgumentList @($dict)

    #Create Instance with gateway resolver.
    $subrControllerLogCollectorClient = [Microsoft.AzureStack.SupportBridge.LogCollector.Client.LogCollectorClientFactory]::CreateInstanceUsingServiceResolver($resolver, $defaultDelay, $maxRetryTime, $null, $true)
    return $subrControllerLogCollectorClient
}

# This works while reaching out to SUBR from other VM's where SF is installed and SDN is working
# as this requires VIP name resolution.
function Create-SupportControllerMgmtClientWithServiceResolver {
    [CmdletBinding()]
    Param([string[]]$clientConnectionEndpoints = 'ASSRSFClient:19000' )

    $isASZ = Is-ASZ
    if ($isASZ){
       return Create-SupportControllerMgmtClientWithLocalServiceResolver -skipSPNAuth $true;
    }

    $ProviderName = [system.environment]::GetEnvironmentVariable("AzureStackProviderName",[System.EnvironmentVariableTarget]::Machine)
    if (($ProviderName -ne $null) -and ($ProviderName -ieq "Microsoft.HCI")){
       return Create-SupportControllerMgmtClientWithLocalServiceResolver -skipSPNAuth $true;
    }

    #Bugfix: Bug 3140655: Accessing ERCS VM Fails With "Unable to load DLL 'FabricClient.dll'"
    $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine")

    Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.Common.Infrastructure.ServiceDiscovery.ServiceFabric.Contract.dll" -ErrorAction Stop -Verbose:$false | Out-Null
    Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.Common.Infrastructure.ServiceDiscovery.ServiceFabric.dll" -ErrorAction Stop -Verbose:$false | Out-Null
    Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.Common.Infrastructure.ServiceRegistry.ServiceFabricTypeRegistry.dll" -ErrorAction Stop -Verbose:$false | Out-Null

    $resolver = [Microsoft.AzureStack.Common.Infrastructure.ServiceDiscovery.ServiceFabric.ServiceResolverFactory]::CreateServiceResolver(
        [Microsoft.AzureStack.Common.Infrastructure.ServiceRegistry.ServiceFabricTypeRegistry.ServiceFabricTypes]::TypeMap, $clientConnectionEndpoints)

    # Create Instance of Support Controller Client Object.
    [System.TimeSpan] $defaultDelay = [System.TimeSpan]::FromSeconds(5)
    [System.TimeSpan] $maxRetryTime = [System.TimeSpan]::FromSeconds(60)

    #Create Instance with gateway resolver.
    $subrControllerMgmtClient = [Microsoft.AzureStack.SupportBridge.Management.Client.ManagementClientFactory]::CreateInstanceUsingServiceResolver($resolver, $defaultDelay, $maxRetryTime)
    return $subrControllerMgmtClient
}

# This works when service is running as WinSvC locally on the node.
function Create-SupportControllerMgmtClientWithLocalServiceResolver {
    [CmdletBinding()]
    Param([bool]$skipSPNAuth = $false )

    $serviceId = [System.Guid]"ea126685-c89e-4294-959f-bba6bf75b4aa"
    $serviceUri = [System.Uri]'http://localhost:80/diagnostics'
    $dict = New-Object "System.Collections.Generic.Dictionary``2[System.Guid,System.Uri]"
    $dict.Add($serviceId, $serviceUri)

    # Create Instance of Support Controller Client Object.
    [System.TimeSpan] $defaultDelay = [System.TimeSpan]::FromSeconds(5)
    [System.TimeSpan] $maxRetryTime = [System.TimeSpan]::FromSeconds(60)

    Add-Type -Path "$clientBinaryDirectory\Microsoft.AzureStack.Common.Infrastructure.ServiceDiscovery.WinSvc.dll" -ErrorAction Stop -Verbose:$false | Out-Null 
    $resolver = New-Object -TypeName 'Microsoft.AzureStack.Common.Infrastructure.ServiceDiscovery.WinSvc.ServiceResolver' -ArgumentList @(,$dict)

    #Create Instance with gateway resolver.
    $subrControllerMgmtClient = [Microsoft.AzureStack.SupportBridge.Management.Client.ManagementClientFactory]::CreateInstanceUsingServiceResolver($resolver, $defaultDelay, $maxRetryTime, $null, $skipSPNAuth)
    return $subrControllerMgmtClient
}

<#
.SYNOPSIS
    Sends Azure Stack Diagnostic Logs to Microsoft.
 
.DESCRIPTION
    Makes a request to Support Bridge Service to upload diagnostic logs for stamp.
 
.PARAMETER FilterByRole
    Optional. Filter by Infrastructure Role type.
 
.PARAMETER FilterByResourceProvider
    Optional. Filter by Value-add resource provider type.
 
.PARAMETER FromDate
    Optional. Start time to use for logs to collect.
 
.PARAMETER ToDate
    Optional. End time to use for logs to collect.
 
.EXAMPLE
    The example below sends last 4 hour logs to Microsoft.
    PS C:\> Send-AzureStackDiagnosticLog
 
.EXAMPLE
    The example below sends last 4 hour Support Service and WAS logs to Microsoft.
    PS C:\> Send-AzureStackDiagnosticLog -FilterByRole SupportBridgeController,WAS
     
 
.NOTES
#>

function Send-AzureStackDiagnosticLog
{
    Param(
        [Parameter(Mandatory=$false)]
        [string[]]
        $FilterByRole,

        [Parameter(Mandatory=$false)]
        [string[]]
        $FilterByResourceProvider,

        [Parameter(Mandatory=$false)]
        [nullable[DateTime]]
        $FromDate,

        [Parameter(Mandatory=$false)]
        [nullable[DateTime]]
        $ToDate
    )

    if ($FromDate -eq $null)
    {
        $FromDate = (Get-Date).AddHours(-4)
        Write-Host "FromDate parameter not specified. Setting to default value $FromDate"
    }

    if ($ToDate -eq $null)
    {
        $ToDate = Get-Date
        Write-Host "ToDate parameter not specified. Setting to default value $ToDate"
    }

    $logCollectionModel = Create-LogCollectionModel -FilterByRole $FilterByRole -FilterByResourceProvider $FilterByResourceProvider -FromDate $FromDate -ToDate $ToDate
    $subrControllerClient = Create-SupportControllerClientWithServiceResolver
    $collectionTask = $subrControllerClient.SubmitOnDemandCollectionJob("default", $logCollectionModel, [System.Threading.CancellationToken]::None)
    $collectionTask.Wait()
    $operationId = $collectionTask.Result
    Write-Host "Successfully submitted on-demand. Operation tracking Id: $operationId"

    [Microsoft.AzureStack.Common.Operations.OperationState]$runningState = [Microsoft.AzureStack.Common.Operations.OperationState]::Running
    [Microsoft.AzureStack.Common.Operations.OperationState]$currentState = Get-LogCollectionStatus -SubrControllerClient $subrControllerClient -OperationId $operationId
    Write-Host "Current log collection status: $currentState"

    while ($currentState -eq $runningState)
    {
        Write-Host "Waiting for log collection to complete..."
        Start-Sleep -s 120
        $currentState = Get-LogCollectionStatus -SubrControllerClient $subrControllerClient -OperationId $operationId
    }

    Write-Host "Log collection ended with status: $currentState"
}

function Send-DiagnosticData
{
    [CmdletBinding(DefaultParametersetName='LogCollectionAndParsing')] 
    Param(
        [Parameter(Mandatory=$false, ParameterSetName='SaveToPath')]
        [Parameter(Mandatory=$false, ParameterSetName='LogCollectionAndParsing')]
        [string[]]
        $FilterByRole,

        [Parameter(Mandatory=$false, ParameterSetName='SaveToPath')]
        [Parameter(Mandatory=$false, ParameterSetName='LogCollectionAndParsing')]
        [nullable[DateTime]]
        $FromDate,

        [Parameter(Mandatory=$false, ParameterSetName='SaveToPath')]
        [Parameter(Mandatory=$false, ParameterSetName='LogCollectionAndParsing')]
        [nullable[DateTime]]
        $ToDate,

        [Parameter(Mandatory=$false, ParameterSetName='SaveToPath')]
        [Parameter(Mandatory=$false, ParameterSetName='LogCollectionAndParsing')]
        [bool]
        $CollectSddc = $true,

        [Parameter(Mandatory=$false, ParameterSetName='SaveToPath')]
        [string]
        $SaveToPath,

        [Parameter(Mandatory=$false, ParameterSetName='SaveToPath')]
        [Parameter(Mandatory=$false, ParameterSetName='NoLogCollection')]
        [Parameter(Mandatory=$false, ParameterSetName='LogCollectionAndParsing')]
        [ValidateNotNullOrEmpty()]
        [string]
        $SupplementaryLogs,

        [Parameter(Mandatory=$false, ParameterSetName='SaveToPath')]
        [Parameter(Mandatory=$false, ParameterSetName='NoLogCollection')]
        [ValidateNotNullOrEmpty()]
        [PSCredential]
        $ShareCredential,

        [Parameter(Mandatory=$false, ParameterSetName='NoLogCollection')]
        [switch]
        $NoLogCollection,

        [Parameter(Mandatory=$false)]
        [switch]
        $BypassObsAgent,

        [Parameter(Mandatory=$false, ParameterSetName='SaveToPath')]
        [switch]
        $ToSMBShare,

        [Parameter(Mandatory=$false, ParameterSetName='NoLogCollection')]
        [switch]
        $FromSMBShare,

        [Parameter(Mandatory=$false, ParameterSetName='NoLogCollection')]
        [Parameter(Mandatory=$false, ParameterSetName='SaveToPath')]
        [string]
        $SharePath,

        [Parameter(Mandatory=$false)]
        [switch]
        $SkipTestObservability
    )

    if ($FromDate -eq $null)
    {
        $FromDate = (Get-Date).AddHours(-1)
        Write-Host "FromDate parameter not specified. Setting to default value $FromDate"
    }
    else
    {
        Write-Host "FromDate is $FromDate"
    }

    if ($ToDate -eq $null)
    {
        $ToDate = Get-Date
        Write-Host "ToDate parameter not specified. Setting to default value $ToDate"
    }
    else
    {
        Write-Host "ToDate is $ToDate"
    }

    Write-Host "The FromDate is in $($FromDate.Kind) and the ToDate is in $($ToDate.Kind)"
    Write-Host "The local time zone is $(Get-Timezone)"

    $FromDate = Convert-ToUtc $FromDate
    $ToDate = Convert-ToUtc $ToDate
    Write-Host "FromDate in UTC is now $FromDate. ToDate in UTC is now $ToDate"
    $CurrentDateTime = (Get-Date).ToUniversalTime()

    if ($ToDate -gt $CurrentDateTime.addMinutes(5))
    {   
        $OldToDate = $ToDate
        $ToDate = $CurrentDateTime
        Write-Warning "Log Collection To Date cannot be greater than current datetime of $CurrentDateTime. Changed Log Collection ToDate from $OldToDate to $ToDate"
    }

    if ($FromDate -gt $CurrentDateTime)
    {
        Write-Host "Log Collection From Date cannot be greater than current datetime of $CurrentDateTime. Aborting log collection."
        return
    }

    if ($ToDate -le $FromDate)
    {
        Write-Host "ToDate cannot be less than or equal to FromDate. Aborting log collection."
        return
    }

    # Warning if log collection is more than 24 hours in time range
    $timeDifference = New-TimeSpan -Start $fromDate -End $toDate
    # set to 24 hours + 2 minutes, in case time range is slightly above 24 hours
    $maxMinutes = 24 * 60 + 2
    if ($timeDifference.TotalMinutes -gt $maxMinutes)
    {
        Write-Warning "We advise limiting log collection to no more than 24 hours."
    }

    # To make backwards compatible, accept parameters -ToSMBShare, -SMBShare, and SharePath
    if ($SharePath)
    {
        if ($ToSMBShare)
        {
            if ($SaveToPath)
            {
                Write-Host "Cannot use both SharePath and SaveToPath parameters. Aborting log collection."
                return
            }
            else
            {
                $SaveToPath = $SharePath
                Write-Warning "Note: ToSMBShare and SharePath parameters are deprecated. Use SaveToPath parameter instead of SharePath parameter going forward."
            }
        }
        elseif ($FromSMBShare)
        {
            if ($SupplementaryLogs)
            {
                Write-Host "Cannot use both SharePath and SupplementaryLogs parameters. Aborting log collection."
                return
            }
            else
            {
                $SupplementaryLogs = $SharePath
                $NoLogCollection = $true
                Write-Warning "Note: FromSMBShare and SharePath parameters are deprecated. Use NoLogCollection parameter instead of FromSMBShare parameter, and SupplementaryLogs parameter instead of SharePath parameter going forward."
            }
        }
        else
        {
            Write-Host "SharePath parameter must be used with either ToSMBShare or FromSMBShare. Aborting log collection."
            return
        }
    }

    # After checking if sharepath exists and reassigning as needed, need to enforce required parameters depending on parameter Set
    $parameterSetName = $PSCmdlet.ParameterSetName
    if ($parameterSetName -ieq "SaveToPath")
    {
        if ([string]::IsNullOrEmpty($SaveToPath))
        {
            Write-Host "SaveToPath parameter cannot be null or empty when using parameter set $parameterSetName. Aborting log collection."
            return
        }
    }
    elseif ($parameterSetName -ieq "NoLogCollection")
    {
        if ([string]::IsNullOrEmpty($SupplementaryLogs))
        {
            Write-Host "SupplementaryLogs parameter cannot be null or empty when using parameter set $parameterSetName. Aborting log collection."
            return
        }
    }
    
    $correlationId = [guid]::NewGuid() 
    Write-Host "The correlation Id is $correlationId. This is used to query for this log collection in the diagnostic pipeline."

    if (!$SaveToPath)
    {
        # First need to check if GMA is running. If not, stop log collection.
        if (!(Is-GMARunning))
        {
            Write-Host "GMA process for diagnostic pipeline was not found. Aborting log collection."
            return
        }
        try
        {
            $pathToDiagnosticJson = "$env:SystemDrive\Gmacache\JsonDropLocation\AEODiagnostics.json"
            $diagnosticsJson = Get-Content -Raw $pathToDiagnosticJson | ConvertFrom-json
            
            $diagnosticInfo = [ordered]@{
                AEORegion =  $diagnosticsJson.ConstantVariables.MONITORING_AEO_REGION
                AEODeviceARMResourceUri = $diagnosticsJson.ConstantVariables.MONITORING_AEO_DEVICE_ARM_RESOURCE_URI
                AEOClusterNodeArcResourceUri = $diagnosticsJson.ConstantVariables.MONITORING_AEO_NODE_ARC_RESOURCE_URI
                CorrelationId = $correlationId
            }

            Write-Host "Provide the below information to the customer support engineer working on your case." -Verbose
            $diagnosticInfo.GetEnumerator() | ForEach-Object {
                $message = ' {0}: {1}' -f $_.key, $_.value
                Write-Host $message
            } 
        }
        catch
        {
            Write-Host "Could not get AEODeviceARMResourceUri, AEOClusterNodeArcResourceUri, or AEORegion. Error: $_"
        }
    }

    # If passed in SupplementaryLogs and parameter set name is SaveToPath or LogCollectionAndParsing, add warning if it doesn't exist.
    # If NoLogCollection parameter set, should be failure because there's nothing that can be collected and parsed.
    if (![string]::IsNullOrEmpty($SupplementaryLogs) )
    {
        $validPath = Test-SupplementaryLogsPath -SupplementaryLogs $SupplementaryLogs -ShareCredential $ShareCredential -ParameterSetName $ParameterSetName
        $supplPathWarning = "Cannot find path for supplementary logs $SupplementaryLogs, or path is not a folder."
        
        if (!$validPath)
        {
            if ($parameterSetName -ieq "NoLogCollection")
            {
                Write-Host "$supplPathWarning Aborting log collection."
                return
            }
            else
            {
                Write-Warning $supplPathWarning
                Write-Host "Continuing with collecting role logs and sddc logs"
            }
        }
    }
    
    # Parameter sets SaveToPath and NoLogCollection should be a local log collection only.
    if ($NoLogCollection -or $SaveToPath)
    {
        Write-Host "Bypassing the observability agent, as parameter set $parameterSetName is being used"
        $BypassObsAgent = $true
    }
    
    if (-not $BypassObsAgent -and (Is-ObservabilityAgentRunning)) {
        Write-Host "Observability Agent is running."
        Write-Host "This log collection will attempt to collect logs from all hosts."
        $logCollectionModel = Create-LogCollectionModel -FilterByRole $FilterByRole -FromDate $FromDate -ToDate $ToDate `
            -CollectSddc $CollectSddc -SupplementaryLogs $SupplementaryLogs -CorrelationId $correlationId -SkipTestObservability $SkipTestObservability.IsPresent
        $subrControllerClient = Create-LogCollectorClienttWithLocalServiceResolver
        $collectionTask = $subrControllerClient.SubmitOnDemandCollectionJob("default", $logCollectionModel, [System.Threading.CancellationToken]::None)
        $collectionTask.Wait()
        $operationId = $collectionTask.Result
        Write-Host "Successfully submitted on-demand. Log collection Job Id: $operationId. This is used to track the log collection with Get-LogCollectionHistory."
        [Microsoft.AzureStack.Common.Operations.OperationState]$runningState = [Microsoft.AzureStack.Common.Operations.OperationState]::Running
        [Microsoft.AzureStack.Common.Operations.OperationState]$currentState = Get-LogCollectionStatus -SubrControllerClient $subrControllerClient -OperationId $operationId
        Write-Host "Current log collection status: $currentState"

        while ($currentState -eq $runningState)
        {
            Write-Host "Waiting for log collection to complete..."
            Start-Sleep -s 120
            $currentState = Get-LogCollectionStatus -SubrControllerClient $subrControllerClient -OperationId $operationId
        }

        Write-Host "Log Collection is Complete."

        # Figure out if any data parsed.
        $records = Get-LogCollectionHistory
        $count = ($records | Measure-Object).Count
        if ($count -eq 1)
        {
            $filesParsed = $records.UploadNumberOfFiles
        }
        else
        {
            $record = $records | Where-Object {$_.LogCollectionId -ieq $operationId}
            $filesParsed = $record.UploadNumberOfFiles
        }

        if ($filesParsed -gt 0)
        {
            Write-Host "
                Thank you for sending diagnostic logs to Microsoft. In the event that further logs are deemed necessary,
                Microsoft Customer Support will communicate with you accordingly.
            "

        }
        else
        {
            Write-Host "Log collection failed."
        }

    }
    else
    {
        Write-Host "
            Bypassing the observability agent and collecting logs directly from LogOrchestrator.
            There will be no record of this log collection in the log collection history.
            Only collecting logs from the current host, $env:COMPUTERNAME.
        "


         # Call Get-DiagnosticLog with the right parameters (including filtering for local node)
         # We are running in local mode, which means collect logs only for this node.
         $filterByNode = @($env:COMPUTERNAME)

         $getDiagLogParams = @{
              TracingContext = $correlationId
              BypassedObsAgent = $true
              SupplementaryLogs = $SupplementaryLogs
              SkipTestObservability = $SkipTestObservability.IsPresent
         }

         # Don't pass in parameters used in collecting logs if we are using NoLogCollection parameter set, because
         # in that case, we skip log collection.
         if ($parameterSetName -ne "NoLogCollection") 
         {
            $getDiagLogParams.Add("IncludeGetSDDCLogs", $CollectSddc)
            $getDiagLogParams.Add("FilterByRole", $FilterByRole)
            $getDiagLogParams.Add("FilterByNode", $filterByNode)
            $getDiagLogParams.Add("LogCollectionStartTimeUTC", $FromDate)
            $getDiagLogParams.Add("LogCollectionEndTimeUTC", $ToDate)
            $getDiagLogParams.Add("LogCollectionJobType", "OnDemand")
            $getDiagLogParams.Add("LocalMode", $true)
         }

         if ($parameterSetName -ieq "SaveToPath")
         {
            $getDiagLogParams.Add("SaveToPath", $SaveToPath)
         }

          if ($parameterSetName -ieq "NoLogCollection") 
         {
            $getDiagLogParams.Add("NoLogCollection", $NoLogCollection)
         }

         if ($ShareCredential)
         {
              $getDiagLogParams.Add("ShareCredential", $ShareCredential)
         }

         Write-Host "Calling Get-DiagnosticLog."
         $diagnosticLogResults = Get-DiagnosticLog @getDiagLogParams 
         Write-Host "Get-DiagnosticLog is complete." 

         if ($parameterSetName -ne "SaveToPath")
         {
              $filesParsed = $diagnosticLogResults.GenevaConnector_ParsedFileCount
              if ($filesParsed -gt 0)
              {
                   Write-Host "Thank you for sending diagnostic logs to Microsoft. In the event that further logs are deemed necessary, Microsoft Customer Support will communicate with you accordingly."
              }
              else
              {
                  Write-Host "Log collection failed."
              }
         }
    }
}

<#
.SYNOPSIS
    Gets the log colllection history.
 
.DESCRIPTION
    Gets history of logs collected on the stamp.
 
.PARAMETER MaxRecords
    Optional. Limit the number of records to display. By default is set to 10. If lower or equal to 0, return the default
 
.PARAMETER AllRecords
    Optional. Defaults to false. Indicates whether to display all records. Ignores the value of MaxRecords
 
.EXAMPLE
    PS C:\> Get-LogCollectionHistory
 
.NOTES
#>

function Get-LogCollectionHistory
{
    Param(
        [Parameter(Mandatory=$false)]
        [nullable[DateTime]]
        $FromDate = (Get-Date).AddDays(-7),
        
        [Parameter(Mandatory=$false)]
        [int]
        $MaxRecords = 10,

        [Parameter(Mandatory=$false)]
        [switch]
        $AllRecords
    )

    if ($MaxRecords -le 0){
        $MaxRecords = 10
    }

    $logCollectionTable = $null

    $isASZ = Is-ASZ
    $subrControllerClient = $null
    if ($isASZ)
    {
        $subrControllerClient = Create-LogCollectorClienttWithLocalServiceResolver
    }
    else
    {
        $subrControllerClient = Create-SupportControllerClientWithServiceResolver
    }
        
    $fromDateString = $FromDate.ToString("MMddyyyyHHmmss")
    $getLogHistoryTask = $subrControllerClient.GetLogCollectionHistory([System.Threading.CancellationToken]::None, $fromDateString)
    $getLogHistoryTask.Wait()
    $logCollectionRecords = $getLogHistoryTask.Result
                
    $logCollectionData = [object[]]::new($logcollectionRecords.Count)
    $index = 0
    foreach ($logcollectionRecord in $logCollectionRecords)
    {
        $newRecord = [ordered]@{
            TimeCollected = $logcollectionRecord.CollectionTime
            Status = $logcollectionRecord.State
            LogCollectionId = $logCollectionRecord.OperationId
            CollectionFromDate = $logcollectionRecord.FromDate
            CollectionToDate = $logcollectionRecord.ToDate
            Type = $logcollectionRecord.JobType
            LogUploadSizeMb = $logcollectionRecord.UploadDetails.UploadSizeInMb
            UploadNumberOfFiles = $logcollectionRecord.UploadDetails.UploadNumberOfFiles
            Directory = $logcollectionRecord.UploadDetails.UploadDirectory
            Location = $logcollectionRecord.LogLocation
            Error = $logcollectionRecord.Error.Message -replace "`r`n",'; '
            "----------" = "---------------------------------------------------------"
        }
        $logCollectionData[$index++] = $newRecord
    }
    $logCollectionTable = $logCollectionData | Sort-Object { [DateTime]$_.TimeCollected.DateTime } -Descending 

    if (-not $AllRecords)
    {
        $logCollectionTable = $logCollectionTable | Select-Object -First $MaxRecords
    }

    if ($logCollectionTable.count -eq 0)
    {
        Write-Host "No records in time range." 
    }
        
    return $logCollectionTable
}

<#
.SYNOPSIS
    Enables proactive log collection.
 
.DESCRIPTION
    Enables proactive log collection.
 
.EXAMPLE
    The example below enables proactive log collection.
    PS C:\> Enable-ProactiveLogCollection
 
.NOTES
#>

function Enable-ProactiveLogCollection
{
    $isASZ = Is-ASZ
    $subrControllerClient = $null
    if ($isASZ)
    {
        $subrControllerClient = Create-LogCollectorClienttWithLocalServiceResolver
        $enableProactiveTask = $subrControllerClient.EnableASZProactiveLogCollection([System.Threading.CancellationToken]::None)
    }
    else
    {
        $subrControllerClient = Create-SupportControllerClientWithServiceResolver
        $enableProactiveTask = $subrControllerClient.EnableLogCollection([System.Threading.CancellationToken]::None)
    }

        
    $enableProactiveTask.Wait()

    # check if enabled
    $enabled = Check-ProactiveEnabled -SubrControllerClient $subrControllerClient -IsASZ $isASZ
    if ($enabled)
    {
        return "enabled" 
    }
    else
    {
        throw "Proactive log collection could not be enabled." 
    }
}

<#
.SYNOPSIS
    Disables proactive log collection.
 
.DESCRIPTION
    Disables proactive log collection.
 
.EXAMPLE
    The example below enables disables log collection.
    PS C:\> Disable-ProactiveLogCollection
 
.NOTES
#>

function Disable-ProactiveLogCollection
{
    $isASZ = Is-ASZ
    $subrControllerClient = $null
    if ($isASZ)
    {
        $subrControllerClient = Create-LogCollectorClienttWithLocalServiceResolver
        $disableProactiveTask = $subrControllerClient.DisableASZProactiveLogCollection([System.Threading.CancellationToken]::None)
    }
    else
    {
        $subrControllerClient = Create-SupportControllerClientWithServiceResolver
        $disableProactiveTask = $subrControllerClient.DisableLogCollection([System.Threading.CancellationToken]::None)
    }

        
    $disableProactiveTask.Wait()

    # check if enabled
    $enabled = Check-ProactiveEnabled -SubrControllerClient $subrControllerClient -IsASZ $IsASZ
        
    if ($enabled)
    {
        throw "Proactive log collection could not be disabled." 
    }
    else
    {
        return "disabled"
    }
}

function Check-ProactiveEnabled
{
     Param(
        [Parameter(Mandatory=$true)]
        [Microsoft.AzureStack.SupportBridge.LogCollector.Client.Contract.ILogCollectorClient]
        $SubrControllerClient,

        [Parameter(Mandatory=$true)]
        [bool]
        $IsASZ
    )

    if ($IsASZ)
    {
        $logCollectionConfigTask = $SubrControllerClient.GetASZProactiveLogCollectionState([System.Threading.CancellationToken]::None)
        $logCollectionConfigTask.Wait()
        $proactiveStatus = $logCollectionConfigTask.Result
        return ($proactiveStatus -eq "enabled")
    }
    else
    {
        $logCollectionConfigTask = $SubrControllerClient.GetScheduledLogCollectionConfiguration([System.Threading.CancellationToken]::None)
        $logCollectionConfigTask.Wait()
        $logCollectionConfig = $logCollectionConfigTask.Result
        return $logCollectionConfig.Enabled
    }
    
}

<#
.SYNOPSIS
    Gets the proactive log collection state.
 
.DESCRIPTION
     Gets the proactive log collection state.
 
.EXAMPLE
    The example below gets the proactive log collection state..
    PS C:\> Get-ProactiveLogCollectionState
 
.NOTES
#>

function Get-ProactiveLogCollectionState
{
    $isASZ = Is-ASZ
    $subrControllerClient = $null
    if ($isASZ)
    {
        $subrControllerClient = Create-LogCollectorClienttWithLocalServiceResolver
    }
    else
    {
        $subrControllerClient = Create-SupportControllerClientWithServiceResolver
    }

    $enabled = Check-ProactiveEnabled -SubrControllerClient $subrControllerClient -IsASZ $IsASZ
    if ($enabled)
    {
        return "enabled"
    }
    else
    {
        return "disabled"
    }
}

<#
.SYNOPSIS
    Gets Support Service configuration settings.
 
.DESCRIPTION
    Support Service configuration settings.
 
.PARAMETER IncludeRegistrationObjectId
    Optional. Requires internet connectivity. Retrieves registration identity object id.
 
.EXAMPLE
    The example below gets registration details if stamp was registered or else null.
    PS C:\> Get-AzureStackSupportConfiguration
 
.NOTES
    Requires Support VM to have internet connectivity.
#>

function Get-AzureStackSupportConfiguration
{
    Param(
        [Parameter(Mandatory=$false)]
        [Switch]
        $IncludeRegistrationObjectId
    )

    try 
    {
        Write-Host "Fetching registration details from Support Service."
        $includePropertyName = $null
        if ($IncludeRegistrationObjectId)
        {
           $includePropertyName = "objectId"
        }

        $subrControllerClient = Create-SupportControllerClientWithServiceResolver
        $getRegistrationDetailsTask = $subrControllerClient.GetLogCollectionRegistrationDetails([System.Threading.CancellationToken]::None, $includePropertyName)
        $getRegistrationDetailsTask.Wait()
        [Microsoft.AzureStack.SupportBridge.LogCollector.Client.Models.LogCollectionRegistrationDetailsClientModelExt]$registrationDetails = $getRegistrationDetailsTask.Result
        if ($registrationDetails.RegistrationResourceId -eq $null)
        {
           Write-Error "Registration Details not found. This can happen either if Azure Stack is not registered or Disconnected."
        }
        else
        {
           Write-Host "Successfully fetched registration details."
           return ($registrationDetails | ConvertTo-Json -Depth 2)
        }
    }
    catch {
        echo $_.Exception|format-list -force
        Write-Error "Get-AzureStackSupportConfiguration failed with $_"
    }
}

<#
.SYNOPSIS
    Enables Cloud connection.
 
.DESCRIPTION
    Enables Cloud connection.
 
 
.EXAMPLE
    The example below enables cloud connection.
    PS C:\> Enable-AzsCloudConnection
 
.NOTES
    Requires Support VM to have internet connectivity.
#>

function Enable-AzsCloudConnection
{
    try
    {
        Write-Host "Enabling cloud connection..."

        $subrControllerMgmtClient = Create-SupportControllerMgmtClientWithServiceResolver
        $enableMgmtTask = $subrControllerMgmtClient.EnableRemoteManagement([System.Threading.CancellationToken]::None)
        $enableMgmtTask.Wait()
        Write-Host "Successfully enabled Cloud connection."
    }
    catch {
        echo $_.Exception|format-list -force
        Write-Error "Enable-AzsCloudConnection failed with $_"
    }
    finally {
    }
}

<#
.SYNOPSIS
    Disables Cloud connection.
 
.DESCRIPTION
    Disables Cloud connection.
 
 
.EXAMPLE
    The example below disables Cloud connection.
    PS C:\> Disable-AzsCloudConnection
 
.NOTES
    Requires Support VM to have internet connectivity.
#>

function Disable-AzsCloudConnection
{
    try
    {
        Write-Host "Disabling Cloud connection..."

        $subrControllerMgmtClient = Create-SupportControllerMgmtClientWithServiceResolver
        $enableMgmtTask = $subrControllerMgmtClient.DisableRemoteManagement([System.Threading.CancellationToken]::None)
        $enableMgmtTask.Wait()
        Write-Host "Successfully disabled cloud connection."
    }
    catch {
        echo $_.Exception|format-list -force
        Write-Error "Disable-AzsCloudConnection failed with $_"
    }
    finally {
    }
}

<#
.SYNOPSIS
    Adds cloud action.
 
.DESCRIPTION
    Adds cloud action.
 
.EXAMPLE
    The example below to add cloud action.
    PS C:\> Add-AzsCloudAction -SubsystemName $name -Expiration $date -Comments "sample access"
 
.NOTES
    Requires Support VM to have internet connectivity.
#>

function Add-AzsCloudAction
{
    Param(
        [Parameter(Mandatory=$true)]
        [string]
        $SubsystemName,

        [Parameter(Mandatory=$false)]
        [nullable[DateTime]]
        $Expiration,

        [Parameter(Mandatory=$false)]
        [string]
        $Comments
    )

    try
    {
        if ($Expiration -eq $null)
        {
            $Expiration = (Get-Date).AddDays(8)
            Write-Host "Expiration parameter not specified. Setting to default value $Expiration"
        }

        Write-Host "Adding Cloud Action..."
        Write-Host "Parameters - SubsystemName: $SubsystemName Expiration: $Expiration Comments: $Comments"

        $subrControllerMgmtClient = Create-SupportControllerMgmtClientWithServiceResolver
        $mgmtAccessModel = Create-ManagementAccessModel -SubsystemName $SubsystemName -Expiration $Expiration -Comments $Comments
        $addMgmtAccessTask = $subrControllerMgmtClient.AddorUpdateActionConsent($mgmtAccessModel, [System.Threading.CancellationToken]::None)
        $addMgmtAccessTask.Wait()
        [Microsoft.AzureStack.SupportBridge.Management.Client.Models.SubsystemAccessClientModel]$mgmtAccessDetails = $addMgmtAccessTask.Result
        if ($mgmtAccessDetails -eq $null -or $mgmtAccessDetails.SubsystemName -eq $null)
        {
           Write-Error "Cloud action could not be added. This can happen if Cloud connection is not enabled. Try Enabling Cloud connection and then run this again."
        }
        else
        {
           Write-Host "Successfully added Cloud action."
           Write-Output $mgmtAccessDetails
        }
    }
    catch {
        echo $_.Exception|format-list -force
        Write-Error "Add-AzsCloudAction failed with $_"
    }
    finally {
    }
}

<#
.SYNOPSIS
    Removes Cloud action.
 
.DESCRIPTION
    Removes Cloud action.
 
.EXAMPLE
    The example below removes cloud action.
    PS C:\> Remove-AzsCloudAction SubsystemName $name
 
.NOTES
    Requires Support VM to have internet connectivity.
#>

function Remove-AzsCloudAction
{
    Param(
        [Parameter(Mandatory=$true)]
        [string]
        $SubsystemName
    )

    try
    {
        Write-Host "Removing Cloud action..."
        Write-Host "Parameters - SubsystemName: $SubsystemName"

        $subrControllerMgmtClient = Create-SupportControllerMgmtClientWithServiceResolver

        $deleteMgmtAccessTask = $subrControllerMgmtClient.RemoveActionConsent($SubsystemName, [System.Threading.CancellationToken]::None)
        $deleteMgmtAccessTask.Wait()

        Write-Host "Successfully removed Cloud action."
    }
    catch {
        echo $_.Exception|format-list -force
        Write-Error "Remove-AzsCloudAction failed with $_"
    }
    finally {
    }
}

<#
.SYNOPSIS
    Gets Cloud actions.
 
.DESCRIPTION
    Gets Cloud actions.
 
.EXAMPLE
    The example below Gets Cloud actions.
    PS C:\> Get-AzsCloudAction
 
.NOTES
    Requires Support VM to have internet connectivity.
#>

function Get-AzsCloudAction
{
    Param(
        [Parameter(Mandatory=$false)]
        [switch]
        $IncludeExpired
    )

    try
    {
        Write-Host "Getting list of Cloud actions..."
        Write-Host "Parameters - IncludeExpired: $IncludeExpired"

        $subrControllerMgmtClient = Create-SupportControllerMgmtClientWithServiceResolver

        $getMgmtAccessTask = $subrControllerMgmtClient.GetActionConsent($IncludeExpired, [System.Threading.CancellationToken]::None)
        $getMgmtAccessTask.Wait()
        [Microsoft.AzureStack.SupportBridge.Management.Client.Models.SubsystemAccessClientModel[]]$mgmtAccessDetails = $getMgmtAccessTask.Result
        if ($mgmtAccessDetails -eq $null -or $mgmtAccessDetails.SubsystemName -eq $null)
        {
           Write-Host "Cloud actions list is empty. "
        }
        else
        {
           Write-Host "Successfully retrieved Cloud actions list."
           Write-Output $mgmtAccessDetails
        }
    }
    catch {
        echo $_.Exception|format-list -force
        Write-Error "Get-AzsCloudAction failed with $_"
    }
    finally {
    }
}

<#
.SYNOPSIS
    Enables Remote Support.
 
.DESCRIPTION
    Enables Remote Support allows authorized Microsoft Support users to remotely access the device for diagnostics or repair depending on the access level granted.
 
.PARAMETER AccessLevel
    Controls the remote operations that can be performed. This can be either Diagnostics or DiagnosticsAndRepair.
 
.PARAMETER ExpireInMinutes
    Optional. Defaults to 8 hours.
 
.PARAMETER SasCredential
    Optional. If provided by Microsoft Support, uses it to open remote support connection.
 
.PARAMETER AgreeToRemoteSupportConsent
    Optional. If set to true then records user consent as provided and proceeds without prompt.
 
.EXAMPLE
    The example below enables remote support for diagnostics only for 1 day. After expiration no more remote access is allowed.
    PS C:\> Enable-RemoteSupport -AccessLevel Diagnostics -ExpireInMinutes 1440
 
.NOTES
    Requires Support VM to have stable internet connectivity.
#>

function Enable-RemoteSupport
{
    Param(
        [Parameter(Mandatory=$true)]
        [ValidateSet("Diagnostics","DiagnosticsRepair")]
        [string]
        $AccessLevel,

        [Parameter(Mandatory=$false)]
        [int]
        $ExpireInMinutes = 480,

        [Parameter(Mandatory=$false)]
        [string]
        $SasCredential,

        [Parameter(Mandatory=$false)]
        [switch]
        $AgreeToRemoteSupportConsent
    )

    try
    {
        if ($ExpireInMinutes -lt 60)
        {
           Write-Error "ExpireInMinutes cannot be less than 1 hour(60 minutes)."
           return;
        }

        if ($ExpireInMinutes -gt 20160)
        {
           Write-Error "ExpireInMinutes cannot exceed beyond 14 days(20160 minutes)."
           return;
        }

        if ($AgreeToRemoteSupportConsent -ne $true)
        {
           Write-Host "`r`n`r`nBy approving this request, the Microsoft support organization or the Azure engineering team supporting this feature ('Microsoft Support Engineer') will be given direct access to your device for troubleshooting purposes and/or resolving the technical issue described in the Microsoft support case. `r`n`r`nDuring a remote support session, a Microsoft Support Engineer may need to collect logs. By enabling remote support, you have agreed to a diagnostic logs collection by Microsoft Support Engineer to address a support case You also acknowledge and consent to the upload and retention of those logs in an Azure storage account managed and controlled by Microsoft. These logs may be accessed by Microsoft in the context of a support case and to improve the health of Azure Stack Hub. `r`n`r`nThe data will be used only to troubleshoot failures that are subject to a support ticket, and will not be used for marketing, advertising, or any other commercial purposes without your consent. The data may be retained for up to ninety (90) days and will be handled following our standard privacy practices (https://privacy.microsoft.com/en-US/). Any data previously collected with your consent will not be affected by the revocation of your permission."
           while(1)
           {
              Write-Host "`r`nProceed with enabling remote support?"
              Write-Host "[Y] Yes [N] No: " -ForegroundColor Yellow -NoNewline
              $confirmation = Read-Host
              if ($confirmation -ieq 'Y' -or $confirmation -ieq 'YES')
              {
                 break;
              }
              elseif ($confirmation -ieq 'N' -or $confirmation -ieq 'NO')
              {
                return;
              }
           }
        }
        
        # Arc Extension registry key check
        $agentInstalltype = (Get-ItemProperty -Path 'HKLM:\SYSTEM\Software\Microsoft\AzureStack\Observability\RemoteSupport' -ErrorAction SilentlyContinue).InstallType
        $arcExtensionRootPath = (Get-ItemProperty -Path 'HKLM:\SYSTEM\Software\Microsoft\AzureStack\Observability\RemoteSupport' -ErrorAction SilentlyContinue).ExtensionRootPath
        $JeaConfigSource = "RegistrationModule"

        if($agentInstalltype -eq "ArcExtension"){
            if($(Get-Service "Observability Remote Support Agent" -ErrorAction SilentlyContinue).Status -eq "Running"){
                $scriptPath = Join-Path -Path $arcExtensionRootPath -ChildPath 'Common\ConfigureJeaEndpoints.ps1'
                $scriptArguments = " -Constants RemoteSupportConstants -JeaConfigSource $JeaConfigSource"
                Write-Host "JEA configuration script path and arguments are : $scriptPath $scriptArguments"
                Write-Host "Configuring JEA Endpoints from '$JeaConfigSource'"
                # Configure JEA, will overwrite if JEA is already installed by startup task
                if(Test-Path -Path $scriptPath){
                    Invoke-Expression -Command "& '$scriptPath' $scriptArguments"
                }
            }
        }

        $targetService = "PowerShell"
        Write-Host "`r`n`r`Enabling Remote Support for '$AccessLevel' expiring in '$ExpireInMinutes' minutes."

        $subrControllerMgmtClient = Create-SupportControllerMgmtClientWithServiceResolver
        if(![string]::IsNullOrEmpty($SasCredential)){
            $mgmtAccessModel = Create-RemoteSupportAccessRequestModel -TargetService $targetService -AccessLevel $AccessLevel -ExpireInMinutes $ExpireInMinutes -SasCredential $SasCredential
        }
        else {
            $mgmtAccessModel = Create-RemoteSupportAccessRequestModel -TargetService $targetService -AccessLevel $AccessLevel -ExpireInMinutes $ExpireInMinutes
        }
        $addMgmtAccessTask = $subrControllerMgmtClient.AddorUpdateRemoteSupportAccess($mgmtAccessModel, [System.Threading.CancellationToken]::None)
        $addMgmtAccessTask.Wait()
        [Microsoft.AzureStack.SupportBridge.Management.Client.Models.RemoteSupportAccessResponseClientModel]$mgmtAccessDetails = $addMgmtAccessTask.Result
        if ($mgmtAccessDetails -eq $null)
        {
           Write-Error "Remote Support could not be Enabled."
        }
        else
        {
           Write-Host "Remote Support successfully Enabled."
           Write-Output $mgmtAccessDetails
        }
    }
    catch {
        echo $_.Exception|format-list -force
        Write-Error "Enable-RemoteSupport failed with $_"
    }
    finally {
    }
}

<#
.SYNOPSIS
    Disables Remote Support.
 
.DESCRIPTION
    Disable Remote Support revokes all access levels previously granted. Any existing support sessions will be terminated, and new sessions can no longer be established.
 
.EXAMPLE
    The example below disables remote support.
    PS C:\> Disable-RemoteSupport
 
.NOTES
 
#>

function Disable-RemoteSupport
{
    try
    {
        Write-Host "Disabling Remote Support."

        $subrControllerMgmtClient = Create-SupportControllerMgmtClientWithServiceResolver
        $disableRemoteSupportMgmtTask = $subrControllerMgmtClient.RevokeRemoteSupportAccess([System.Threading.CancellationToken]::None)
        $disableRemoteSupportMgmtTask.Wait()
        
        Write-Host "Remote Support successfully Disabled."
    }
    catch {
        echo $_.Exception|format-list -force
        Write-Error "Disable-RemoteSupport failed with $_"
    }
    finally {
    }
}

<#
.SYNOPSIS
    Gets Remote Support Access.
 
.DESCRIPTION
    Gets remote support access.
 
.PARAMETER IncludeExpired
    Optional. Defaults to false. Indicates whether to include past expired entries.
 
.EXAMPLE
    The example below retrieves access level granted for remote support. The result will also include expired consents in the last 30 days.
    PS C:\> List-RemoteSupportAccess -IncludeExpired $true
 
.NOTES
 
#>

function Get-RemoteSupportAccess
{
    Param(
        [Parameter(Mandatory=$false)]
        [switch]
        $IncludeExpired
    )

    try
    {
        Write-Host "Retrieving Remote Support access. IncludeExpired is set to '$IncludeExpired'"

        $subrControllerMgmtClient = Create-SupportControllerMgmtClientWithServiceResolver

        $listRemoteSupportAccessMgmtTask = $subrControllerMgmtClient.ListRemoteSupportAccess($IncludeExpired, [System.Threading.CancellationToken]::None)
        $listRemoteSupportAccessMgmtTask.Wait()
        [Microsoft.AzureStack.SupportBridge.Management.Client.Models.RemoteSupportAccessResponseClientModel[]]$mgmtAccessDetails = $listRemoteSupportAccessMgmtTask.Result
        if ($mgmtAccessDetails -eq $null -or $mgmtAccessDetails.Length -eq 0)
        {
           Write-Host "No remote support access exists. "
        }
        else
        {
           Write-Output $mgmtAccessDetails
        }
    }
    catch {
        echo $_.Exception|format-list -force
        Write-Error "Get-RemoteSupportAccess failed with $_"
    }
    finally {
    }
}

<#
.SYNOPSIS
    Gets Remote Support Session History Details.
 
.DESCRIPTION
    Session history represents all remote accesses made by Microsoft Support for either Diagnostics or DiagnosticsRepair based on the Access Level granted.
 
.PARAMETER SessionId
    Optional. Session Id to get details for a specific session. If omitted then lists all sessions starting from date 'FromDate'.
 
.PARAMETER IncludeSessionTranscript
    Optional. Defaults to false. Indicates whether to include complete session transcript. Transcript provides details on all operations performed during the session.
 
.PARAMETER FromDate
    Optional. Defaults to last 7 days. Indicates date from where to start listing sessions from until now.
 
.PARAMETER MaxRecords
    Optional. Limit the number of records to display. By default is set to 10. If lower or equal to 0, return the default. Including a sessionId will always just return 1 record
 
.PARAMETER AllRecords
    Optional. Defaults to false. Indicates whether to display all records. Ignores the value of MaxRecords
 
.EXAMPLE
    The example below retrieves session history with transcript details for the specified session.
    PS C:\> Get-RemoteSupportSessionHistory -SessionId 467e3234-13f4-42f2-9422-81db248930fa -IncludeSessionTranscript $true
 
.EXAMPLE
    The example below lists session history starting from last 7 days (default) to now.
    PS C:\> Get-RemoteSupportSessionHistory
 
.NOTES
 
#>

function Get-RemoteSupportSessionHistory
{
    Param(
        [Parameter(Mandatory=$false)]
        [string]
        $SessionId,

        [Parameter(Mandatory=$false)]
        [switch]
        $IncludeSessionTranscript,

        [Parameter(Mandatory=$false)]
        [DateTime]
        $FromDate = (Get-Date).AddDays(-7),
        
        [Parameter(Mandatory=$false)]
        [int]
        $MaxRecords = 10,
        
        [Parameter(Mandatory=$false)]
        [switch]
        $AllRecords
    )

    try
    {
       if ($MaxRecords -le 0){
         $MaxRecords = 10
       }
        
       $subrControllerMgmtClient = Create-SupportControllerMgmtClientWithServiceResolver
       if($SessionId.Length -eq 0)
       {
         $currentTime = Get-Date;
         if ($FromDate -gt $currentTime)
         {
            Write-Error "From date cannot be a date in future."
            return;
         }

         [TimeSpan]$daysDifference = $currentTime - $FromDate;
         $totalDays = [math]::Round($daysDifference.TotalDays)
         if ($totalDays -gt 45)
         {
            Write-Error "From date cannot be past 45 days."
            return;
         }

         Write-Host "Listing Session History for last '$totalDays' days."

         $listRemoteSupportSessionMgmtTask = $subrControllerMgmtClient.ListRemoteSupportSession($FromDate, $false, [System.Threading.CancellationToken]::None)
         $listRemoteSupportSessionMgmtTask.Wait()
         [Microsoft.AzureStack.SupportBridge.Management.Client.Models.RemoteSupportSessionResponseClientModel[]]$listMgmtSessionDetails = $listRemoteSupportSessionMgmtTask.Result 

         if (-not $AllRecords) {
            $listMgmtSessionDetails = $listMgmtSessionDetails | Sort-Object { [DateTime]$_.EndTime.DateTime } -Descending | Select-Object -First $MaxRecords   
         }
         
         if ($listMgmtSessionDetails -eq $null -or $listMgmtSessionDetails.Length -eq 0)
         {
            Write-Host "No remote support session exists. "
         }
         else
         {
            Write-Output $listMgmtSessionDetails
         }
       }
       else
       {
          Write-Host "Retrieving Session History for Id '$SessionId'. Include session transcript was set to '$IncludeSessionTranscript'"

          $getRemoteSupportSessionMgmtTask = $subrControllerMgmtClient.GetRemoteSupportSession($SessionId, $IncludeSessionTranscript, [System.Threading.CancellationToken]::None)
          $getRemoteSupportSessionMgmtTask.Wait()
          [Microsoft.AzureStack.SupportBridge.Management.Client.Models.RemoteSupportSessionResponseClientModel]$getMgmtSessionDetails = $getRemoteSupportSessionMgmtTask.Result
          if ($getMgmtSessionDetails -eq $null)
          {
             Write-Host "No remote support session with id '$SessionId' exists."
          }
          else
          {
            Write-Output $getMgmtSessionDetails
          }
       }
    }
    catch {
        echo $_.Exception|format-list -force
        Write-Error "Get-RemoteSupportSessionHistory failed with $_"
    }
    finally {
    }
}

#Helper functions for creating remote management access objects.
function Create-ManagementAccessModel
{
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory=$true)]
        [string]
        $SubsystemName,

        [Parameter(Mandatory=$false)]
        [DateTime]
        $Expiration,

        [Parameter(Mandatory=$false)]
        [string]
        $Comments
    )

    $mgmtAccessModel = New-Object -TypeName 'Microsoft.AzureStack.SupportBridge.Management.Client.Models.SubsystemAccessClientModel'
    $mgmtAccessModel.SubsystemName = $SubsystemName
    $mgmtAccessModel.ExpiresAt = $Expiration
    $mgmtAccessModel.Comments = $Comments

    Write-Output $mgmtAccessModel
}

#Helper functions for creating client model objects.
function Create-LogCollectionModel
{
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory=$false)]
        [string[]]
        $FilterByRole,

        [Parameter(Mandatory=$false)]
        [string[]]
        $FilterByResourceProvider,

        [Parameter(Mandatory=$true)]
        [DateTime]
        $FromDate,

        [Parameter(Mandatory=$true)]
        [DateTime]
        $ToDate,

        [Parameter(Mandatory=$false)]
        [bool]
        $CollectSddc = $false,

        [Parameter(Mandatory=$false)]
        [string]
        $SupplementaryLogs,

        [Parameter(Mandatory=$false)]
        [Guid]
        $CorrelationId = [System.Guid]::Empty,

        [Parameter(Mandatory=$false)]
        [bool]
        $SkipTestObservability = $false

    )

    $logCollectionModel = New-Object -TypeName 'Microsoft.AzureStack.SupportBridge.LogCollector.Client.Models.LogCollectionJobClientModel'
    $logCollectionModel.FilterRoles = $FilterByRole
    $logCollectionModel.FilterResourceProviders = $FilterByResourceProvider
    $logCollectionModel.FromDate = $FromDate
    $logCollectionModel.ToDate = $ToDate  
    $logCollectionModel.CollectSddc = $CollectSddc
    $logCollectionModel.SupplementaryLogs = $SupplementaryLogs
    $logCollectionModel.CorrelationId = $CorrelationId
    $logCollectionModel.SkipTestObservability = $SkipTestObservability
    Write-Output $logCollectionModel
    
}

function Get-LogCollectionStatus
{
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory=$true)]
        [Microsoft.AzureStack.SupportBridge.LogCollector.Client.Contract.ILogCollectorClient]
        $SubrControllerClient,

        [Parameter(Mandatory=$true)]
        [string]
        $OperationId
    )


     $collectionStatusTask = $SubrControllerClient.GetLogCollectionJobOperationStatus($OperationId, [System.Threading.CancellationToken]::None)
     $collectionStatusTask.Wait()
     $collectionStatus = $collectionStatusTask.Result
     $collectionStatusRecord = $collectionStatus.StatusRecord
     [Microsoft.AzureStack.Common.Operations.OperationState]$collectionState = $collectionStatusRecord.State
     Write-Output $collectionState
}

#Helper functions for creating remote support access request object.
function Create-RemoteSupportAccessRequestModel
{
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory=$true)]
        [string]
        $TargetService,

        [Parameter(Mandatory=$true)]
        [string]
        $AccessLevel,

        [Parameter(Mandatory=$true)]
        [int]
        $ExpireInMinutes,

        [Parameter(Mandatory=$false)]
        [string]
        $SasCredential
    )

    $ExpiresAt=[system.datetimeoffset]::now.AddMinutes($ExpireInMinutes)

    $mgmtRemoteSupportReqAccessModel = New-Object -TypeName 'Microsoft.AzureStack.SupportBridge.Management.Client.Models.RemoteSupportAccessRequestClientModel'
    $mgmtRemoteSupportReqAccessModel.TargetService = $TargetService
    $mgmtRemoteSupportReqAccessModel.AccessLevel = $AccessLevel
    $mgmtRemoteSupportReqAccessModel.ExpiresAt = $ExpiresAt
    
    if(![String]::IsNullOrWhiteSpace($SasCredential))
    {
       Write-Host "Using provided SAS credential to make remote support connection."
       $mgmtRemoteSupportReqAccessModel.SasCredential = $SasCredential
    }

    Write-Output $mgmtRemoteSupportReqAccessModel
}

function Is-ASZ
{

    $path = "HKLM:\SOFTWARE\Microsoft\AzureStack"
    $name = "DeviceType"
    $keyNotFound = $false
    if (Test-Path $path)
    {
        $Key = Get-Item -LiteralPath $Path
        if ($null -ne $Key.GetValue($Name)) 
        {
            $value = $Key.GetValue($Name)
            if ($value -eq "AzureEdge" -or $value -eq "HCI")
            {
                return $true
            }
            else
            {
                return $false
            }
        }
        else
        {
            $keyNotFound = $true
        }
    }
    else
    {
        
        $keyNotFound = $true
    } 

    if ($keyNotFound)
    {
        # could be that key doesn't exist because Hub environment or because ASZ deployment failed before the key was created.
        # If failed in ASZ before key created, then cmdlets (get-logcollectionhistory, enable/disable proactive,
        #get-proactivelogcollectionstate) will fail anyway, because observability agent isn't up.
        Write-Host "DeviceType not found. Assuming DeviceType is not AzureEdge"
        return $false
    }
}


##### Send-DiagnosticData Helper Functions #######

function Is-ObservabilityAgentRunning
{
    try
    {
        $service = get-service -name "AzureStack Observability Agent"
        return ($service.Status -eq "Running")
    }
    catch
    {
        Write-Error "Could not get AzureStack Observability Agent service: $_"
        return $false
    }
}

function Is-GMARunning
{
    # Note: If GMA is not present, the log collection will not fail. It will just delete
    # logs without parsing them. Thus, we should throw failure without trying to collect logs
    # if GMA is not running.
    $processes =  (gwmi win32_process|?{$_.name -like "*MonAgentHost*"}).CommandLine
    $diagRunning = $false
    $pattern = '-serviceIdentity "DiagnosticsPROD#AzureEdgeObs.*Diag#\w+"'
    foreach ($process in $processes)
    {
        if ($process -match $pattern)
        {
            $diagRunning = $true
        }
    }
    return $diagRunning
}

 function Connect-ToSharePath
{
    [CmdletBinding()]
    param(
        [Parameter(Mandatory=$true)]
        [string]
        $SharePath,

        [Parameter(Mandatory=$true)]
        [PSCredential]
        $Credential
    )

    $bstr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($Credential.Password)
    $password = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($bstr)

    $drives = @('H', 'K', 'O', 'R', 'W')

    foreach ($driveLetter in $drives)
    {
        $drive = $driveLetter + ":"
        $null = net use $drive $SharePath /user:$($Credential.UserName) $password

        if($LASTEXITCODE -ne 0)
        {
            Continue
        }
                    
        if (Test-Path $SharePath)
        {
            return $drive
        }
    }
    return $null
}

 function Test-SupplementaryLogsPath
{
    [CmdletBinding()]
    param(
        [Parameter(Mandatory=$true)]
        [string]
        $SupplementaryLogs,

        [Parameter(Mandatory=$false)]
        [PSCredential]
        $ShareCredential,

        [Parameter(Mandatory=$true)]
        [string]
        $ParameterSetName
    )

    # If parameter set is NoLogCollection, ShareCredential is for SupplementaryLogs.
    # If parameter set is SaveToPath, the ShareCredential is for SaveToPath.
    # If parameter set is LogCollectionAndParsing, ShareCredential is not allowed.
    # Thus, only test mapping to SupplementaryLogs path using ShareCredential if parameter set is NoLogCollection.
    if ($ParameterSetName -ieq "NoLogCollection" -and $ShareCredential)
    {
        $drive = Connect-ToSharePath -SharePath $SupplementaryLogs -Credential $ShareCredential
    }

    # Split Test-Path <path> -PathType Container into two statements, because -ErrorAction SilentlyContinue
    # shows errors when it is all in one statement.
    if ((Test-Path $SupplementaryLogs -ErrorAction SilentlyContinue) -and (Test-Path $SupplementaryLogs -PathType Container))
    {
        $validPath = $true
    }
    else
    {
        $validPath = $false
    }

    if ($null -ne $drive)
    {
        net use $drive /delete /yes
    }

    return $validPath
}

function Convert-ToUTC($date) {
    if ($date.Kind -eq [System.DateTimeKind]::Utc) {
        # Date is already in UTC, no need to convert
        return $date
    } else {
        # Convert to UTC
        return $date.ToUniversalTime()
    }
}

Set-Alias -Name Send-AzureStackDiagnosticLogs -Value Send-AzureStackDiagnosticLog

$isASZ = Is-ASZ
if ($isASZ)
{
    Export-ModuleMember -Function Send-DiagnosticData
    Export-ModuleMember -function Get-LogCollectionHistory
    Export-ModuleMember -Function Enable-ProactiveLogCollection
    Export-ModuleMember -Function Disable-ProactiveLogCollection
    Export-ModuleMember -Function Get-ProactiveLogCollectionState
    Export-ModuleMember -Function Enable-RemoteSupport
    Export-ModuleMember -Function Disable-RemoteSupport
    Export-ModuleMember -Function Get-RemoteSupportAccess
    Export-ModuleMember -Function Get-RemoteSupportSessionHistory
}
else
{
    # if returns false, could be because Hub or because ASZ failed early in deployment.
    # To Be safe, export everything.
    Export-ModuleMember -Function Send-AzureStackDiagnosticLog
    Export-ModuleMember -Function Send-DiagnosticData
    Export-ModuleMember -function Get-LogCollectionHistory
    Export-ModuleMember -Function Enable-ProactiveLogCollection
    Export-ModuleMember -Function Disable-ProactiveLogCollection
    Export-ModuleMember -Function Get-ProactiveLogCollectionState
    Export-ModuleMember -Function Get-AzureStackSupportConfiguration
    Export-ModuleMember -Function Enable-AzsCloudConnection
    Export-ModuleMember -Function Disable-AzsCloudConnection
    Export-ModuleMember -Function Add-AzsCloudAction
    Export-ModuleMember -Function Remove-AzsCloudAction
    Export-ModuleMember -Function Get-AzsCloudAction
    Export-ModuleMember -Function Enable-RemoteSupport
    Export-ModuleMember -Function Disable-RemoteSupport
    Export-ModuleMember -Function Get-RemoteSupportAccess
    Export-ModuleMember -Function Get-RemoteSupportSessionHistory
}


# SIG # Begin signature block
# MIInvgYJKoZIhvcNAQcCoIInrzCCJ6sCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI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