Skip to content

Commit 0b4ecb5

Browse files
author
Samuel Anudeep
committed
Added alias, help files for updated cmdlet and wxi.
Added help for updated cmdlet Updated help files Help file update wxi update
1 parent f1602e4 commit 0b4ecb5

11 files changed

+210
-70
lines changed

setup/azurecmdfiles.wxi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2416,6 +2416,9 @@
24162416
<Component Id="cmpC96DAF4A31F86D19246E39394F496F83" Guid="*">
24172417
<File Id="fil2D7BE7247B4B446F4AF0DD4322F0D374" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices\AzureRM.RecoveryServices.psd1" />
24182418
</Component>
2419+
<Component Id="cmp7A8115D2255F0900831161BE617E2A5A" Guid="*">
2420+
<File Id="filBB4373900A2C246987CB865B56CFD54B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices\AzureRmRecoveryServicesStartup.ps1" />
2421+
</Component>
24192422
<Component Id="cmpA77D5875EABE5151973A245C04E3858E" Guid="*">
24202423
<File Id="fil1D8C96CE85AC990C98123BA88257BC6F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices\Hyak.Common.dll" />
24212424
</Component>
@@ -2487,6 +2490,9 @@
24872490
<Component Id="cmp131A9DE83A67006D51F1314A42E399CA" Guid="*">
24882491
<File Id="filA2C0D97A8033046D96249BA12C24D9D4" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\AzureRM.RecoveryServices.Backup.psd1" />
24892492
</Component>
2493+
<Component Id="cmp9AB7E755A85924AED823C3670C6E05B3" Guid="*">
2494+
<File Id="filE0505D28A989DD68C6146F1034E7869C" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\AzureRmRecoveryServicesStartup.ps1" />
2495+
</Component>
24902496
<Component Id="cmpB35FF47D728C871816F14A3529260DE9" Guid="*">
24912497
<File Id="fil4BCDE7803B14A0BC88A83E82379716A7" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Hyak.Common.dll" />
24922498
</Component>
@@ -3012,6 +3018,9 @@
30123018
<Component Id="cmpE1FBC775E0C4E8ECA1EB6C0F338FEDFA" Guid="*">
30133019
<File Id="fil23111926C8CD47148FFAC879CF352381" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.SiteRecovery\AzureRM.SiteRecovery.psd1" />
30143020
</Component>
3021+
<Component Id="cmpBDBB5E1FC6460AE7D2909CE3E22E2C5D" Guid="*">
3022+
<File Id="fil4E4B7B2FA97548E66C51482D181847ED" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.SiteRecovery\AzureRmRecoveryServicesStartup.ps1" />
3023+
</Component>
30153024
<Component Id="cmp02DCD4998B3C2CF365F95C5A38848DB3" Guid="*">
30163025
<File Id="filE4201A82491CB56C78D5CD69110836F3" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.SiteRecovery\Hyak.Common.dll" />
30173026
</Component>
@@ -6220,6 +6229,7 @@
62206229
<ComponentRef Id="cmpAB89DA9A645E197D78DE69AEF963C260" />
62216230
<ComponentRef Id="cmp103ACA9079CDD574094214F46E76D71B" />
62226231
<ComponentRef Id="cmpC96DAF4A31F86D19246E39394F496F83" />
6232+
<ComponentRef Id="cmp7A8115D2255F0900831161BE617E2A5A" />
62236233
<ComponentRef Id="cmpA77D5875EABE5151973A245C04E3858E" />
62246234
<ComponentRef Id="cmpEDB84317615898A496C0FF620B372C87" />
62256235
<ComponentRef Id="cmp91C07F114413AEF46868515C7011816D" />
@@ -6243,6 +6253,7 @@
62436253
<ComponentRef Id="cmpC00974919B90C9055BED1F2A9DA95441" />
62446254
<ComponentRef Id="cmpE300D8B185C427E05E95BA97413F6CC8" />
62456255
<ComponentRef Id="cmp131A9DE83A67006D51F1314A42E399CA" />
6256+
<ComponentRef Id="cmp9AB7E755A85924AED823C3670C6E05B3" />
62466257
<ComponentRef Id="cmpB35FF47D728C871816F14A3529260DE9" />
62476258
<ComponentRef Id="cmp99A277F4A4EF20D7BFBB171691A4B7E7" />
62486259
<ComponentRef Id="cmp1675F88279F58B72A180AF1411111337" />
@@ -6414,6 +6425,7 @@
64146425
<ComponentRef Id="cmp33536B404D22FAC69D5E34A7CF0063D4" />
64156426
<ComponentRef Id="cmpF9C7E5E1065CAC726499F6E0E92B2FBF" />
64166427
<ComponentRef Id="cmpE1FBC775E0C4E8ECA1EB6C0F338FEDFA" />
6428+
<ComponentRef Id="cmpBDBB5E1FC6460AE7D2909CE3E22E2C5D" />
64176429
<ComponentRef Id="cmp02DCD4998B3C2CF365F95C5A38848DB3" />
64186430
<ComponentRef Id="cmpCF891519A685521085AC294E4B891DD2" />
64196431
<ComponentRef Id="cmp12478F787751D3B92FA94F4344630D35" />

