From 04ce323926b5d5da3031dffe641915da90fc9955 Mon Sep 17 00:00:00 2001 From: Dingmeng Xue Date: Tue, 2 Mar 2021 13:46:14 +0800 Subject: [PATCH] Update help for Az.Tools.Predictor (#14376) * Update help for Az.Tools.Predictor (#14374) * update build.proj * Change help folder --- .../Commands/DisableAzPredictor.cs | 8 +- .../Commands/EnableAzPredictor.cs | 8 +- tools/Az.Tools.Predictor/GenerateHelp.ps1 | 6 +- tools/Az.Tools.Predictor/build.proj | 4 +- .../help/Disable-AzPredictor.md | 74 +++++++++++++++++++ .../help/Enable-AzPredictor.md | 74 +++++++++++++++++++ 6 files changed, 161 insertions(+), 13 deletions(-) create mode 100644 tools/Az.Tools.Predictor/help/Disable-AzPredictor.md create mode 100644 tools/Az.Tools.Predictor/help/Enable-AzPredictor.md diff --git a/tools/Az.Tools.Predictor/Az.Tools.Predictor/Commands/DisableAzPredictor.cs b/tools/Az.Tools.Predictor/Az.Tools.Predictor/Commands/DisableAzPredictor.cs index 76bf9a5764b2..c9330b70e4bb 100644 --- a/tools/Az.Tools.Predictor/Az.Tools.Predictor/Commands/DisableAzPredictor.cs +++ b/tools/Az.Tools.Predictor/Az.Tools.Predictor/Commands/DisableAzPredictor.cs @@ -18,8 +18,8 @@ namespace Microsoft.Azure.PowerShell.Tools.AzPredictor { /// - /// Cmdlet to disable Az Predictor and stop recieving suggestions - /// Use this cmdlet to disable Az Predictor and stop recieving suggestions + /// Cmdlet to disable Az Predictor and stop receiving suggestions + /// Use this cmdlet to disable Az Predictor and stop receiving suggestions /// [Cmdlet("Disable", "AzPredictor")] public sealed class DisableAzPredictor : PSCmdlet @@ -29,13 +29,13 @@ public sealed class DisableAzPredictor : PSCmdlet }; /// - /// Disable Az Predictor for the curent and future PowerShell sessions. + /// Disable Az Predictor for the current and future PowerShell sessions. /// [Parameter(Mandatory = false)] public SwitchParameter AllSession { get; set; } /// - /// Indicates whether the user would like to receive output. + /// Indicates whether the user would like to receive output. /// [Parameter(Mandatory = false)] public SwitchParameter PassThru { get; set; } diff --git a/tools/Az.Tools.Predictor/Az.Tools.Predictor/Commands/EnableAzPredictor.cs b/tools/Az.Tools.Predictor/Az.Tools.Predictor/Commands/EnableAzPredictor.cs index 471debfd4cdd..a1cdf820c971 100644 --- a/tools/Az.Tools.Predictor/Az.Tools.Predictor/Commands/EnableAzPredictor.cs +++ b/tools/Az.Tools.Predictor/Az.Tools.Predictor/Commands/EnableAzPredictor.cs @@ -18,8 +18,8 @@ namespace Microsoft.Azure.PowerShell.Tools.AzPredictor { /// - /// Cmdlet to enable Az Predictor and start recieving suggestions - /// Use this cmdlet to enable Az Predictor and start recieving suggestions + /// Cmdlet to enable Az Predictor and start receiving suggestions + /// Use this cmdlet to enable Az Predictor and start receiving suggestions /// [Cmdlet("Enable", "AzPredictor"), OutputType(typeof(bool))] public sealed class EnableAzPredictor : PSCmdlet @@ -30,13 +30,13 @@ public sealed class EnableAzPredictor : PSCmdlet }; /// - /// Enable Az Predictor for the current and futrue PowerShell sessions. + /// Enable Az Predictor for the current and future PowerShell sessions. /// [Parameter(Mandatory = false)] public SwitchParameter AllSession { get; set; } /// - /// Indicates whether the user would like to receive output. + /// Indicates whether the user would like to receive output. /// [Parameter(Mandatory = false)] public SwitchParameter PassThru { get; set; } diff --git a/tools/Az.Tools.Predictor/GenerateHelp.ps1 b/tools/Az.Tools.Predictor/GenerateHelp.ps1 index 5cc67611792c..568ed53e7652 100644 --- a/tools/Az.Tools.Predictor/GenerateHelp.ps1 +++ b/tools/Az.Tools.Predictor/GenerateHelp.ps1 @@ -4,11 +4,11 @@ Param( [Parameter()] [string]$ArtifactFolder, [Parameter()] + [string]$HelpFolder, + [Parameter()] [string]$ModuleName ) $ModuleFolder = Join-Path -Path $ArtifactFolder -ChildPath $ModuleName -$TempDocFolder = Join-Path -Path $ArtifactFolder -ChildPath $ModuleName'.Doc' Import-Module $ModuleFolder -New-MarkdownHelp -Module $ModuleName -OutputFolder $TempDocFolder -New-ExternalHelp –Path $TempDocFolder -OutputPath $ModuleFolder \ No newline at end of file +New-ExternalHelp –Path $HelpFolder -OutputPath $ModuleFolder -Force -Debug \ No newline at end of file diff --git a/tools/Az.Tools.Predictor/build.proj b/tools/Az.Tools.Predictor/build.proj index 33f16e8f62d2..227db7dd9272 100644 --- a/tools/Az.Tools.Predictor/build.proj +++ b/tools/Az.Tools.Predictor/build.proj @@ -19,7 +19,7 @@ - + @@ -35,7 +35,7 @@ - + diff --git a/tools/Az.Tools.Predictor/help/Disable-AzPredictor.md b/tools/Az.Tools.Predictor/help/Disable-AzPredictor.md new file mode 100644 index 000000000000..529931662443 --- /dev/null +++ b/tools/Az.Tools.Predictor/help/Disable-AzPredictor.md @@ -0,0 +1,74 @@ +--- +external help file: Microsoft.Azure.PowerShell.Tools.AzPredictor.dll-Help.xml +Module Name: Az.Tools.Predictor +online version: +schema: 2.0.0 +--- + +# Disable-AzPredictor + +## SYNOPSIS +Cmdlet to disable Az Predictor and stop receiving suggestions. + +## SYNTAX + +``` +Disable-AzPredictor [-AllSession] [-PassThru] [] +``` + +## DESCRIPTION +Use this cmdlet to disable Az Predictor and stop receiving suggestions. + +## EXAMPLES + +### Example 1 +``` +PS C:\> Disable-AzPredictor +``` + +Disable Az Predictor only for the current session. + +## PARAMETERS + +### -AllSession +Disable Az Predictor for the current and future PowerShell sessions. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Indicates whether the user would like to receive output. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/tools/Az.Tools.Predictor/help/Enable-AzPredictor.md b/tools/Az.Tools.Predictor/help/Enable-AzPredictor.md new file mode 100644 index 000000000000..90f4874b4071 --- /dev/null +++ b/tools/Az.Tools.Predictor/help/Enable-AzPredictor.md @@ -0,0 +1,74 @@ +--- +external help file: Microsoft.Azure.PowerShell.Tools.AzPredictor.dll-Help.xml +Module Name: Az.Tools.Predictor +online version: +schema: 2.0.0 +--- + +# Enable-AzPredictor + +## SYNOPSIS +Cmdlet to enable Az Predictor and start receiving suggestions. + +## SYNTAX + +``` +Enable-AzPredictor [-AllSession] [-PassThru] [] +``` + +## DESCRIPTION +Use this cmdlet to enable Az Predictor and start receiving suggestions. + +## EXAMPLES + +### Example 1 +``` +PS C:\> Enable-AzPredictor +``` + +Enable Az Predictor for the current session. + +## PARAMETERS + +### -AllSession +Enable Az Predictor for the current and future PowerShell sessions. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Indicates whether the user would like to receive output. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None +## OUTPUTS + +### System.Boolean +## NOTES + +## RELATED LINKS