Skip to content

Replace Windows PowerShell with PowerShell - the Microsoft.PowerShell.Utiltity module #2804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions reference/6/Microsoft.PowerShell.Utility/Add-Member.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Add-Member
# Add-Member

## SYNOPSIS
Adds custom properties and methods to an instance of a Windows PowerShell object.
Adds custom properties and methods to an instance of a PowerShell object.

## SYNTAX

Expand Down Expand Up @@ -44,7 +44,7 @@ Add-Member [-NotePropertyMembers] <IDictionary>
```

## DESCRIPTION
The **Add-Member** cmdlet lets you add members (properties and methods) to an instance of a Windows PowerShell object.
The **Add-Member** cmdlet lets you add members (properties and methods) to an instance of a PowerShell object.
For instance, you can add a NoteProperty member that contains a description of the object or a ScriptMethod member that runs a script to change the object.

To use **Add-Member**, pipe the object to **Add-Member**, or use the **InputObject** parameter to specify the object.
Expand Down Expand Up @@ -285,7 +285,7 @@ The acceptable values for this parameter are:
For information about these values, see [PSMemberTypes Enumeration](https://msdn.microsoft.com/library/system.management.automation.psmembertypes) in the MSDN library.

Not all objects have every type of member.
If you specify a member type that the object does not have, Windows PowerShell returns an error.
If you specify a member type that the object does not have, PowerShell returns an error.

```yaml
Type: PSMemberTypes
Expand Down Expand Up @@ -380,7 +380,7 @@ Accept wildcard characters: False
Specifies a hash table or ordered dictionary of note property names and values.
Type a hash table or dictionary in which the keys are note property names and the values are note property values.

For more information about hash tables and ordered dictionaries in Windows PowerShell, see about_Hash_Tables.
For more information about hash tables and ordered dictionaries in PowerShell, see about_Hash_Tables.

This parameter was introduced in Windows PowerShell 3.0.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ You can pipe CSV strings to this cmdlet.
This cmdlet returns the objects described by the properties in the CSV strings.

## NOTES
* Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the Windows PowerShell type formatting entries that format the non-CSV versions of the object type.
* Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object type.

In CSV format, each object is represented by a comma-separated list of the property values of the object.
The property values are converted to strings (by using the ToString() method of the object), so they are generally represented by the name of the property value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ When used in a DATA section, the contents of the string must conform to the rule
For more information, see about_Data_Sections.