src/ResourceManager/RecoveryServices/AzureRM.RecoveryServices.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ NestedModules = @('.\Microsoft.Azure.Commands.RecoveryServices.ARM.dll')
7272
FunctionsToExport = @()
7373

7474
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
75-
CmdletsToExport = 'Get-AzureRmRecoveryServicesBackupProperties',
75+
CmdletsToExport = 'Get-AzureRmRecoveryServicesBackupProperty',
7676
'Get-AzureRmRecoveryServicesVault',
7777
'Get-AzureRmRecoveryServicesVaultSettingsFile',
7878
'New-AzureRmRecoveryServicesVault',
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
@{
16+
"Get-AzureRmRecoveryServicesBackupProperty" = "Get-AzureRmRecoveryServicesBackupProperties";
17+
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
<Compile Include="Utilities\CertUtils.cs" />
130130
<Compile Include="Utilities\Logger.cs" />
131131
<Compile Include="Utilities\Utilities.cs" />
132-
<Compile Include="Vault\GetAzureRmRecoveryServicesBackupProperties.cs" />
132+
<Compile Include="Vault\GetAzureRmRecoveryServicesBackupProperty.cs" />
133133
<Compile Include="Vault\GetAzureRmRecoveryServicesVaults.cs" />
134134
<Compile Include="Vault\GetAzureRmRecoveryServicesVaultSettingsFile.cs" />
135135
<Compile Include="Vault\NewAzureRmRecoveryServicesVault.cs" />
@@ -149,6 +149,9 @@
149149
<Link>AzureRM.RecoveryServices.psd1</Link>
150150
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
151151
</None>
152+
<None Include="AzureRmRecoveryServicesStartup.ps1">
153+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
154+
</None>
152155
<None Include="MSSharedLibKey.snk" />
153156
<None Include="packages.config">
154157
<SubType>Designer</SubType>
Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using System;
16-
using System.Collections.Generic;
17-
using System.Linq;
16+
using System.IO;
1817
using System.Management.Automation;
18+
using System.Reflection;
19+
using Microsoft.Azure.Commands.Common.Authentication;
1920
using Microsoft.Azure.Management.RecoveryServices.Models;
2021

2122
namespace Microsoft.Azure.Commands.RecoveryServices
@@ -24,8 +25,9 @@ namespace Microsoft.Azure.Commands.RecoveryServices
2425
/// Gets Azure Recovery Services Vault Backup Properties.
2526
/// </summary>
2627
[Cmdlet(VerbsCommon.Get, "AzureRmRecoveryServicesBackupProperty")]
28+
[Alias("Get-AzureRmRecoveryServicesBackupProperties")]
2729
[OutputType(typeof(ASRVaultBackupProperties))]
28-
public class GetAzureRmRecoveryServicesBackupProperties : RecoveryServicesCmdletBase
30+
public class GetAzureRmRecoveryServicesBackupProperty : RecoveryServicesCmdletBase, IModuleAssemblyInitializer
2931
{
3032
#region Parameters
3133

@@ -56,5 +58,22 @@ public override void ExecuteCmdlet()
5658
this.HandleException(exception);
5759
}
5860
}
61+
62+
public void OnImport()
63+
{
64+
try
65+
{
66+
System.Management.Automation.PowerShell invoker = null;
67+
invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
68+
invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
69+
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
70+
"AzureRmRecoveryServicesStartup.ps1")));
71+
invoker.Invoke();
72+
}
73+
catch
74+
{
75+
// This will throw exception for tests, ignore.
76+
}
77+
}
5978
}
6079
}

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/help/AzureRM.RecoveryServices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Locale: en-US
1111
This topic displays help topics for the Azure Recovery Services cmdlets.
1212

1313
## AzureRM.RecoveryServices Cmdlets
14-
### [Get-AzureRmRecoveryServicesBackupProperties](Get-AzureRmRecoveryServicesBackupProperties.md)
14+
### [Get-AzureRmRecoveryServicesBackupProperty](Get-AzureRmRecoveryServicesBackupProperty.md)
1515
Gets Backup properties.
1616

