Skip to content

Commit 975c009

Browse files
sdwheelerDCtheGeek
authored andcommitted
Fixes #4938 - fix MemberType enum value name (#4941)
1 parent 2a9ec2e commit 975c009

File tree

6 files changed

+225
-234
lines changed

6 files changed

+225
-234
lines changed

reference/3.0/Microsoft.PowerShell.Utility/Add-Member.md

Lines changed: 81 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
2+
external help file: Microsoft.PowerShell.Commands.Utility.dll-help.xml
33
keywords: powershell,cmdlet
44
locale: en-us
5+
Module Name: Microsoft.PowerShell.Utility
56
ms.date: 4/26/2019
67
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/add-member?view=powershell-3.0&WT.mc_id=ps-gethelp
78
schema: 2.0.0
@@ -10,39 +11,35 @@ title: Add-Member
1011
# Add-Member
1112

1213
## SYNOPSIS
13-
Adds custom properties and methods to an instance of a Windows PowerShell object.
14+
Adds custom properties and methods to an instance of a PowerShell object.
1415

1516
## SYNTAX
1617

1718
### TypeNameSet (Default)
1819

1920
```
20-
Add-Member -InputObject <PSObject> -TypeName <String> [-PassThru]
21-
[<CommonParameters>]
21+
Add-Member -InputObject <PSObject> -TypeName <String> [-PassThru] [<CommonParameters>]
2222
```
2323

24-
### MemberSet
24+
### NotePropertyMultiMemberSet
2525

2626
```
27-
Add-Member [-MemberType] <PSMemberTypes> [-Name] <String>
28-
[[-Value] <Object>] [[-SecondValue] <Object>]
29-
-InputObject <PSObject> [-TypeName <String>] [-Force] [-PassThru]
30-
[<CommonParameters>]
27+
Add-Member [-NotePropertyMembers] <IDictionary> -InputObject <PSObject> [-TypeName <String>]
28+
[-Force] [-PassThru] [<CommonParameters>]
3129
```
3230

3331
### NotePropertySingleMemberSet
3432

3533
```
36-
Add-Member [-NotePropertyName] <String> [-NotePropertyValue] <Object>
37-
-InputObject <PSObject> [-TypeName <String>] [-Force] [-PassThru]
38-
[<CommonParameters>]
34+
Add-Member [-NotePropertyName] <String> [-NotePropertyValue] <Object> -InputObject <PSObject>
35+
[-TypeName <String>] [-Force] [-PassThru] [<CommonParameters>]
3936
```
4037

41-
### NotePropertyMultiMemberSet
38+
### MemberSet
4239

4340
```
44-
Add-Member [-NotePropertyMembers] <IDictionary>
45-
-InputObject <PSObject> [-TypeName <String>] [-Force] [-PassThru]
41+
Add-Member [-MemberType] <PSMemberTypes> [-Name] <String> [[-Value] <Object>]
42+
[[-SecondValue] <Object>] -InputObject <PSObject> [-TypeName <String>] [-Force] [-PassThru]
4643
[<CommonParameters>]
4744
```
4845

@@ -125,7 +122,7 @@ $A.Size
125122
### Example 3: Add a StringUse note property to a string
126123

127124
This example adds the **StringUse** note property to a string.
128-
Because `Add-Member` cannot add types to **String** input objects, you can speciy the **PassThru**
125+
Because `Add-Member` cannot add types to **String** input objects, you can specify the **PassThru**
129126
parameter to generate an output object. The last command in the example displays the new property.
130127

