From 57e2980a65401e236f2be685f77f9f51852b6254 Mon Sep 17 00:00:00 2001 From: Swapnil Ashtekar Date: Tue, 17 Jan 2023 21:47:18 -0800 Subject: [PATCH] Add Remote Support consent for terms and conditions --- src/StackHCI/custom/stackhci.ps1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/StackHCI/custom/stackhci.ps1 b/src/StackHCI/custom/stackhci.ps1 index bef5c397f352..e0462f58ce73 100644 --- a/src/StackHCI/custom/stackhci.ps1 +++ b/src/StackHCI/custom/stackhci.ps1 @@ -115,6 +115,8 @@ $ConfiguringCloudManagementMessage = "Configuring Cloud Management agent." $ConfiguringCloudManagementClusterSvc = "Creating Cloud Management cluster resource." $StartingCloudManagementMessage = "Starting Cloud Management agent." +$RemoteSupportConsentText = "`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 HCI. `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." + $MaskString = "XXXXXXX" #endregion @@ -5327,6 +5329,18 @@ function Enable-AzStackHCIRemoteSupport{ $AgreeToRemoteSupportConsent ) + if ($AgreeToRemoteSupportConsent -ne $true) + { + if($PSCmdlet.ShouldContinue($RemoteSupportConsentText, "Remote Support: Terms & Conditions")) + { + $AgreeToRemoteSupportConsent = $true + } + else + { + return + } + } + if(Assert-IsObservabilityStackPresent){ Import-Module DiagnosticsInitializer -Verbose -Force Enable-RemoteSupport -AccessLevel $AccessLevel -ExpireInMinutes $ExpireInMinutes -SasCredential $SasCredential -AgreeToRemoteSupportConsent:$AgreeToRemoteSupportConsent