1717
### [Get-AzureRmRecoveryServicesVault](Get-AzureRmRecoveryServicesVault.md)

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/help/Get-AzureRmRecoveryServicesBackupProperties.md

Lines changed: 0 additions & 60 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
external help file: Microsoft.Azure.Commands.RecoveryServices.ARM.dll-Help.xml
3+
online version:
4+
schema: 2.0.0
5+
---
6+
7+
# Get-AzureRmRecoveryServicesBackupProperty
8+
9+
## SYNOPSIS
10+
Gets Backup properties.
11+
12+
## SYNTAX
13+
14+
```
15+
Get-AzureRmRecoveryServicesBackupProperty -Vault <ARSVault>
16+
```
17+
18+
## DESCRIPTION
19+
The **Get-AzureRmRecoveryServicesBackupProperty** cmdlet gets backup properties for a Recovery Services vault.
20+
21+
## EXAMPLES
22+
23+
### 1:
24+
```
25+
```
26+
27+
## PARAMETERS
28+
29+
### -Vault
30+
Specifies the name of the vault.
31+
The vault must be an **AzureRmRecoveryServicesVault** object.
32+
33+
```yaml
34+
Type: ARSVault
35+
Parameter Sets: (All)
36+
Aliases:
37+
38+
Required: True
39+
Position: Named
40+
Default value: None
41+
Accept pipeline input: True (ByValue)
42+
Accept wildcard characters: False
43+
```
44+
45+
## INPUTS
46+
47+
### Microsoft.Azure.Commands.RecoveryServices.ARSVault
48+
49+
50+
## OUTPUTS
51+
52+
### Microsoft.Azure.Commands.RecoveryServices.ASRVaultBackupProperties
53+
54+
55+
## NOTES
56+
57+
## RELATED LINKS
58+

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/help/New-AzureRmRecoveryServicesVault.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Creates a new Recovery Services vault.
1313
## SYNTAX
1414

1515
```
16-
New-AzureRmRecoveryServicesVault -Name <String> -ResourceGroupName <String> -Location <String>
17-
[<CommonParameters>]
16+
New-AzureRmRecoveryServicesVault -Name <String> -ResourceGroupName <String> -Location <String> [-WhatIf]
17+
[-Confirm] [<CommonParameters>]
1818
```
1919

2020
## DESCRIPTION
@@ -74,6 +74,36 @@ Accept pipeline input: False
7474
Accept wildcard characters: False
7575
```
7676
77+
### -Confirm
78+
Prompts you for confirmation before running the cmdlet.
79+
80+
```yaml
81+
Type: SwitchParameter
82+
Parameter Sets: (All)
83+
Aliases: cf
84+
85+
Required: False
86+
Position: Named
87+
Default value: None
88+
Accept pipeline input: False
89+
Accept wildcard characters: False
90+
```
91+
92+
### -WhatIf
93+
Shows what would happen if the cmdlet runs. The cmdlet is not run.
94+
95+
```yaml
96+
Type: SwitchParameter
97+
Parameter Sets: (All)
98+
Aliases: wi
99+
100+
Required: False
101+
Position: Named
102+
Default value: None
103+
Accept pipeline input: False
104+
Accept wildcard characters: False
105+
```
106+
77107
### CommonParameters
78108
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).
79109

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/help/Remove-AzureRmRecoveryServicesVault.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Deletes a Recovery Services vault.
1313
## SYNTAX
1414

1515
```
16-
Remove-AzureRmRecoveryServicesVault -Vault <ARSVault> [<CommonParameters>]
16+
Remove-AzureRmRecoveryServicesVault -Vault <ARSVault> [-WhatIf] [-Confirm] [<CommonParameters>]
1717
```
1818

1919
## DESCRIPTION
@@ -43,6 +43,36 @@ Accept pipeline input: True (ByValue)
4343
Accept wildcard characters: False
4444
```
4545
46+
### -Confirm
47+
Prompts you for confirmation before running the cmdlet.
48+
49+
```yaml
50+
Type: SwitchParameter
51+
Parameter Sets: (All)
52+
Aliases: cf
53+
54+
Required: False
55+
Position: Named
56+
Default value: None
57+
Accept pipeline input: False
58+
Accept wildcard characters: False
59+
```
60+
61+
### -WhatIf
62+
Shows what would happen if the cmdlet runs. The cmdlet is not run.
63+
64+
```yaml
65+
Type: SwitchParameter
66+
Parameter Sets: (All)
67+
Aliases: wi
68+
69+
Required: False
70+
Position: Named
71+
Default value: None
72+
Accept pipeline input: False
73+
Accept wildcard characters: False
74+
```
75+
4676
### CommonParameters
4777
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).
4878

0 commit comments

Comments
 (0)