Skip to content

Commit 6b2d514

Browse files
authored
Merge pull request MicrosoftDocs#2666 from nschonni/typo-repo_docs/UPDATE_CMDLETS.md
typo: repo_docs/UPDATE_CMDLETS.md
2 parents abbb0c6 + 0601dc6 commit 6b2d514

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

repo_docs/UPDATE_CMDLETS.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ Manually adding new parameters to a cmdlet reference topic is doable, but there
33

44
- **Add the paramter and Type value to the SYNTAX block(s)**: Easy to do if there's only one, but what if there are multiple SYNTAX blocks (also known as parameter sets)? Does the new parameter go in one, some, or all of them? And what about the parameter Type value (String? `$true | $ false`? A finite list of values?)
55

6-
- **Create a new section for each parameter**: It's easy to create the section and write the descrition, but again, what about the parameter Type value? And which parameter sets does it belong to?
6+
- **Create a new section for each parameter**: It's easy to create the section and write the description, but again, what about the parameter Type value? And which parameter sets does it belong to?
77

88
The reality is: you almost always need the open-source [platyPS](https://github.com/PowerShell/platyPS) tool to automatically answer the unknowns about new parameters.
99

10-
Currently, the best method with platyPS is to simply create a new version of the topic using the **New-MarkdownHelp** cmdlet, and copy whatever you need out of it. Theoretically, platyPS has an **Update-MarkdownHelp** cmdlet that automatically updates an existing local copy of the topic for you, which you can then upload in its entirety to the GitHub website to replace the exisitng topic. This approach currently has some issues in our enviornment:
10+
Currently, the best method with platyPS is to simply create a new version of the topic using the **New-MarkdownHelp** cmdlet, and copy whatever you need out of it. Theoretically, platyPS has an **Update-MarkdownHelp** cmdlet that automatically updates an existing local copy of the topic for you, which you can then upload in its entirety to the GitHub website to replace the existing topic. This approach currently has some issues in our environment:
1111

1212
- It's difficult to get a local copy of an existing cmdlet topic from the GitHub website (unless you're interested in forking the repo and having a local cloned copy on your computer). You have to copy/paste everything from the Raw view of the topic on the web site, and the local copy text file you manually create needs to be UTF-8 formatted (instead of the Notepad default of ANSI).
1313

1414
- The updated topic will have missing or incorrect _unrelated_ parameter and other topic metadata information that you'll need to change by copy/pasting those values _back from_ the existing topic on GitHub into your local topic before you can even think about uploading the updated topic to GitHub (more than double the work required).
1515

1616
In short, it's simply easier and faster to generate a new local copy of the cmdlet topic, and copy/paste only what you need into the existing topic on GitHub.
1717

18-
Removing parameters from topics is a manual excercise, but we'll explain the process fully.
18+
Removing parameters from topics is a manual exercise, but we'll explain the process fully.
1919

2020
## Use platyPS to add new cmdlets to existing topics
2121

@@ -28,7 +28,7 @@ You probably know how to do this already, but the available workloads and connec
2828
### Step 3: Load platyPS in the PowerShell environment
2929
After you've connected in PowerShell to the server or service (either in a regular Windows PowerShell window or from a specific PowerShell console shortcut), run the following command to make the platyPS cmdlets available in your session:
3030

31-
```
31+
```powershell
3232
Import-Module platyPS
3333
```
3434

@@ -39,37 +39,37 @@ To recap: this step is required in Exchange, Skype for Business Online and other
3939

4040
If you're using SharePoint, SharePoint Online or another product that doesn't use remote PowerShell to connect, you can skip this step.
4141

42-
### Step 5: Use New-MarkdownHelp to dump the latest verion of the cmdlet to a file
42+
### Step 5: Use New-MarkdownHelp to dump the latest version of the cmdlet to a file
4343
These instructions are the same (up to a point) as in [Create new cmdlet topics](NEW_CMDLETS.md):
4444

4545
The basic syntax is:
4646

47-
```
47+
```powershell
4848
New-MarkdownHelp -Command <Cmdlet> -OutputFolder "<Path"> [-Session <PSSessionVariableName>]
4949
```
5050

5151
or
5252

53-
```
53+
```powershell
5454
$x = "<Cmdlet1>","<Cmdlet2>",..."<CmdletN>"
5555
New-MarkdownHelp -Command $x -OutputFolder "<Path"> [-Session <PSSessionVariableName>]
5656
```
5757

5858
This example create a topic file for the updated cmdlet named Get-CoolFeature in the Exchange Online PowerShell session where the session variable is `$Session` in the folder "C:\My Docs\ExO".
5959

60-
```
60+
```powershell
6161
New-MarkdownHelp -Command "Get-CoolFeature" -OutputFolder "C:\My Docs\ExO" -Session $Session
6262
```
6363

