Skip to content

Commit fe1df4b

Browse files
committed
fix try/catch update examples
1 parent 53b8f6b commit fe1df4b

10 files changed

+36
-38
lines changed

src/DevCenter/DevCenter/help/Get-AzDevCenterUserDevBoxCustomizationTaskLog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,30 +48,30 @@ Gets the log for a customization task.
4848
Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4"
4949
```
5050

51-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".
51+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
5252

5353
### Example 2: Get a customization task by dev center
5454
```powershell
5555
Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4"
5656
```
5757

58-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".
58+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
5959

6060
### Example 3: Get a customization task by endpoint and InputObject
6161
```powershell
6262
$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" ="DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "me"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" }
6363
Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationTaskInput
6464
```
6565

66-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".
66+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
6767

6868
### Example 4: Get a customization task by dev center and InputObject
6969
```powershell
7070
$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" = "DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" }
7171
Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -InputObject $customizationTaskInput
7272
```
7373

74-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".
74+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
7575

7676
## PARAMETERS
7777

src/DevCenter/DevCenter/help/New-AzDevCenterUserDevBoxCustomizationGroup.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Applies customizations to the Dev Box.
4545

4646
## EXAMPLES
4747

48-
### Example 1: Create a customization group by endpoint
48+
### Example 1: Create a customization groupby endpoint
4949
```powershell
5050
$task = @{
5151
Name = "catalogName/choco"
@@ -61,30 +61,30 @@ $tasks = @($task)
6161
New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks
6262
```
6363

64-
This command creates the customization group "Provisioning" for the dev box "myDevBox".
64+
This command creates the customization group "Provisoning" for the dev box "myDevBox".
6565

66-
### Example 2: Create a customization group by dev center
66+
### Example 2: Create a customization groupby dev center
6767
```powershell
6868
New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -UserId "me" -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks
6969
```
7070

71-
This command creates the customization group "Provisioning" for the dev box "myDevBox".
71+
This command creates the customization group "Provisoning" for the dev box "myDevBox".
7272

73-
### Example 3: Create a customization group by endpoint and InputObject
73+
### Example 3: Create a customization groupby endpoint and InputObject
7474
```powershell
7575
$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" }
7676
New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationGroupInput -Task $tasks
7777
```
7878

79-
This command creates the customization group "Provisioning" for the dev box "myDevBox".
79+
This command creates the customization group "Provisoning" for the dev box "myDevBox".
8080

81-
### Example 4: Create a customization group by dev center and InputObject
81+
### Example 4: Create a customization groupby dev center and InputObject
8282
```powershell
8383
$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" }
8484
New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject $customizationGroupInput -Task $tasks
8585
```
8686

87-
This command creates the customization group "Provisioning" for the dev box "myDevBox".
87+
This command creates the customization group "Provisoning" for the dev box "myDevBox".
8888

8989
## PARAMETERS
9090

@@ -212,7 +212,7 @@ Accept wildcard characters: False
212212
213213
### -Task
214214
Tasks to apply.
215-
Note by default tasks are excluded from the response when listing customization groups.
215+
Note by default tasks are excluded from the response whenlisting customization groups.
216216
To include them, use the `include=tasks` queryparameter.
217217
To construct, see NOTES section for TASK properties and create a hash table.
218218

src/DevCenter/DevCenter/help/Repair-AzDevCenterUserDevBox.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The Dev Box may restart during this operation.
4747

4848
## EXAMPLES
4949

50-
### Example 1: Repair dev box by endpoint
50+
### Example 1: Reapir dev box by endpoint
5151
```powershell
5252
Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name myDevBox -ProjectName DevProject
5353
```
@@ -69,7 +69,7 @@ Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b18
6969

7070
This command repairs the dev box "myDevBox".
7171

72-
### Example 4: Repair dev box by dev center and InputObject
72+
### Example 4: Reapir dev box by dev center and InputObject
7373
```powershell
7474
$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject";}
7575
Repair-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput

src/DevCenter/DevCenterData.AutoRest/docs/Get-AzDevCenterUserDevBoxCustomizationTaskLog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,30 +48,30 @@ Gets the log for a customization task.
4848
Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4"
4949
```
5050

51-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
51+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".
5252

5353
### Example 2: Get a customization task by dev center
5454
```powershell
5555
Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4"
5656
```
5757

58-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
58+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".
5959

6060
### Example 3: Get a customization task by endpoint and InputObject
6161
```powershell
6262
$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" ="DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "me"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" }
6363
Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationTaskInput
6464
```
6565

66-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
66+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".
6767

6868
### Example 4: Get a customization task by dev center and InputObject
6969
```powershell
7070
$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" = "DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" }
7171
Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -InputObject $customizationTaskInput
7272
```
7373

74-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
74+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".
7575

7676
## PARAMETERS
7777

src/DevCenter/DevCenterData.AutoRest/docs/New-AzDevCenterUserDevBoxCustomizationGroup.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Applies customizations to the Dev Box.
4343

4444
## EXAMPLES
4545

46-
### Example 1: Create a customization groupby endpoint
46+
### Example 1: Create a customization group by endpoint
4747
```powershell
4848
$task = @{
4949
Name = "catalogName/choco"
@@ -61,22 +61,22 @@ New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-467
6161

6262
This command creates the customization group "Provisoning" for the dev box "myDevBox".
6363

64-
### Example 2: Create a customization groupby dev center
64+
### Example 2: Create a customization group by dev center
6565
```powershell
6666
New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -UserId "me" -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks
6767
```
6868

6969
This command creates the customization group "Provisoning" for the dev box "myDevBox".
7070

71-
### Example 3: Create a customization groupby endpoint and InputObject
71+
### Example 3: Create a customization group by endpoint and InputObject
7272
```powershell
7373
$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" }
7474
New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationGroupInput -Task $tasks
7575
```
7676

7777
This command creates the customization group "Provisoning" for the dev box "myDevBox".
7878

79-
### Example 4: Create a customization groupby dev center and InputObject
79+
### Example 4: Create a customization group by dev center and InputObject
8080
```powershell
8181
$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" }
8282
New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject $customizationGroupInput -Task $tasks

src/DevCenter/DevCenterData.AutoRest/docs/Repair-AzDevCenterUserDevBox.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The Dev Box may restart during this operation.
4343

4444
## EXAMPLES
4545

46-
### Example 1: Reapir dev box by endpoint
46+
### Example 1: Repair dev box by endpoint
4747
```powershell
4848
Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name myDevBox -ProjectName DevProject
4949
```
@@ -65,7 +65,7 @@ Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b18
6565

6666
This command repairs the dev box "myDevBox".
6767

68-
### Example 4: Reapir dev box by dev center and InputObject
68+
### Example 4: Repair dev box by dev center and InputObject
6969
```powershell
7070
$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject";}
7171
Repair-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput

src/DevCenter/DevCenterData.AutoRest/examples/Get-AzDevCenterUserDevBoxCustomizationTaskLog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
```powershell
33
Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4"
44
```
5-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
5+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".
66

77
### Example 2: Get a customization task by dev center
88
```powershell
99
Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4"
1010
```
11-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
11+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".
1212

1313
### Example 3: Get a customization task by endpoint and InputObject
1414
```powershell
1515
$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" ="DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "me"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" }
1616
Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationTaskInput
1717
```
18-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
18+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".
1919

2020
### Example 4: Get a customization task by dev center and InputObject
2121
```powershell
2222
$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" = "DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" }
2323
Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -InputObject $customizationTaskInput
2424
```
25-
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provsioning" in the dev box "MyDevBox".
25+
This command gets the logs of the customization task "91835dc0-ef5a-4f58-9e3a-099aea8481f4" for the customization group "Provisioning" in the dev box "MyDevBox".

src/DevCenter/DevCenterData.AutoRest/examples/New-AzDevCenterUserDevBoxCustomizationGroup.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Example 1: Create a customization groupby endpoint
1+
### Example 1: Create a customization group by endpoint
22
```powershell
33
$task = @{
44
Name = "catalogName/choco"
@@ -15,20 +15,20 @@ New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-467
1515
```
1616
This command creates the customization group "Provisoning" for the dev box "myDevBox".
1717

18-
### Example 2: Create a customization groupby dev center
18+
### Example 2: Create a customization group by dev center
1919
```powershell
2020
New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -UserId "me" -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks
2121
```
2222
This command creates the customization group "Provisoning" for the dev box "myDevBox".
2323

24-
### Example 3: Create a customization groupby endpoint and InputObject
24+
### Example 3: Create a customization group by endpoint and InputObject
2525
```powershell
2626
$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" }
2727
New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationGroupInput -Task $tasks
2828
```
2929
This command creates the customization group "Provisoning" for the dev box "myDevBox".
3030

31-
### Example 4: Create a customization groupby dev center and InputObject
31+
### Example 4: Create a customization group by dev center and InputObject
3232
```powershell
3333
$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" }
3434
New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject $customizationGroupInput -Task $tasks

src/DevCenter/DevCenterData.AutoRest/examples/Repair-AzDevCenterUserDevBox.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Example 1: Reapir dev box by endpoint
1+
### Example 1: Repair dev box by endpoint
22
```powershell
33
Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name myDevBox -ProjectName DevProject
44
```
@@ -17,7 +17,7 @@ Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b18
1717
```
1818
This command repairs the dev box "myDevBox".
1919

20-
### Example 4: Reapir dev box by dev center and InputObject
20+
### Example 4: Repair dev box by dev center and InputObject
2121
```powershell
2222
$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject";}
2323
Repair-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput

tools/BuildScripts/AdaptAutorestModule.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,9 @@ try{
249249
& $resolveScriptPath -ModuleName $ModuleRootName -ArtifactFolder $artifacts -Psd1Folder $parentModulePath
250250
} -ArgumentList $RepoRoot, $ModuleRootName, $parentModuleName, $SubModuleName, $subModuleNameTrimmed
251251
try {
252-
# Code that may fail due to missing type
253252
$job | Wait-Job | Receive-Job
254253
} catch {
255-
Write-Warning "Type not found or other error: $($_.Exception.Message)"
256-
# Optionally, handle the error or set a fallback value here
254+
Write-Warning "Error: $($_.Exception.Message)"
257255
}
258256
$job | Remove-Job
259257
} finally {

0 commit comments

Comments
 (0)