131128
This example uses the **NotePropertyMembers** parameter. The value of the **NotePropertyMembers**
@@ -273,7 +270,7 @@ The acceptable values for this parameter are:
273270
- ScriptProperty
274271
- CodeProperty
275272
- ScriptMethod
276-
- CopyMethod
273+
- CodeMethod
277274
278275
For information about these values, see [PSMemberTypes Enumeration](/dotnet/api/system.management.automation.psmembertypes)
279276
in the MSDN library.
@@ -291,7 +288,7 @@ Required: True
291288
Position: 0
292289
Default value: None
293290
Accept pipeline input: False
294-
Accept wildcard characters: True
291+
Accept wildcard characters: False
295292
```
296293
297294
### -Name
@@ -310,6 +307,71 @@ Accept pipeline input: False
310307
Accept wildcard characters: False
311308
```
312309
310+
### -NotePropertyMembers
311+
312+
Specifies a hash table or ordered dictionary of note property names and values.
313+
Type a hash table or dictionary in which the keys are note property names and the values are note
314+
property values.
315+
316+
For more information about hash tables and ordered dictionaries in PowerShell, see
317+
[about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md).
318+
319+
This parameter was introduced in Windows PowerShell 3.0.
320+
321+
```yaml
322+
Type: IDictionary
323+
Parameter Sets: NotePropertyMultiMemberSet
324+
Aliases:
325+
326+
Required: True
327+
Position: 0
328+
Default value: None
329+
Accept pipeline input: False
330+
Accept wildcard characters: False
331+
```
332+
333+
### -NotePropertyName
334+
335+
Specifies the note property name.
336+
337+
Use this parameter with the **NotePropertyValue** parameter.
338+
This parameter is optional.
339+
340+
This parameter was introduced in Windows PowerShell 3.0.
341+
342+
```yaml
343+
Type: String
344+
Parameter Sets: NotePropertySingleMemberSet
345+
Aliases:
346+
347+
Required: True
348+
Position: 0
349+
Default value: None
350+
Accept pipeline input: False
351+
Accept wildcard characters: False
352+
```
353+
354+
### -NotePropertyValue
355+
356+
Specifies the note property value.
357+
358+
Use this parameter with the **NotePropertyName** parameter.
359+
This parameter is optional.
360+
361+
This parameter was introduced in Windows PowerShell 3.0.
362+
363+
```yaml
364+
Type: Object
365+
Parameter Sets: NotePropertySingleMemberSet
366+
Aliases:
367+
368+
Required: True
369+
Position: 1
370+
Default value: None
371+
Accept pipeline input: False
372+
Accept wildcard characters: False
373+
```
374+
313375
### -PassThru
314376
315377
Returns an object representing the item with which you are working.
@@ -331,7 +393,7 @@ Aliases:
331393
332394
Required: False
333395
Position: Named
334-
Default value: False
396+
Default value: None
335397
Accept pipeline input: False
336398
Accept wildcard characters: False
337399
```
@@ -384,71 +446,6 @@ Accept pipeline input: False
384446
Accept wildcard characters: False
385447
```
386448

387-
### -NotePropertyMembers
388-
389-
Specifies a hash table or ordered dictionary of note property names and values.
390-
Type a hash table or dictionary in which the keys are note property names and the values are note
391-
property values.
392-
393-
For more information about hash tables and ordered dictionaries in PowerShell, see
394-
[about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md).
395-
396-
This parameter was introduced in Windows PowerShell 3.0.
397-
398-
```yaml
399-
Type: IDictionary
400-
Parameter Sets: NotePropertyMultiMemberSet
401-
Aliases:
402-
403-
Required: True
404-
Position: 0
405-
Default value: None
406-
Accept pipeline input: False
407-
Accept wildcard characters: False
408-
```
409-
410-
### -NotePropertyName
411-
412-
Specifies the note property name.
413-
414-
Use this parameter with the **NotePropertyValue** parameter.
415-
This parameter is optional.
416-
417-
This parameter was introduced in Windows PowerShell 3.0.
418-
419-
```yaml
420-
Type: String
421-
Parameter Sets: NotePropertySingleMemberSet
422-
Aliases:
423-
424-
Required: True
425-
Position: 0
426-
Default value: None
427-
Accept pipeline input: False
428-
Accept wildcard characters: False
429-
```
430-
431-
### -NotePropertyValue
432-
433-
Specifies the note property value.
434-
435-
Use this parameter with the **NotePropertyName** parameter.
436-
This parameter is optional.
437-
438-
This parameter was introduced in Windows PowerShell 3.0.
439-
440-
```yaml
441-
Type: Object
442-
Parameter Sets: NotePropertySingleMemberSet
443-
Aliases:
444-
445-
Required: True
446-
Position: 1
447-
Default value: None
448-
Accept pipeline input: False
449-
Accept wildcard characters: False
450-
```
451-
452449
### -TypeName
453450

454451
Specifies a name for the type.

0 commit comments

Comments
 (0)