1
1
---
2
- external help file : Az. Compute-help .xml
2
+ external help file : Microsoft.Azure.PowerShell.Cmdlets. Compute.dll-Help .xml
3
3
Module Name : Az.Compute
4
- online version : https://docs.microsoft.com/powershell/module/az.compute/get-azvmruncommand
4
+ online version : https://docs.microsoft.com/powershell/module/az.compute/Get-AzVMRunCommand
5
5
schema : 2.0.0
6
6
---
7
7
8
8
# Get-AzVMRunCommand
9
9
10
10
## SYNOPSIS
11
- Gets specific run command for a subscription in a location.
11
+ Gets a specific Run Command or a list of Run Commands for a Virtual Machine
12
12
13
13
## SYNTAX
14
14
15
- ### List (Default)
16
- ```
17
- Get-AzVMRunCommand -Location <String> [-SubscriptionId <String[]>] [-DefaultProfile <PSObject>]
18
- [<CommonParameters>]
19
- ```
20
-
21
- ### Get
22
- ```
23
- Get-AzVMRunCommand -CommandId <String> -Location <String> [-SubscriptionId <String[]>]
24
- [-DefaultProfile <PSObject>] [<CommonParameters>]
25
- ```
26
-
27
- ### List1
28
- ```
29
- Get-AzVMRunCommand [-SubscriptionId <String[]>] -ResourceGroupName <String> -VMName <String> [-Expand <String>]
30
- [-DefaultProfile <PSObject>] [<CommonParameters>]
31
- ```
32
-
33
- ### Get1
34
15
```
35
- Get-AzVMRunCommand [-SubscriptionId <String[]>] -ResourceGroupName <String> -RunCommandName <String>
36
- -VMName <String> [-Expand <String>] [-DefaultProfile <PSObject>] [<CommonParameters>]
37
- ```
38
-
39
- ### GetViaIdentity
40
- ```
41
- Get-AzVMRunCommand -InputObject <IComputeIdentity> [-DefaultProfile <PSObject>] [<CommonParameters>]
16
+ Get-AzVMRunCommand -ResourceGroupName <String> -VMName <String> [-RunCommandName <String>] [-Expand <String>]
17
+ [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
42
18
```
43
19
44
20
## DESCRIPTION
@@ -51,11 +27,6 @@ Gets specific run command for a subscription in a location.
51
27
Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand2"
52
28
```
53
29
54
- ``` output
55
- Location Name Type
56
- -------- ---- ----
57
- eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands
58
- ```
59
30
60
31
Get Run Command by it's name.
61
32
@@ -64,40 +35,17 @@ Get Run Command by it's name.
64
35
Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname
65
36
```
66
37
67
- ``` output
68
- Location Name Type
69
- -------- ---- ----
70
- eastus firstruncommand Microsoft.Compute/virtualMachines/runCommands
71
- eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands
72
- eastus firstruncommand3 Microsoft.Compute/virtualMachines/runCommands
73
- ```
74
-
75
38
Get Run Commands by VM name
76
39
77
40
## PARAMETERS
78
41
79
- ### -CommandId
80
- The command id.
81
-
82
- ``` yaml
83
- Type : System.String
84
- Parameter Sets : Get
85
- Aliases :
86
-
87
- Required : True
88
- Position : Named
89
- Default value : None
90
- Accept pipeline input : False
91
- Accept wildcard characters : False
92
- ` ` `
93
-
94
42
### -DefaultProfile
95
43
The credentials, account, tenant, and subscription used for communication with Azure.
96
44
97
45
``` yaml
98
- Type : System.Management.Automation.PSObject
46
+ Type : Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
99
47
Parameter Sets : (All)
100
- Aliases : AzureRMContext , AzureCredential
48
+ Aliases : AzContext, AzureRmContext , AzureCredential
101
49
102
50
Required : False
103
51
Position : Named
@@ -107,48 +55,17 @@ Accept wildcard characters: False
107
55
` ` `
108
56
109
57
### -Expand
110
- The expand expression to apply on the operation.
58
+ The expand expression to apply on the operation. Possible value(s): InstanceView
111
59
112
60
` ` ` yaml
113
61
Type : System.String
114
- Parameter Sets : List1, Get1
62
+ Parameter Sets : (All)
115
63
Aliases :
116
64
117
65
Required : False
118
66
Position : Named
119
67
Default value : None
120
- Accept pipeline input : False
121
- Accept wildcard characters : False
122
- ` ` `
123
-
124
- ### -InputObject
125
- Identity Parameter
126
- To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
127
-
128
- ` ` ` yaml
129
- Type : Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity
130
- Parameter Sets : GetViaIdentity
131
- Aliases :
132
-
133
- Required : True
134
- Position : Named
135
- Default value : None
136
- Accept pipeline input : True (ByValue)
137
- Accept wildcard characters : False
138
- ` ` `
139
-
140
- ### -Location
141
- The location upon which run commands is queried.
142
-
143
- ` ` ` yaml
144
- Type : System.String
145
- Parameter Sets : List, Get
146
- Aliases :
147
-
148
- Required : True
149
- Position : Named
150
- Default value : None
151
- Accept pipeline input : False
68
+ Accept pipeline input : True (ByPropertyName)
152
69
Accept wildcard characters : False
153
70
` ` `
154
71
@@ -157,44 +74,28 @@ The name of the resource group.
157
74
158
75
` ` ` yaml
159
76
Type : System.String
160
- Parameter Sets : List1, Get1
77
+ Parameter Sets : (All)
161
78
Aliases :
162
79
163
80
Required : True
164
81
Position : Named
165
82
Default value : None
166
- Accept pipeline input : False
167
- Accept wildcard characters : False
83
+ Accept pipeline input : True (ByPropertyName)
84
+ Accept wildcard characters : True
168
85
` ` `
169
86
170
87
### -RunCommandName
171
88
The name of the virtual machine run command.
172
89
173
90
` ` ` yaml
174
91
Type : System.String
175
- Parameter Sets : Get1
176
- Aliases :
177
-
178
- Required : True
179
- Position : Named
180
- Default value : None
181
- Accept pipeline input : False
182
- Accept wildcard characters : False
183
- ` ` `
184
-
185
- ### -SubscriptionId
186
- Subscription credentials which uniquely identify Microsoft Azure subscription.
187
- The subscription ID forms part of the URI for every service call.
188
-
189
- ` ` ` yaml
190
- Type : System.String[]
191
- Parameter Sets : List, Get, List1, Get1
92
+ Parameter Sets : (All)
192
93
Aliases :
193
94
194
95
Required : False
195
96
Position : Named
196
- Default value : (Get-AzContext).Subscription.Id
197
- Accept pipeline input : False
97
+ Default value : None
98
+ Accept pipeline input : True (ByPropertyName)
198
99
Accept wildcard characters : False
199
100
` ` `
200
101
@@ -203,13 +104,13 @@ The name of the virtual machine containing the run command.
203
104
204
105
` ` ` yaml
205
106
Type : System.String
206
- Parameter Sets : List1, Get1
107
+ Parameter Sets : (All)
207
108
Aliases :
208
109
209
110
Required : True
210
111
Position : Named
211
112
Default value : None
212
- Accept pipeline input : False
113
+ Accept pipeline input : True (ByPropertyName)
213
114
Accept wildcard characters : False
214
115
` ` `
215
116
0 commit comments