@@ -25,8 +25,7 @@ data to a PowerShell session.
2525
2626This topic describes ` Types.ps1xml ` files. For more information about using the
2727` Update-TypeData ` cmdlet to add dynamic extended type data to the current
28- session see
29- [ Update-TypeData] ( xref:Microsoft.PowerShell.Utility.Update-TypeData ) .
28+ session see [ Update-TypeData] [ 01 ] .
3029
3130## About extended type data
3231
@@ -47,8 +46,8 @@ Sunday, January 29, 2012 9:43:57 AM
4746```
4847
4948You won't find the ** DateTime** property in the description of the
50- [ System.DateTime] ( /dotnet/api/system.datetime ) structure, because PowerShell
51- adds the property and it is visible only in PowerShell.
49+ [ System.DateTime] [ 02 ] structure, because PowerShell adds the property and it is
50+ visible only in PowerShell.
5251
5352PowerShell internally defines a default set of extended types. This type
5453information is loaded in every PowerShell session at startup. The ** DateTime**
@@ -142,12 +141,12 @@ As a result, you can use either the **Count** property or the **Length**
142141property of arrays in PowerShell. For example:
143142
144143``` powershell
145- (1, 2, 3, 4).count
144+ (1, 2, 3, 4).Count
1461454
147146```
148147
149148``` powershell
150- (1, 2, 3, 4).length
149+ (1, 2, 3, 4).Length
1511504
152151```
153152
@@ -177,9 +176,7 @@ the `Update-TypeData` command to your PowerShell profile.
177176The ` Types.ps1xml ` files add properties and methods to all the instances of the
178177objects of the specified .NET type in the affected PowerShell session. However,
179178if you need to add properties or methods only to one instance of an object, use
180- the ` Add-Member ` cmdlet.
181-
182- For more information, see [ Add-Member] ( xref:Microsoft.PowerShell.Utility.Add-Member ) .
179+ the ` Add-Member ` cmdlet. For more information, see [ Add-Member] [ 03 ] .
183180
184181## Example: Adding an Age member to FileInfo objects
185182
@@ -211,10 +208,8 @@ Save the follow XML code to the file `$PSHOME\MyTypes.ps1xml`.
211208
212209Run ` Update-TypeData ` to add the new ` Types.ps1xml ` file to the current
213210session. The command uses the ** PrependData** parameter to place the new file
214- in a precedence order higher than the original definitions.
215-
216- For more information about ` Update-TypeData ` , see
217- [ Update-TypeData] ( xref:Microsoft.PowerShell.Utility.Update-TypeData ) .
211+ in a precedence order higher than the original definitions. For more
212+ information about ` Update-TypeData ` , see [ Update-TypeData] [ 01 ] .
218213
219214``` powershell
220215Update-TypeData -PrependPath $PSHOME\MyTypes.ps1xml
@@ -235,9 +230,8 @@ Get-ChildItem $PSHOME\pwsh.exe | Select-Object Age
235230
236231## The XML in Types.ps1xml files
237232
238- The full schema definition can be found in
239- [ Types.xsd] ( https://github.com/PowerShell/PowerShell/blob/master/src/Schemas/Types.xsd )
240- in the PowerShell source code repository on GitHub.
233+ The full schema definition can be found in [ Types.xsd] [ 04 ] in the PowerShell
234+ source code repository on GitHub.
241235
242236The ` <Types> ` tag encloses all of the types that are defined in the file. There
243237should be only one ` <Types> ` tag.
@@ -518,7 +512,7 @@ objects.
518512```
519513
520514For more information, see the
521- [ Windows PowerShell Software Development Kit (SDK)] ( /powershell/scripting/developer/windows-powershell ) .
515+ [ Windows PowerShell Software Development Kit (SDK)] [ 05 ] .
522516
523517## Update-TypeData
524518
@@ -546,15 +540,27 @@ are added by running the `Update-TypeData` cmdlet cannot use method syntax.
546540## Signing a Types.ps1xml file
547541
548542To protect users of your ` Types.ps1xml ` file, you can sign the file using a
549- digital signature. For more information, see
550- [ about_Signing] ( about_Signing.md ) .
543+ digital signature. For more information, see [ about_Signing] [ 06 ] .
551544
552545## See also
553546
554- - [ about_Signing] ( about_Signing.md )
555- - [ Copy-Item] ( xref:Microsoft.PowerShell.Management.Copy-Item )
556- - [ Copy-ItemProperty] ( xref:Microsoft.PowerShell.Management.Copy-ItemProperty )
557- - [ Get-Member] ( xref:Microsoft.PowerShell.Utility.Get-Member )
558- - [ Get-TypeData] ( xref:Microsoft.PowerShell.Utility.Get-TypeData )
559- - [ Remove-TypeData] ( xref:Microsoft.PowerShell.Utility.Remove-TypeData )
560- - [ Update-TypeData] ( xref:Microsoft.PowerShell.Utility.Update-TypeData )
547+ - [ about_Signing] [ 06 ]
548+ - [ Copy-Item] [ 07 ]
549+ - [ Copy-ItemProperty] [ 08 ]
550+ - [ Get-Member] [ 09 ]
551+ - [ Get-TypeData] [ 10 ]
552+ - [ Remove-TypeData] [ 11 ]
553+ - [ Update-TypeData] [ 01 ]
554+
555+ <!-- link references -->
556+ [ 01 ] : xref:Microsoft.PowerShell.Utility.Update-TypeData
557+ [ 02 ] : /dotnet/api/system.datetime
558+ [ 03 ] : xref:Microsoft.PowerShell.Utility.Add-Member
559+ [ 04 ] : https://github.com/PowerShell/PowerShell/blob/master/src/Schemas/Types.xsd
560+ [ 05 ] : /powershell/scripting/developer/windows-powershell
561+ [ 06 ] : about_Signing.md
562+ [ 07 ] : xref:Microsoft.PowerShell.Management.Copy-Item
563+ [ 08 ] : xref:Microsoft.PowerShell.Management.Copy-ItemProperty
564+ [ 09 ] : xref:Microsoft.PowerShell.Utility.Get-Member
565+ [ 10 ] : xref:Microsoft.PowerShell.Utility.Get-TypeData
566+ [ 11 ] : xref:Microsoft.PowerShell.Utility.Remove-TypeData
0 commit comments