Skip to content

Commit a490ff9

Browse files
committed
Merge pull request #27 from Azure/ignite
Ignite
2 parents 0d23979 + 0e04d5e commit a490ff9

File tree

4 files changed

+4298
-1136
lines changed

4 files changed

+4298
-1136
lines changed

src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/RemoveAzureVMDscExtension.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,38 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using System.Globalization;
1516
using System.Management.Automation;
1617
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
18+
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
1719

1820
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions
1921
{
22+
/// <summary>
23+
/// This cmdlet is used to remove DSC extension handler from a given virtual machine(s)
24+
/// in a cloud service.
25+
///
26+
/// Note: To get detailed output -Verbose flag need to be specified. Output of this cmdlet needs to be piped to Update-AzureVM cmdlet
27+
///
28+
/// Example Usage:
29+
///
30+
/// $vm = Get-AzureVM -ServiceName service -Name VM-name
31+
/// Remove-AzureVMDscExtension -VM $vm | Update-AzureVM -Verbose
32+
/// </summary>
2033
[Cmdlet(VerbsCommon.Remove, VirtualMachineDscExtensionCmdletNoun),
2134
OutputType(typeof(IPersistentVM))]
2235
public class RemoveAzureVMDscExtensionCommand : VirtualMachineDscExtensionCmdletBase
2336
{
2437

2538
internal void ExecuteCommand()
2639
{
40+
//this parameter needs to be true for remove to work
41+
this.Uninstall = true;
42+
this.Version = DefaultExtensionVersion;
43+
2744
RemovePredicateExtensions();
45+
AddResourceExtension();
46+
2847
WriteObject(VM);
2948
}
3049

src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21040,21 +21040,23 @@ The default value is Production.</maml:para>
2104021040
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
2104121041
<!--Generated by PS Cmdlet Help Editor-->
2104221042
<command:details>
21043-
<command:name>Remove-AzureVMDscExtension</command:name>
21043+
<command:name>
21044+
Remove-AzureVMDscExtension
21045+
</command:name>
2104421046
<maml:description>
21045-
<maml:para>Remove Azure VM DSC Extension from a VM.</maml:para>
21047+
<maml:para>Removes DSC extension handler from a given virtual machine(s) in a cloud service. Output of this cmdlet needs to be piped to Update-AzureVM cmdlet. To get detailed output -Verbose flag need to be specified. </maml:para>
2104621048
</maml:description>
2104721049
<maml:copyright>
21048-
<maml:para />
21050+
<maml:para></maml:para>
2104921051
</maml:copyright>
2105021052
<command:verb>Remove</command:verb>
2105121053
<command:noun>AzureVMDscExtension</command:noun>
21052-
<dev:version />
21054+
<dev:version></dev:version>
2105321055
</command:details>
2105421056
<maml:description>
21055-
<!--This is the Description section-->
21056-
<maml:para>Remove Azure VM DSC Extension from a VM.</maml:para>
21057+
<maml:para>Removes DSC extension handler from a given virtual machine(s) in a cloud service. Output of this cmdlet needs to be piped to Update-AzureVM cmdlet. To get detailed output -Verbose flag need to be specified.</maml:para>
2105721058
</maml:description>
21059+
<!-- Cmdlet syntax section-->
2105821060
<command:syntax>
2105921061
<command:syntaxItem>
2106021062
<maml:name>Remove-AzureVMDscExtension</maml:name>
@@ -21067,13 +21069,14 @@ The default value is Production.</maml:para>
2106721069
</command:parameter>
2106821070
</command:syntaxItem>
2106921071
</command:syntax>
21072+
<!-- Cmdlet parameter section -->
2107021073
<command:parameters>
2107121074
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="named">
2107221075
<maml:name>VM</maml:name>
2107321076
<maml:description>
2107421077
<maml:para>The persistent VM object.</maml:para>
2107521078
</maml:description>
21076-
<command:parameterValue required="true" variableLength="false">IPersistentVM</command:parameterValue>
21079+
<command:parameterValue required="true" variableLength="false">IPersistentVM</command:parameterValue>
2107721080
<dev:type>
2107821081
<maml:name>IPersistentVM</maml:name>
2107921082
<maml:uri/>
@@ -21105,45 +21108,53 @@ The default value is Production.</maml:para>
2110521108
<dev:defaultValue></dev:defaultValue>
2110621109
</command:parameter>
2110721110
</command:parameters>
21111+
<!-- Input - Output section-->
2110821112
<command:inputTypes>
2110921113
<command:inputType>
2111021114
<dev:type>
2111121115
<maml:name></maml:name>
2111221116
<maml:uri/>
21113-
<maml:description>
21114-
<maml:para></maml:para>
21115-
</maml:description>
21117+
<maml:description />
2111621118
</dev:type>
21117-
<maml:description></maml:description>
21119+
<maml:description>
21120+
<maml:para>
21121+
<!-- description -->
21122+
</maml:para>
21123+
</maml:description>
2111821124
</command:inputType>
2111921125
</command:inputTypes>
2112021126
<command:returnValues>
2112121127
<command:returnValue>
2112221128
<dev:type>
2112321129
<maml:name></maml:name>
2112421130
<maml:uri/>
21125-
<maml:description>
21126-
<maml:para></maml:para>
21127-
</maml:description>
21128-
</dev:type>
21131+
- <maml:description>
21132+
- <maml:para></maml:para>
21133+
- </maml:description>
21134+
- </dev:type>
2112921135
<maml:description></maml:description>
21130-
</command:returnValue>
21131-
</command:returnValues>
21132-
<command:terminatingErrors></command:terminatingErrors>
21133-
<command:nonTerminatingErrors></command:nonTerminatingErrors>
21136+
- </command:returnValue>
21137+
- </command:returnValues>
21138+
<!-- Error section-->
21139+
<command:terminatingErrors />
21140+
<command:nonTerminatingErrors />
21141+
<!-- Notes section -->
2113421142
<maml:alertSet>
2113521143
<maml:title></maml:title>
2113621144
<maml:alert>
2113721145
<maml:para></maml:para>
2113821146
</maml:alert>
21147+
<maml:alert>
21148+
<maml:para></maml:para>
21149+
</maml:alert>
2113921150
</maml:alertSet>
2114021151
<command:examples>
2114121152
<command:example>
2114221153
<maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
2114321154
<maml:introduction>
2114421155
<maml:para></maml:para>
2114521156
</maml:introduction>
21146-
<dev:code>PS C:\&gt; Remove-AzureVMDscExtension -VM $vm</dev:code>
21157+
<dev:code>PS C:\&gt; Remove-AzureVMDscExtension -VM $vm | Update-AzureVM</dev:code>
2114721158
<dev:remarks>
2114821159
<maml:para>Description</maml:para>
2114921160
</dev:remarks>

src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.format.ps1xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,7 @@
650650
</View>
651651
<View>
652652
<Name>Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.VirtualMachineDscExtensionStatusContext</Name>
653+
<OutOfBand />
653654
<ViewSelectedBy>
654655
<TypeName>Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.VirtualMachineDscExtensionStatusContext</TypeName>
655656
</ViewSelectedBy>

0 commit comments

Comments
 (0)