**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](https://msdn.microsoft.com/library/system.text.regularexpressions.regex.unescape), instead of the Windows PowerShell backtick character (\`) that would normally signal the end of a line in a script.
That is, the cmdlet can interpret backslashes (\\) as escape characters in the string data by using the [Regex.Unescape Method](https://msdn.microsoft.com/library/system.text.regularexpressions.regex.unescape), 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 does not work.
You can also preserve a literal backslash in your results by escaping it with a preceding backslash, like this: \\\\.
Unescaped backslash characters, such as those that are commonly used in file paths, can render as illegal escape sequences in your results.
Expand Down Expand Up @@ -127,7 +127,7 @@ Bottom = Blue

This example converts a regular double-quoted string (not a here-string) into a hash table and saves it in the $A variable.

To satisfy the condition that each key/value pair must be on a separate line, it uses the Windows PowerShell newline character (\`n) to separate the pairs.
To satisfy the condition that each key/value pair must be on a separate line, it uses the PowerShell newline character (\`n) to separate the pairs.

The result is a hash table of the input.
The remaining commands display the output.
Expand Down
10 changes: 5 additions & 5 deletions reference/6/Microsoft.PowerShell.Utility/ConvertTo-Html.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ 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 only the table or list fragment, instead of a strict DTD page.

When you submit multiple objects to **ConvertTo-Html**, Windows PowerShell creates the table (or list) based on the properties of the first object that you submit.
When you submit multiple objects to **ConvertTo-Html**, PowerShell creates the table (or list) based on the properties of the first object that you submit.
If the remaining objects do not have one of the specified properties, the property value of that object is an empty cell.
If the remaining objects have additional properties, those property values are not included in the file.

Expand All @@ -53,7 +53,7 @@ PS C:\> Get-Alias | ConvertTo-Html > aliases.htm
PS C:\> Invoke-Item aliases.htm
```

This command creates an HTML page that lists the Windows PowerShell aliases in the current console.
This command creates an HTML page that lists the PowerShell aliases in the current console.

The command uses the Get-Alias cmdlet to get the aliases.
It uses the pipeline operator (|) to send the aliases to the **ConvertTo-Html** cmdlet, which creates the HTML page.
Expand Down Expand Up @@ -179,11 +179,11 @@ Determines whether the object is formatted as a table or a list.
Valid values are Table and List.
The default value is Table.

The Table value generates an HTML table that resembles the Windows PowerShell table format.
The Table value generates an HTML table that resembles the PowerShell table format.
The header row displays the property names.
Each table row represents an object and displays the object's values for each property.

The List value generates a two-column HTML table for each object that resembles the Windows PowerShell list format.
The List value generates a two-column HTML table for each object that resembles the PowerShell list format.
The first column displays the property name; the second column displays the property value.

```yaml
Expand Down Expand Up @@ -415,7 +415,7 @@ You can pipe any .NET object to **ConvertTo-Html**.
## NOTES
* To use this cmdlet, pipe one or more objects to the cmdlet or use the InputObject parameter to specify the object. When the input consists of multiple objects, the output of these two methods is quite different.

- When you pipe multiple objects to a cmdlet, Windows PowerShell sends the objects to the cmdlet one at a time.
- When you pipe multiple objects to a cmdlet, PowerShell sends the objects to the cmdlet one at a time.
As a result, **ConvertTo-Html** creates a table that displays the individual objects.
For example, if you pipe the processes on a computer to **ConvertTo-Html**, the resulting table displays all of the processes.

Expand Down
4 changes: 2 additions & 2 deletions reference/6/Microsoft.PowerShell.Utility/ConvertTo-Json.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ConvertTo-Json [-InputObject] <Object> [-Depth <Int32>] [-Compress] [<CommonPara
The **ConvertTo-Json** cmdlet converts any object to a string in JavaScript Object Notation (JSON) format.
The properties are converted to field names, the field values are converted to property values, and the methods are removed.

You can then use the ConvertFrom-Json cmdlet to convert a JSON-formatted string to a JSON object, which is easily managed in Windows PowerShell.
You can then use the ConvertFrom-Json cmdlet to convert a JSON-formatted string to a JSON object, which is easily managed in PowerShell.

Many web sites use JSON instead of XML to serialize data for communication between servers and web-based apps.

Expand Down Expand Up @@ -125,7 +125,7 @@ The second command uses **ConvertFrom-Json** to convert the JSON string to a JSO
PS C:\> $JsonSecurityHelp = Get-Content $Pshome\Modules\Microsoft.PowerShell.Security\en-US\Microsoft.PowerShell.Security.dll-Help.xml | ConvertTo-Json
```

This command uses the **ConvertTo-Json** cmdlet to convert a Windows PowerShell Help file from XML format to JSON format.
This command uses the **ConvertTo-Json** cmdlet to convert a PowerShell Help file from XML format to JSON format.
You can use a command like this to use the Help topic content in a web service application.

## PARAMETERS
Expand Down
8 changes: 4 additions & 4 deletions reference/6/Microsoft.PowerShell.Utility/Debug-Runspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ Debug-Runspace [-InstanceId] <Guid> [-WhatIf] [-Confirm] [<CommonParameters>]

## DESCRIPTION
The **Debug-Runspace** cmdlet starts an interactive debugging session with a local or remote active runspace.
You can find a runspace that you want to debug by first running Get-Process to find processes associated with Windows PowerShell, then Enter-PSHostProcess with the process ID specified in the *Id* parameter to attach to the process, and then Get-Runspace to list runspaces within the Windows PowerShell host process.
You can find a runspace that you want to debug by first running Get-Process to find processes associated with PowerShell, then Enter-PSHostProcess with the process ID specified in the *Id* parameter to attach to the process, and then Get-Runspace to list runspaces within the PowerShell host process.

After you have selected a runspace to debug, if the runspace is currently running a command or script, or if the script has stopped at a breakpoint, Windows PowerShell opens a remote debugger session for the runspace.
After you have selected a runspace to debug, if the runspace is currently running a command or script, or if the script has stopped at a breakpoint, PowerShell opens a remote debugger session for the runspace.
You can debug the runspace script in the same way remote session scripts are debugged.

You can only attach to a Windows PowerShell host process if you are an administrator on the computer that is running the process, or you are running the script that you want to debug.
Also, you cannot enter the host process that is running the current Windows PowerShell session; you can only enter a host process that is running a different Windows PowerShell session.
You can only attach to a PowerShell host process if you are an administrator on the computer that is running the process, or you are running the script that you want to debug.
Also, you cannot enter the host process that is running the current PowerShell session; you can only enter a host process that is running a different PowerShell session.
For example, if you are working in a PowerShell.exe session, you can't enter the host process for that session, but you can enter the host process of a running Windows PowerShell ISE session.

## EXAMPLES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ To re-enable a breakpoint, use the Enable-PSBreakpoint cmdlet.
Breakpoints are enabled by default when you create them by 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 Windows PowerShell scripts.
For more information about the Windows PowerShell debugger, see about_Debuggers.
**Disable-PSBreakpoint** is one of several cmdlets designed for debugging PowerShell scripts.
For more information about the PowerShell debugger, see about_Debuggers.

## EXAMPLES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Newly created breakpoints are automatically enabled, but you can disable them by

Technically, this cmdlet changes the value of the Enabled property of a breakpoint object to True.

**Enable-PSBreakpoint** is one of several cmdlets designed for debugging Windows PowerShell scripts.
For more information about the Windows PowerShell debugger, see about_Debuggers.
**Enable-PSBreakpoint** is one of several cmdlets designed for debugging PowerShell scripts.
For more information about the PowerShell debugger, see about_Debuggers.

## EXAMPLES

Expand Down
4 changes: 2 additions & 2 deletions reference/6/Microsoft.PowerShell.Utility/Export-Alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Export-Alias -LiteralPath <String> [[-Name] <String[]>] [-PassThru] [-As <Export
The `Export-Alias` cmdlet exports the aliases in the current session to a file.
If the output file does not exist, the cmdlet will create it.

`Export-Alias` can export the aliases in a particular scope or all scopes, it can generate the data in CSV format or as a series of Set-Alias commands that you can add to a session or to a Windows PowerShell profile.
`Export-Alias` can export the aliases in a particular scope or all scopes, it can generate the data in CSV format or as a series of Set-Alias commands that you can add to a session or to a PowerShell profile.

## EXAMPLES

Expand Down Expand Up @@ -167,7 +167,7 @@ Specifies the path to the output file.
Unlike **Path**, the value of the **LiteralPath** parameter is used exactly as it is typed.
No characters are interpreted as wildcards.
If the path includes escape characters, enclose it in single quotation marks.
Single quotation marks tell Windows PowerShell not to interpret any characters as escape sequences.
Single quotation marks tell PowerShell not to interpret any characters as escape sequences.

```yaml
Type: String
Expand Down
4 changes: 2 additions & 2 deletions reference/6/Microsoft.PowerShell.Utility/Export-Clixml.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The **Export-CliXml** cmdlet creates an XML-based representation of an object or
You can then use the Import-Clixml cmdlet to re-create the saved object based on the contents of that file.

This cmdlet is similar to ConvertTo-Xml, except that **Export-CliXml** stores the resulting XML in a file.
**ConvertTo-XML** returns the XML, so you can continue to process it in Windows PowerShell.
**ConvertTo-XML** returns the XML, so you can continue to process it in PowerShell.

A valuable use of **Export-CliXml** is to export credentials and secure strings securely as XML.
For an example of how to do this, see Example 3.
Expand Down Expand Up @@ -203,7 +203,7 @@ Specifies the path to the file where the XML representation of the object will b
Unlike *Path*, the value of the *LiteralPath* parameter is used exactly as it is typed.
No characters are interpreted as wildcards.
If the path includes escape characters, enclose it in single quotation marks.
Single quotation marks tell Windows PowerShell not to interpret any characters as escape sequences.
Single quotation marks tell PowerShell not to interpret any characters as escape sequences.

```yaml
Type: String
Expand Down
8 changes: 4 additions & 4 deletions reference/6/Microsoft.PowerShell.Utility/Export-FormatData.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ Export-FormatData -InputObject <ExtendedTypeDefinition[]> -LiteralPath <String>
```

## DESCRIPTION
The **Export-FormatData** cmdlet creates Windows PowerShell formatting files (format.ps1xml) from the formatting objects in the current session.
The **Export-FormatData** cmdlet creates PowerShell formatting files (format.ps1xml) from the formatting objects in the current session.
It takes the **ExtendedTypeDefinition** objects that Get-FormatData returns and saves them in a file in XML format.

Windows PowerShell uses the data in formatting files (format.ps1xml) to generate the default display of Microsoft .NET Framework objects in the session.
PowerShell uses the data in formatting files (format.ps1xml) to generate the default display of Microsoft .NET Framework objects in the session.
You can view and edit the formatting files and use the Update-FormatData cmdlet to add the formatting data to a session.

For more information about formatting files in Windows PowerShell, see about_Format.ps1xml.
For more information about formatting files in PowerShell, see about_Format.ps1xml.

## EXAMPLES

Expand Down Expand Up @@ -188,7 +188,7 @@ Specifies a location for the output file.
Unlike the *Path* parameter, the value of *LiteralPath* is used exactly as it is typed.
No characters are interpreted as wildcards.
If the path includes escape characters, enclose it in single quotation marks.
Single quotation marks tell Windows PowerShell not to interpret any characters as escape sequences.
Single quotation marks tell PowerShell not to interpret any characters as escape sequences.

```yaml
Type: String
Expand Down
Loading