6464
This example creates topic files for the updated cmdlets Get-CoolFeature, New-CoolFeature, Remove-CoolFeature, and Set-CoolFeature from the Exchange Online session where the session variable is `$Session` in the folder C:\My Docs\ExO.
6565

6666
The first command stores the cmdlet names in a variable. The second command uses that variable to identify the cmdlets and write the output files.
6767

68-
```
68+
```powershell
6969
$Delta = "Get-CoolFeature","New-CoolFeature","Remove-CoolFeature","Set-CoolFeature"
7070
```
7171

72-
```
72+
```powershell
7373
New-MarkdownHelp -Command $Delta -OutputFolder "C:\My Docs\ExO" -Session $Session
7474
```
7575

@@ -78,25 +78,25 @@ The resulting topics are plain text UTF-8 files that are formatted using [markdo
7878

7979
1. Find the new parameter(s) in the SYNTAX block and the parameter sections.
8080

81-
2. Add a parameter description. We highly enourage you to plagerize existing content and formatting from other cmdlet topics. Many parameters are common across a wide variety of cmdlets.
81+
2. Add a parameter description. We highly encourage you to plagiarize existing content and formatting from other cmdlet topics. Many parameters are common across a wide variety of cmdlets.
8282

8383
3. Create/fill out the parameter metadata like other existing parameters in the topic.
8484

8585
Here's an example of the parameter metadata that's present in every parameter section:
8686

87-
```
88-
Type: String
89-
Parameter Sets: (All)
90-
Aliases:
91-
Applicable: Microsoft StaffHub
92-
Required: False
93-
Position: 1
94-
Default value: None
95-
Accept pipeline input: False
96-
Accept wildcard characters: False
87+
```yaml
88+
Type: String
89+
Parameter Sets: (All)
90+
Aliases:
91+
Applicable: Microsoft StaffHub
92+
Required: False
93+
Position: 1
94+
Default value: None
95+
Accept pipeline input: False
96+
Accept wildcard characters: False
9797
```
9898
99-
Most of the atrributes and values are generated automatically by platyPS. The ones that require manual intervention are:
99+
Most of the attributes and values are generated automatically by platyPS. The ones that require manual intervention are:
100100
101101
- **Applicable**: You need to add this attribute and value yourself. Notice the capital 'A'. See other topics for available values (same available values as the **applicable** attribute at the top of the topic). Don't invent new values here. The value **must** come from the list of predefined values.
102102
@@ -109,7 +109,7 @@ At this point, the steps are basically identical to [Short URL: aka.ms/office-po
109109
110110
- Exchange: [https://github.com/MicrosoftDocs/office-docs-powershell/tree/master/exchange/exchange-ps/exchange](https://github.com/MicrosoftDocs/office-docs-powershell/tree/master/exchange/exchange-ps/exchange)
111111
112-
For Exchage, you also need to go one level deepter into an appropriate subfolder.
112+
For Exchange, you also need to go one level deeper into an appropriate subfolder.
113113
114114
- Office Web Apps: [https://github.com/MicrosoftDocs/office-docs-powershell/tree/master/officewebapps/officewebapps-ps/officewebapps](https://github.com/MicrosoftDocs/office-docs-powershell/tree/master/officewebapps/officewebapps-ps/officewebapps)
115115
@@ -141,9 +141,9 @@ At this point, the steps are basically identical to [Short URL: aka.ms/office-po
141141
7. On the next screen, click **Create pull request**.
142142
143143
## Remove existing parameters from existing topics
144-
Removing parameters is a search and destroy mission in the existing topics on GitHub, using the basic [Editing Instrucstions](../README.md).
144+
Removing parameters is a search and destroy mission in the existing topics on GitHub, using the basic [Editing Instructions](../README.md).
145145
146-
The most important thing to remember: a parameter isn't gone until it's truly not available to customers. If a parameter is still available, but it's going away "in the future", it doesn't work correctly anymore, or isn't supposed to be available, it needs to remain in the topic until the product code is actually changed to remove the parameter. Until then, you can use this type of languague for the parameter description:
146+
The most important thing to remember: a parameter isn't gone until it's truly not available to customers. If a parameter is still available, but it's going away "in the future", it doesn't work correctly anymore, or isn't supposed to be available, it needs to remain in the topic until the product code is actually changed to remove the parameter. Until then, you can use this type of language for the parameter description:
147147
148148
- This parameter is reserved for internal Microsoft use.
149149

0 commit comments

Comments
 (0)