Skip to content

Commit d2574a4

Browse files
committed
Updated intercept message, cmdlet and help
1 parent 5e28483 commit d2574a4

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

tools/Az.Tools.Predictor/Az.Tools.Predictor/Az.Tools.Predictor.psd1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ PowerShellVersion = '7.2'
4343
# Modules that must be imported into the global environment prior to importing this module
4444
# RequiredModules = @(@{ModuleName="PSReadLine"; ModuleVersion="2.2.0-beta2"})
4545

46-
NestedModules = @("Microsoft.Azure.PowerShell.Tools.AzPredictor.dll")
46+
# NestedModules = @("Microsoft.Azure.PowerShell.Tools.AzPredictor.dll")
4747

4848
ScriptsToProcess = @("PromptSurvey.ps1")
4949

50-
CmdletsToExport = @("Enable-AzPredictor", "Disable-AzPredictor", "Open-AzSurveyLink")
50+
CmdletsToExport = @("Enable-AzPredictor", "Disable-AzPredictor", "Open-AzSurvey")
5151

5252
# Format files (.ps1xml) to be loaded when importing this module
5353

@@ -69,7 +69,8 @@ PrivateData = @{
6969
# IconUri = ''
7070

7171
# ReleaseNotes of this module
72-
ReleaseNotes = '* second preview release
72+
ReleaseNotes = '* Add a cmdlet to open survey page and update message
73+
* Second preview release
7374
* Add Enable-AzPredictor and Disable-AzPredictor cmdlet to simplify configuration
7475
* Use PSReadline new API'
7576

tools/Az.Tools.Predictor/Az.Tools.Predictor/Commands/OpenAzSurveyLink.cs renamed to tools/Az.Tools.Predictor/Az.Tools.Predictor/Commands/OpenAzSurvey.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ namespace Microsoft.Azure.PowerShell.Tools.AzPredictor
2525
{
2626
/// <summary>
2727
/// <para type="synopsis">Cmdlet to open a survey link in the default browser</para>
28-
/// <para type="description">Use this cmdlet to open a survey link in the default browser</para>
28+
/// <para type="description">This cmdlet will open a survey link in the default browser. All data from this survey will be anonymized. See the Microsoft Privacy Policy (https://privacy.microsoft.com/) for more information </para>
2929
/// </summary>
30-
[Cmdlet("Open", "AzSurveyLink"), OutputType(typeof(bool))]
31-
public sealed class OpenAzSurveyLink : PSCmdlet
30+
[Cmdlet("Open", "AzSurvey"), OutputType(typeof(bool))]
31+
public sealed class OpenAzSurvey : PSCmdlet
3232
{
33-
private const string _SurveyLinkFormat = "https://aka.ms/azpredictorisurvey?SessionId={0}&from=cmdlet";
33+
private const string _SurveyLinkFormat = "https://aka.ms/azpredictorisurvey?SessionId={0}&Q_CHL=cmdlet";
3434
/// <summary>
3535
/// <para type="description">Indicates whether the user would like to receive output. </para>
3636
/// </summary>

tools/Az.Tools.Predictor/Az.Tools.Predictor/InterceptSurvey.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ if ($shouldIntercept) {
218218
}
219219
}
220220

221-
$escape = $([char]27)
222-
Write-Host "`n$escape[7mHow was your experience using Az predictor? $escape[27m`n" -NoNewline; Write-Host "$escape[7mhttp://aka.ms/azpredictorisurvey?SessionId=$surveyId$escape[27m" -NoNewline
223-
Write-Host "`n"
221+
Write-Host "---------------------------------------------------";
222+
Write-Host "Survey:" -ForegroundColor $Host.PrivateData.VerboseBackgroundColor -BackgroundColor $host.PrivateData.VerboseForegroundColor -NoNewline;
223+
Write-Host " How was your experience using Az predictor?";
224+
Write-Host "";
225+
Write-Host "Run " -NoNewline; Write-Host "Open-AzSurvey" -ForegroundColor $Host.PrivateData.VerboseBackgroundColor -BackgroundColor $host.PrivateData.VerboseForegroundColor -NoNewline; Write-Host " to give us your feedback.";
226+
Write-Host "---------------------------------------------------";
227+
224228
}

0 commit comments

Comments
 (0)