@@ -34,9 +34,10 @@ public class GetAzureProviderOperationCommand : ResourcesBaseCmdlet
34
34
/// <summary>
35
35
/// Gets or sets the provider namespace
36
36
/// </summary>
37
+ [ Alias ( "OperationSearchString" ) ]
37
38
[ Parameter ( Position = 0 , Mandatory = true , ValueFromPipelineByPropertyName = false , ValueFromPipeline = true , HelpMessage = "The action string." ) ]
38
39
[ ValidateNotNullOrEmpty ]
39
- public string OperationSearchString { get ; set ; }
40
+ public string Name { get ; set ; }
40
41
41
42
/// <summary>
42
43
/// Executes the cmdlet
@@ -45,19 +46,19 @@ public override void ExecuteCmdlet()
45
46
{
46
47
WriteWarning ( "The output object type of this cmdlet will be modified in a future release." ) ;
47
48
// remove leading and trailing whitespaces
48
- this . OperationSearchString = this . OperationSearchString . Trim ( ) ;
49
+ this . Name = this . Name . Trim ( ) ;
49
50
50
- ValidateActionSearchString ( this . OperationSearchString ) ;
51
+ ValidateActionSearchString ( this . Name ) ;
51
52
52
53
List < PSResourceProviderOperation > operationsToDisplay ;
53
54
54
- if ( this . OperationSearchString . Contains ( WildCardCharacter ) )
55
+ if ( this . Name . Contains ( WildCardCharacter ) )
55
56
{
56
- operationsToDisplay = this . ProcessProviderOperationsWithWildCard ( OperationSearchString ) ;
57
+ operationsToDisplay = this . ProcessProviderOperationsWithWildCard ( Name ) ;
57
58
}
58
59
else
59
60
{
60
- operationsToDisplay = this . ProcessProviderOperationsWithoutWildCard ( OperationSearchString ) ;
61
+ operationsToDisplay = this . ProcessProviderOperationsWithoutWildCard ( Name ) ;
61
62
}
62
63
63
64
this . WriteObject ( operationsToDisplay , enumerateCollection : true ) ;
@@ -91,7 +92,7 @@ private List<PSResourceProviderOperation> ProcessProviderOperationsWithWildCard(
91
92
WildcardPattern wildcard = new WildcardPattern ( actionSearchString , WildcardOptions . IgnoreCase | WildcardOptions . Compiled ) ;
92
93
93
94
List < ProviderOperationsMetadata > providers = new List < ProviderOperationsMetadata > ( ) ;
94
- string provider = this . OperationSearchString . Split ( Separator ) . First ( ) ;
95
+ string provider = this . Name . Split ( Separator ) . First ( ) ;
95
96
if ( provider . Equals ( WildCardCharacter ) )
96
97
{
97
98
// 'Get-AzureRmProviderOperation *' or 'Get-AzureRmProviderOperation */virtualmachines/*'
0 commit comments