You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference/docs-conceptual/developer/cmdlet/extending-output-objects.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ title: Extending Output Objects
6
6
---
7
7
# Extending Output Objects
8
8
9
-
You can extend the .NET Framework objects that are returned by cmdlets, functions, and scripts by using types files (.ps1xml). Types files are XML-based files that let you add properties and methods to existing objects. For example, Windows PowerShell provides the Types.ps1xml file, which adds elements to several existing .NET Framework objects. The Types.ps1xml file is located in the Windows PowerShell installation directory (`$pshome`). You can create your own types file to further extend those objects or to extend other objects. When you extend an object by using a types file, any instance of the object is extended with the new elements.
9
+
You can extend the .NET Framework objects that are returned by cmdlets, functions, and scripts by using types files (.ps1xml). Types files are XML-based files that let you add properties and methods to existing objects. For example, Windows PowerShell provides the Types.ps1xml file, which adds elements to several existing .NET Framework objects. The Types.ps1xml file is located in the Windows PowerShell installation directory (`$PSHOME`). You can create your own types file to further extend those objects or to extend other objects. When you extend an object by using a types file, any instance of the object is extended with the new elements.
10
10
11
11
## Extending the System.Array Object
12
12
@@ -66,7 +66,7 @@ PS> (1, 2, 3, 4).Length
66
66
67
67
## Custom Types Files
68
68
69
-
To create a custom types file, start by copying an existing types file. The new file can have any name, but it must have a .ps1xml file name extension. When you copy the file, you can place the new file in any directory that is accessible to Windows PowerShell, but it is useful to place the files in the Windows PowerShell installation directory (`$pshome`) or in a subdirectory of the installation directory.
69
+
To create a custom types file, start by copying an existing types file. The new file can have any name, but it must have a .ps1xml file name extension. When you copy the file, you can place the new file in any directory that is accessible to Windows PowerShell, but it is useful to place the files in the Windows PowerShell installation directory (`$PSHOME`) or in a subdirectory of the installation directory.
70
70
71
71
To add your own extended types to the file, add a types element for each object that you want to extend. The following topics provide examples.
Copy file name to clipboardExpand all lines: reference/docs-conceptual/developer/module/how-to-write-a-powershell-module-manifest.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ The following table describes the elements you can include in a module manifest.
93
93
| **Copyright**<br /> Type: `String` | `'(c) <Author>. All rights reserved.'` | Copyright statement for this module. If a value isn't specified, `New-ModuleManifest` uses the default with the current user as the `<Author>`. To specify an author, use the **Author** parameter. <br /> Example: `Copyright = '2019 AuthorName. All rights reserved.'` |
94
94
| **Description**<br /> Type: `String` | `<empty string>` | Description of the functionality provided by this module.<br /> Example: `Description = 'This is the module's description.'` |
95
95
| **PowerShellVersion**<br /> Type: `Version` | `<empty string>` | Minimum version of the PowerShell engine required by this module. Valid values are 1.0, 2.0, 3.0, 4.0, 5.0, 5.1, 6.0, 6.1, 6.2, 7.0 and 7.1.<br /> Example: `PowerShellVersion = '5.0'` |
96
-
| **PowerShellHostName**<br /> Type: `String` | `<empty string>` | Name of the PowerShell host required by this module. This name is provided by PowerShell. To find the name of a host program, in the program, type: `$host.name`.<br /> Example: `PowerShellHostName = 'ConsoleHost'` |
96
+
| **PowerShellHostName**<br /> Type: `String` | `<empty string>` | Name of the PowerShell host required by this module. This name is provided by PowerShell. To find the name of a host program, in the program, type: `$Host.name`.<br /> Example: `PowerShellHostName = 'ConsoleHost'` |
97
97
| **PowerShellHostVersion**<br /> Type: `Version` | `<empty string>` | Minimum version of the PowerShell host required by this module.<br /> Example: `PowerShellHostVersion = '2.0'` |
98
98
| **DotNetFrameworkVersion**<br /> Type: `Version` | `<empty string>` | Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only, such as Windows PowerShell 5.1, and only applies to .NET Framework versions lower than 4.5. <br /> Example: `DotNetFrameworkVersion = '3.5'` |
99
99
| **CLRVersion**<br /> Type: `Version` | `<empty string>` | Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only, such as Windows PowerShell 5.1, and only applies to .NET Framework versions lower than 4.5. <br /> Example: `CLRVersion = '3.5'` |
0 commit comments