From 8fd908e3bc84a54eeee61ea71d823d10bbe9d35c Mon Sep 17 00:00:00 2001 From: Arie Heinrich Date: Sun, 9 Feb 2025 17:24:35 +0100 Subject: [PATCH] Markdown and PS Styles (#11782) --- .../Add-Member.md | 28 +++++++++++++------ .../Microsoft.PowerShell.Utility/Add-Type.md | 27 +++++++++--------- .../Clear-Variable.md | 12 ++++---- .../Compare-Object.md | 17 ++++++++--- .../ConvertFrom-Csv.md | 5 ++-- .../ConvertFrom-Json.md | 13 +++++---- .../ConvertFrom-Markdown.md | 6 ++-- .../ConvertFrom-SddlString.md | 13 +++++++-- .../ConvertFrom-StringData.md | 4 +-- .../ConvertTo-Csv.md | 8 ++++-- .../ConvertTo-Html.md | 18 ++++++------ .../ConvertTo-Json.md | 10 +++---- .../ConvertTo-Xml.md | 8 +++--- .../Debug-Runspace.md | 3 +- .../Disable-PSBreakpoint.md | 6 ++-- .../Disable-RunspaceDebug.md | 3 +- .../Enable-PSBreakpoint.md | 4 +-- .../Enable-RunspaceDebug.md | 3 +- 18 files changed, 113 insertions(+), 75 deletions(-) diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Add-Member.md b/reference/7.5/Microsoft.PowerShell.Utility/Add-Member.md index fb1f6bcb6926..5793cc031270 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Add-Member.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Add-Member.md @@ -89,7 +89,7 @@ The third command uses dot notation to get the value of the **Status** property `$a`. As the output shows, the value is `Done`. ```powershell -$A = Get-ChildItem c:\ps-test\test.txt +$A = Get-ChildItem C:\ps-test\test.txt $A | Add-Member -NotePropertyName Status -NotePropertyValue Done $A.Status ``` @@ -211,25 +211,35 @@ In this example we create a custom object that contains two **NoteProperty** mem property is a string. ```powershell -PS> $obj = [pscustomobject]@{ - Name = 'Doris' - Age = '20' +$user = [pscustomobject]@{ + Name = 'Doris' + Age = '20' +} +$addMemberSplat = @{ + MemberType = 'AliasProperty' + Name = 'intAge' + Value = 'Age' + SecondValue = 'UInt32' } -PS> $obj | Add-Member -MemberType AliasProperty -Name 'intAge' -Value age -SecondValue uint32 -PS> $obj | Get-Member +$user | Add-Member @addMemberSplat +$user | Get-Member +``` +```Output TypeName: System.Management.Automation.PSCustomObject Name MemberType Definition ---- ---------- ---------- -intAge AliasProperty intAge = (System.UInt32)age +intAge AliasProperty intAge = (System.UInt32)Age Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() ToString Method string ToString() Age NoteProperty string Age=20 Name NoteProperty string Name=Doris +``` +```powershell PS> $obj Name Age intAge @@ -561,7 +571,7 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see -[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -611,4 +621,4 @@ methods are being added. For more information about the `$this` variable, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md) -[System.Type.GetMethod()](/dotnet/api/system.type.getmethod) +[System.Type.GetMethod()](xref:System.Type.GetMethod%2a) diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Add-Type.md b/reference/7.5/Microsoft.PowerShell.Utility/Add-Type.md index d57c3cde8288..2d14a4018a85 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Add-Type.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Add-Type.md @@ -18,8 +18,9 @@ Adds a Microsoft .NET class to a PowerShell session. ### FromSource (Default) ``` -Add-Type [-TypeDefinition] [-Language ] [-ReferencedAssemblies ] - [-OutputAssembly ] [-OutputType ] [-PassThru] [-IgnoreWarnings] +Add-Type [-TypeDefinition] [-Language ] + [-ReferencedAssemblies ] [-OutputAssembly ] + [-OutputType ] [-PassThru] [-IgnoreWarnings] [-CompilerOptions ] [] ``` @@ -28,24 +29,24 @@ Add-Type [-TypeDefinition] [-Language ] [-ReferencedAssemblie ``` Add-Type [-Name] [-MemberDefinition] [-Namespace ] [-UsingNamespace ] [-Language ] [-ReferencedAssemblies ] - [-OutputAssembly ] [-OutputType ] [-PassThru] [-IgnoreWarnings] - [-CompilerOptions ] [] + [-OutputAssembly ] [-OutputType ] [-PassThru] + [-IgnoreWarnings] [-CompilerOptions ] [] ``` ### FromPath ``` Add-Type [-Path] [-ReferencedAssemblies ] [-OutputAssembly ] - [-OutputType ] [-PassThru] [-IgnoreWarnings] [-CompilerOptions ] - [] + [-OutputType ] [-PassThru] [-IgnoreWarnings] + [-CompilerOptions ] [] ``` ### FromLiteralPath ``` -Add-Type -LiteralPath [-ReferencedAssemblies ] [-OutputAssembly ] - [-OutputType ] [-PassThru] [-IgnoreWarnings] [-CompilerOptions ] - [] +Add-Type -LiteralPath [-ReferencedAssemblies ] + [-OutputAssembly ] [-OutputType ] [-PassThru] + [-IgnoreWarnings] [-CompilerOptions ] [] ``` ### FromAssemblyName @@ -451,7 +452,7 @@ Accept wildcard characters: True Specifies the output type of the output assembly. By default, no output type is specified. This parameter is valid only when an output assembly is specified in the command. For more information about the values, see -[OutputAssemblyType Enumeration](/dotnet/api/microsoft.powershell.commands.outputassemblytype). +[OutputAssemblyType Enumeration](xref:Microsoft.PowerShell.Commands.OutputAssemblyType). The acceptable values for this parameter are as follows: @@ -541,7 +542,7 @@ Accept wildcard characters: False Specifies the source code that contains the type definitions. Enter the source code in a string or here-string, or enter a variable that contains the source code. For more information about -here-strings, see [about_Quoting_Rules](../Microsoft.PowerShell.Core/about/about_Quoting_Rules.md). +here-strings, see [about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). Include a namespace declaration in your type definition. If you omit the namespace declaration, your type might have the same name as another type or the shortcut for another type, causing an @@ -628,7 +629,7 @@ arbitrary path requires `Add-Type`, since those assemblies can't not be loaded a ## RELATED LINKS -[about_Profiles](../Microsoft.PowerShell.Core/About/about_profiles.md) +[about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md) [about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md) @@ -636,7 +637,7 @@ arbitrary path requires `Add-Type`, since those assemblies can't not be loaded a [New-Object](New-Object.md) -[OutputAssemblyType](/dotnet/api/microsoft.powershell.commands.outputassemblytype) +[OutputAssemblyType](xref:Microsoft.PowerShell.Commands.OutputAssemblyType) [Platform Invoke (P/Invoke)](/dotnet/standard/native-interop/pinvoke) diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Clear-Variable.md b/reference/7.5/Microsoft.PowerShell.Utility/Clear-Variable.md index bee78d7374d1..7d92e626ee84 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Clear-Variable.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Clear-Variable.md @@ -16,8 +16,8 @@ Deletes the value of a variable. ## SYNTAX ``` -Clear-Variable [-Name] [-Include ] [-Exclude ] [-Force] [-PassThru] - [-Scope ] [-WhatIf] [-Confirm] [] +Clear-Variable [-Name] [-Include ] [-Exclude ] [-Force] + [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -39,7 +39,7 @@ This command removes the value of global variables that have names that begin wi ### Example 2: Clear a variable in a child scope but not the parent scope ```powershell -$a=3 +$a = 3 &{ Clear-Variable a } $a ``` @@ -163,7 +163,8 @@ The acceptable values for this parameter are: - `Script` You can also use a number relative to the current scope (0 through the number of scopes, where 0 is -the current scope and 1 is its parent). Local is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +the current scope and 1 is its parent). Local is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -213,7 +214,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Compare-Object.md b/reference/7.5/Microsoft.PowerShell.Utility/Compare-Object.md index 8df76d5a3b75..47a787422d06 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Compare-Object.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Compare-Object.md @@ -17,8 +17,8 @@ Compares two sets of objects. ``` Compare-Object [-ReferenceObject] [-DifferenceObject] - [-SyncWindow ] [-Property ] [-ExcludeDifferent] [-IncludeEqual] [-PassThru] - [-Culture ] [-CaseSensitive] [] + [-SyncWindow ] [-Property ] [-ExcludeDifferent] [-IncludeEqual] + [-PassThru] [-Culture ] [-CaseSensitive] [] ``` ## DESCRIPTION @@ -56,7 +56,11 @@ The output displays only the lines that are different between the files. `Testfi content that appear in both files aren't displayed. ```powershell -Compare-Object -ReferenceObject (Get-Content -Path C:\Test\Testfile1.txt) -DifferenceObject (Get-Content -Path C:\Test\Testfile2.txt) +$objects = @{ + ReferenceObject = (Get-Content -Path C:\Test\Testfile1.txt) + DifferenceObject = (Get-Content -Path C:\Test\Testfile2.txt) +} +Compare-Object @objects ``` ```Output @@ -174,7 +178,12 @@ output displayed by the default format for **System.Boolean** objects didn't dis In this example, we compare two different string that have the same length. ```powershell -Compare-Object -ReferenceObject 'abc' -DifferenceObject 'xyz' -Property Length -IncludeEqual +$objects = @{ + ReferenceObject = 'abc' + DifferenceObject = 'xyz' + Property = 'Length' +} +Compare-Object @objects -IncludeEqual ``` ```Output diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md index 417c425ee19a..fa7321a0d135 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md @@ -25,7 +25,8 @@ ConvertFrom-Csv [[-Delimiter] ] [-InputObject] [-Header [-Header ] [] +ConvertFrom-Csv -UseCulture [-InputObject] [-Header ] + [] ``` ## DESCRIPTION @@ -89,7 +90,7 @@ $Header = 'State', 'MoreData', 'StatusMessage', 'Location', 'Command', 'BeginTime', 'EndTime', 'JobType', 'Output', 'Error', 'Progress', 'Verbose', 'Debug', 'Warning', 'Information' # Delete the default header from $J -$J = $J[1..($J.count - 1)] +$J = $J[1..($J.Count - 1)] $J | ConvertFrom-Csv -Header $Header ``` diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Json.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Json.md index 50630d18049e..cd534ce94bed 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Json.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Json.md @@ -16,8 +16,8 @@ Converts a JSON-formatted string to a custom object or a hash table. ## SYNTAX ``` -ConvertFrom-Json [-InputObject] [-AsHashtable] [-DateKind ] [-Depth ] - [-NoEnumerate] [] +ConvertFrom-Json [-InputObject] [-AsHashtable] [-DateKind ] + [-Depth ] [-NoEnumerate] [] ``` ## DESCRIPTION @@ -91,7 +91,8 @@ that can be managed in PowerShell. ```powershell # Ensures that Invoke-WebRequest uses TLS 1.2 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$j = Invoke-WebRequest 'https://api.github.com/repos/PowerShell/PowerShell/issues' | ConvertFrom-Json +$j = Invoke-WebRequest 'https://api.github.com/repos/PowerShell/PowerShell/issues' | + ConvertFrom-Json ``` You can also use the `Invoke-RestMethod` cmdlet, which automatically converts JSON content to @@ -128,8 +129,10 @@ This command shows an example where the `-NoEnumerate` switch is used to round-t JSON array. ```powershell -Write-Output "With -NoEnumerate: $('[1]' | ConvertFrom-Json -NoEnumerate | ConvertTo-Json -Compress)" -Write-Output "Without -NoEnumerate: $('[1]' | ConvertFrom-Json | ConvertTo-Json -Compress)" +Write-Output "With -NoEnumerate: $('[1]' | ConvertFrom-Json -NoEnumerate | + ConvertTo-Json -Compress)" +Write-Output "Without -NoEnumerate: $('[1]' | ConvertFrom-Json | + ConvertTo-Json -Compress)" ``` ```Output diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md index 8ababe638111..a738a8395cd7 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md @@ -11,8 +11,7 @@ title: ConvertFrom-Markdown # ConvertFrom-Markdown ## SYNOPSIS -Convert the contents of a string or a file to a **MarkdownInfo** -object. +Convert the contents of a string or a file to a **MarkdownInfo** object. ## SYNTAX @@ -161,7 +160,8 @@ Accept wildcard characters: True This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md index 9224ac797cfc..fd95b7514bd8 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md @@ -18,7 +18,8 @@ Converts a SDDL string to a custom object. ### All ``` -ConvertFrom-SddlString [-Sddl] [-Type ] [] +ConvertFrom-SddlString [-Sddl] [-Type ] + [] ``` ## DESCRIPTION @@ -57,7 +58,7 @@ ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights ``` The first command uses the `Get-Acl` cmdlet to get the security descriptor for the -HKLM:\SOFTWARE\Microsoft\ key and saves it in the variable. +`HKLM:\SOFTWARE\Microsoft\` key and saves it in the variable. The second command uses the `ConvertFrom-SddlString` cmdlet to get the text representation of the SDDL string, contained in the Sddl property of the object representing the security descriptor. @@ -70,16 +71,22 @@ It uses the `-Type` parameter to specify that SDDL string represents a registry $acl = Get-Acl -Path HKLM:\SOFTWARE\Microsoft\ ConvertFrom-SddlString -Sddl $acl.Sddl | Foreach-Object {$_.DiscretionaryAcl[0]} +``` +```Output BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateDirectories, Delete, ExecuteKey, FullControl, GenericExecute, GenericWrite, ListDirectory, ReadExtendedAttributes, ReadPermissions, TakeOwnership, Traverse, WriteData, WriteExtendedAttributes, WriteKey) +``` +```powershell ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights | Foreach-Object {$_.DiscretionaryAcl[0]} +``` +```Output BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateLink, CreateSubKey, Delete, EnumerateSubKeys, ExecuteKey, FullControl, GenericExecute, GenericWrite, Notify, QueryValues, ReadPermissions, SetValue, TakeOwnership, WriteKey) ``` The first command uses the `Get-Acl` cmdlet to get the security descriptor for the -HKLM:\SOFTWARE\Microsoft\ key and saves it in the variable. +`HKLM:\SOFTWARE\Microsoft\` key and saves it in the variable. The second command uses the `ConvertFrom-SddlString` cmdlet to get the text representation of the SDDL string, contained in the Sddl property of the object representing the security descriptor. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-StringData.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-StringData.md index b615a518ddf0..c9722332dcf5 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-StringData.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-StringData.md @@ -34,7 +34,7 @@ string must conform to the rules for a **DATA** section. For more information, s `ConvertFrom-StringData` supports escape character sequences that are allowed by conventional machine translation tools. That is, the cmdlet can interpret backslashes (`\`) as escape characters in the string data by using the -[Regex.Unescape Method](/dotnet/api/system.text.regularexpressions.regex.unescape), instead of the +[Regex.Unescape Method](xref:System.Text.RegularExpressions.Regex.Unescape%2a), instead of the PowerShell backtick character (`` ` ``) that would normally signal the end of a line in a script. Inside the here-string, the backtick character doesn't work. You can also preserve a literal backslash in your results by escaping it with a preceding backslash, like this: `\\`. Unescaped @@ -288,7 +288,7 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see -[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Csv.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Csv.md index fa6b33000f19..0b0f64907c89 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Csv.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Csv.md @@ -26,8 +26,9 @@ ConvertTo-Csv [-InputObject] [[-Delimiter] ] [-IncludeTypeInfor ### UseCulture ``` -ConvertTo-Csv [-InputObject] [-UseCulture] [-IncludeTypeInformation] [-NoTypeInformation] - [-QuoteFields ] [-UseQuotes ] [-NoHeader] [] +ConvertTo-Csv [-InputObject] [-UseCulture] [-IncludeTypeInformation] + [-NoTypeInformation] [-QuoteFields ] [-UseQuotes ] [-NoHeader] + [] ``` ## DESCRIPTION @@ -89,7 +90,8 @@ This example converts the Windows event log for PowerShell to a series of CSV st ```powershell (Get-Culture).TextInfo.ListSeparator -Get-WinEvent -LogName 'PowerShellCore/Operational' | ConvertTo-Csv -UseCulture -NoTypeInformation +Get-WinEvent -LogName 'PowerShellCore/Operational' | + ConvertTo-Csv -UseCulture -NoTypeInformation ``` ```Output diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Html.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Html.md index 90db5f6df370..07d83694f9f7 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Html.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Html.md @@ -19,22 +19,22 @@ Converts .NET objects into HTML that can be displayed in a Web browser. ``` ConvertTo-Html [-InputObject ] [[-Property] ] [[-Body] ] - [[-Head] ] [[-Title] ] [-As ] [-CssUri ] [-PostContent ] - [-PreContent ] [-Meta ] [-Charset ] [-Transitional] - [] + [[-Head] ] [[-Title] ] [-As ] [-CssUri ] + [-PostContent ] [-PreContent ] [-Meta ] + [-Charset ] [-Transitional] [] ``` ### Fragment ``` -ConvertTo-Html [-InputObject ] [[-Property] ] [-As ] [-Fragment] - [-PostContent ] [-PreContent ] [] +ConvertTo-Html [-InputObject ] [[-Property] ] [-As ] + [-Fragment] [-PostContent ] [-PreContent ] [] ``` ## DESCRIPTION -The `ConvertTo-Html` cmdlet converts .NET objects into HTML that can be displayed in a -Web browser. You can use this cmdlet to display the output of a command in a Web page. +The `ConvertTo-Html` cmdlet converts .NET objects into HTML that can be displayed in a Web browser. +You can use this cmdlet to display the output of a command in a Web page. You can use the parameters of `ConvertTo-Html` to select object properties, to specify a table or list format, to specify the HTML page title, to add text before and after the object, and to return @@ -133,7 +133,7 @@ attribute in the tag contains the name of the style sheet. ### Example 6: Create a web page to display service objects ```powershell -Get-Service | ConvertTo-Html -As LIST | Out-File services.htm +Get-Service | ConvertTo-Html -As List | Out-File services.htm ``` This command creates an HTML page of the service objects that the `Get-Service` cmdlet returns. The @@ -168,7 +168,7 @@ omitted. ### Example 8: Create a web page to display PowerShell events ```powershell -Get-EventLog -Log "Windows PowerShell" | ConvertTo-Html -Property id, level, task +Get-EventLog -Log "Windows PowerShell" | ConvertTo-Html -Property ID, Level, Task ``` This command uses the `Get-EventLog` cmdlet to get events from the Windows PowerShell event log. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Json.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Json.md index bc58ac5d460e..2c62266cdfee 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Json.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Json.md @@ -28,9 +28,8 @@ The `ConvertTo-Json` cmdlet converts any .NET object to a string in JavaScript O property values, and the methods are removed. > [!NOTE] -> As of PowerShell 7.2, Extended Type System properties of **DateTime** and -> **String** objects are no longer serialized and only the simple object is -> converted to JSON format +> As of PowerShell 7.2, Extended Type System properties of **DateTime** and **String** objects are +> no longer serialized and only the simple object is converted to JSON format You can then use the `ConvertFrom-Json` cmdlet to convert a JSON-formatted string to a JSON object, which is easily managed in PowerShell. @@ -226,7 +225,8 @@ Accept wildcard characters: False ### -EnumsAsStrings -Provides an alternative serialization option that converts all enumerations to their string representation. +Provides an alternative serialization option that converts all enumerations to their string +representation. ```yaml Type: System.Management.Automation.SwitchParameter @@ -292,7 +292,7 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see -[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Xml.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Xml.md index 9c098930a715..ee69535ae55b 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Xml.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Xml.md @@ -16,8 +16,8 @@ Creates an XML-based representation of an object. ## SYNTAX ``` -ConvertTo-Xml [-Depth ] [-InputObject] [-NoTypeInformation] [-As ] - [] +ConvertTo-Xml [-Depth ] [-InputObject] [-NoTypeInformation] + [-As ] [] ``` ## DESCRIPTION @@ -30,10 +30,10 @@ When you pipe multiple objects to `ConvertTo-Xml` or use the **InputObject** par multiple objects, `ConvertTo-Xml` returns a single, in-memory XML document that includes representations of all the objects. -This cmdlet is similar to [Export-Clixml](./Export-Clixml.md) except that `Export-Clixml` stores the +This cmdlet is similar to [Export-Clixml](Export-Clixml.md) except that `Export-Clixml` stores the resulting XML in a [Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/) -file that can be reimported as objects with [Import-Clixml](./Import-Clixml.md). `ConvertTo-Xml` +file that can be reimported as objects with [Import-Clixml](Import-Clixml.md). `ConvertTo-Xml` returns an in-memory representation of an XML document, so you can continue to process it in PowerShell. `ConvertTo-Xml` doesn't have an option to convert objects to CLI XML. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Debug-Runspace.md b/reference/7.5/Microsoft.PowerShell.Utility/Debug-Runspace.md index e212f3f7c980..a362b357ad48 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Debug-Runspace.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Debug-Runspace.md @@ -18,7 +18,8 @@ Starts an interactive debugging session with a runspace. ### RunspaceParameterSet (Default) ``` -Debug-Runspace [-Runspace] [-BreakAll] [-WhatIf] [-Confirm] [] +Debug-Runspace [-Runspace] [-BreakAll] [-WhatIf] [-Confirm] + [] ``` ### NameParameterSet diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md b/reference/7.5/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md index c17ed2cec66e..800952410a63 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md @@ -25,8 +25,8 @@ Disable-PSBreakpoint [-PassThru] [-Breakpoint] [-WhatIf] [-Confir ### Id ``` -Disable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] [-Confirm] - [] +Disable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -42,7 +42,7 @@ when you create them using the `Set-PSBreakpoint` cmdlet. A breakpoint is a point in a script where execution stops temporarily so that you can examine the instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more information about the PowerShell debugger, see -[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md). +[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md). ## EXAMPLES diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md b/reference/7.5/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md index a69f34dc90d1..5219de3a5060 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md @@ -41,7 +41,8 @@ Disable-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Disable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Disable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md b/reference/7.5/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md index 8b7818af9d24..3bc612b7e767 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md @@ -25,8 +25,8 @@ Enable-PSBreakpoint [-PassThru] [-Breakpoint] [-WhatIf] [-Confirm ### Id ``` -Enable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] [-Confirm] - [] +Enable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md b/reference/7.5/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md index 29ace5bd672c..f03719158465 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md @@ -41,7 +41,8 @@ Enable-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Enable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Enable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION