diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Arrays.md b/reference/6/Microsoft.PowerShell.Core/About/about_Arrays.md index 3618a0ebe027..32767a24511b 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Arrays.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Arrays.md @@ -43,7 +43,7 @@ $B = 5..8 As a result, $B contains four values: 5, 6, 7, and 8. -When no data type is specified, Windows PowerShell creates each array as an +When no data type is specified, PowerShell creates each array as an object array (type: System.Object[]). To determine the data type of an array, use the GetType() method. For example, to determine the data type of the $a array, type: @@ -689,7 +689,7 @@ Stopped AppIDSvc Application Identity To get the properties and methods of an array, such as the Length property and the SetValue method, use the InputObject parameter of the Get-Member cmdlet. -When you pipe an array to `Get-Member`, Windows PowerShell sends the items one +When you pipe an array to `Get-Member`, PowerShell sends the items one at a time and Get-Member returns the type of each item in the array (ignoring duplicates). diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Assignment_Operators.md b/reference/6/Microsoft.PowerShell.Core/About/about_Assignment_Operators.md index b19af2c9c6dc..2a89d481f593 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Assignment_Operators.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Assignment_Operators.md @@ -16,7 +16,7 @@ Describes how to use operators to assign values to variables. Assignment operators assign one or more values to a variable. They can perform numeric operations on the values before the assignment. -Windows PowerShell supports the following assignment operators. +PowerShell supports the following assignment operators. |Operator|Description | |--------|-------------------------------------------------------------| @@ -60,14 +60,14 @@ replace the existing value of the variable, or you can append a new value to the existing value. The basic assignment operator is the equal sign `=` `(ASCII 61)`. For -example, the following statement assigns the value Windows PowerShell to +example, the following statement assigns the value PowerShell to the $MyShell variable: ```powershell -$MyShell = "Windows PowerShell" +$MyShell = "PowerShell" ``` -When you assign a value to a variable in Windows PowerShell, the variable +When you assign a value to a variable in PowerShell, the variable is created if it did not already exist. For example, the first of the following two assignement statements creates the $a variable and assigns a value of 6 to $a. The second assignment statement assigns a value of 12 to @@ -79,7 +79,7 @@ $a = 6 $a = 12 ``` -Variables in Windows PowerShell do not have a specific data type unless you +Variables in PowerShell do not have a specific data type unless you cast them. When a variable contains only one object, the variable takes the data type of that object. When a variable contains a collection of objects, the variable has the System.Object data type. Therefore, you can assign any @@ -142,7 +142,7 @@ $a = "apple", "orange", "lemon", "grape" ``` To assign a hash table to a variable, use the standard hash table notation -in Windows PowerShell. Type an at sign `@` followed by key/value pairs that +in PowerShell. Type an at sign `@` followed by key/value pairs that are separated by semicolons `;` and enclosed in braces `{ }`. For example, to assign a hash table to the $a variable, type: @@ -151,7 +151,7 @@ $a = @{one=1; two=2; three=3} ``` To assign hexadecimal values to a variable, precede the value with `0x`. -Windows PowerShell converts the hexadecimal value (0x10) to a decimal value +PowerShell converts the hexadecimal value (0x10) to a decimal value (in this case, 16) and assigns that value to the $a variable. For example, to assign a value of 0x10 to the $a variable, type: @@ -167,7 +167,7 @@ assign a value of 3.1415 to the power of 1,000 to the $a variable, type: $a = 3.1415e3 ``` -Windows PowerShell can also convert kilobytes `KB`, megabytes `MB`, and +PowerShell can also convert kilobytes `KB`, megabytes `MB`, and gigabytes `GB` into bytes. For example, to assign a value of 10 kilobytes to the $a variable, type: @@ -217,7 +217,7 @@ $a ``` ``` -Windows PowerShell +PowerShell ``` When the value of the variable is an array, the `+=` operator appends the @@ -412,7 +412,7 @@ $a *= 2 $a = ($a * 2) ``` -When a variable contains a string value, Windows PowerShell appends the +When a variable contains a string value, PowerShell appends the specified number of strings to the value, as follows: ```powershell @@ -690,7 +690,7 @@ $a file3 ``` -If the first value is an integer, Windows PowerShell treats all operations +If the first value is an integer, PowerShell treats all operations as integer operations and casts new values to integers. This occurs in the following example: @@ -754,7 +754,7 @@ In addition, when you precede a variable name with a data type, the type of that variable is locked unless you explicitly override the type by specifying another data type. If you try to assign a value that is incompatible with the existing type, and you do not explicitly override the -type, Windows PowerShell displays an error, as shown in the following +type, PowerShell displays an error, as shown in the following example: ```powershell @@ -775,7 +775,7 @@ At line:1 char:3 [string]$a = "string" ``` -In Windows PowerShell, the data types of variables that contain multiple +In PowerShell, the data types of variables that contain multiple items in an array are handled differently from the data types of variables that contain a single item. Unless a data type is specifically assigned to an array variable, the data type is always `System.Object []`. This data @@ -789,7 +789,7 @@ array type: [string []] $a = "one", "two", "three" ``` -Windows PowerShell variables can be any .NET Framework data type. In +PowerShell variables can be any .NET Framework data type. In addition, you can assign any fully qualified .NET Framework data type that is available in the current process. For example, the following command specifies a `System.DateTime` data type: @@ -808,7 +808,7 @@ Tuesday, May 31, 2005 12:00:00 AM # ASSIGNING MULTIPLE VARIABLES -In Windows PowerShell, you can assign values to multiple variables by using +In PowerShell, you can assign values to multiple variables by using a single command. The first element of the assignment value is assigned to the first variable, the second element is assigned to the second variable, the third element to the third variable, and so on. For example, the @@ -827,7 +827,7 @@ following command contains three variables and five values: $a, $b, $c = 1, 2, 3, 4, 5 ``` -Therefore, Windows PowerShell assigns the value 1 to the $a variable and +Therefore, PowerShell assigns the value 1 to the $a variable and the value 2 to the $b variable. It assigns the values 3, 4, and 5 to the $c variable. To assign the values in the $c variable to three other variables, use the following format: diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Classes.md b/reference/6/Microsoft.PowerShell.Core/About/about_Classes.md index 24c96aa87078..2fea6ea437ca 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Classes.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Classes.md @@ -19,8 +19,8 @@ Starting in PowerShell 5.0, PowerShell adds language for defining classes and other user-defined types, by using formal syntax and semantics that are similar to other object-oriented programming languages. The goal is to enable developers and IT professionals to -embrace Windows PowerShell for a wider range of use cases, simplify -development of Windows PowerShell artifacts and accelerate coverage +embrace PowerShell for a wider range of use cases, simplify +development of PowerShell artifacts and accelerate coverage of management surfaces. A class declaration is like a blueprint that is used to create instances or @@ -33,10 +33,10 @@ and each instance can have different values in its properties. ## SUPPORTED SCENARIOS -- Define custom types in Windows PowerShell by using familiar object-oriented +- Define custom types in PowerShell by using familiar object-oriented programming constructs, such as classes, properties, methods, inheritance, etc. -- Debug types by using the Windows PowerShell language. +- Debug types by using the PowerShell language. - Generate and handle exceptions by using formal mechanisms, and at the right level. - Define DSC resources and their associated types by using the PowerShell diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Command_Precedence.md b/reference/6/Microsoft.PowerShell.Core/About/about_Command_Precedence.md index 7592f0883d3b..e94456d470b4 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Command_Precedence.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Command_Precedence.md @@ -20,7 +20,7 @@ to avoid command-name conflicts in your session. ## COMMAND PRECEDENCE -When a session includes commands that have the same name, Windows PowerShell +When a session includes commands that have the same name, PowerShell uses the following rules to decide which command to run. These rules become very important when you add commands to your session from diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Command_Syntax.md b/reference/6/Microsoft.PowerShell.Core/About/about_Command_Syntax.md index db7f64b974ef..c3f18dcd5c6c 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Command_Syntax.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Command_Syntax.md @@ -9,7 +9,7 @@ title: about_Command_Syntax # SHORT DESCRIPTION -Describes the syntax diagrams that are used in Windows PowerShell. +Describes the syntax diagrams that are used in PowerShell. # LONG DESCRIPTION @@ -26,7 +26,7 @@ command. To construct a command, follow the syntax diagram from left to right. Select from among the optional parameters and provide values for the placeholders. -Windows PowerShell uses the following notation for syntax diagrams. +PowerShell uses the following notation for syntax diagrams. ```powershell - @@ -44,7 +44,7 @@ New-Alias [-Name] [-Value] [-Description ] [-PassThru] [-Scope ] [-Confirm] [-WhatIf] [] ``` -The syntax is capitalized for readability, but Windows PowerShell is +The syntax is capitalized for readability, but PowerShell is case-insensitive. The syntax diagram has the following elements. @@ -63,8 +63,8 @@ For example, the `Get-Help` command has a **Name** parameter that lets you specify the name of the topic for which help is displayed. The topic name is the value of the **Name** parameter. -In a Windows PowerShell command, parameter names always begin with a hyphen. -The hyphen tells Windows PowerShell that the item in the command is a +In a PowerShell command, parameter names always begin with a hyphen. +The hyphen tells PowerShell that the item in the command is a parameter name. For example, to use the Name parameter of `New-Alias`, you type the following: @@ -167,7 +167,7 @@ returns a random number. In each parameter set, the parameters appear in position order. The order of parameters in a command matters only when you omit the optional parameter -names. When parameter names are omitted, Windows PowerShell assigns values to +names. When parameter names are omitted, PowerShell assigns values to parameters by position and type. For more information about parameter position, see `about_Parameters`. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Comment_Based_Help.md b/reference/6/Microsoft.PowerShell.Core/About/about_Comment_Based_Help.md index 50ec8ad1b927..0ff873afc4b6 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Comment_Based_Help.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Comment_Based_Help.md @@ -842,7 +842,7 @@ Get-Help SYNOPSIS -Displays information about Windows PowerShell cmdlets and concepts. +Displays information about PowerShell cmdlets and concepts. ... ``` diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_CommonParameters.md b/reference/6/Microsoft.PowerShell.Core/About/about_CommonParameters.md index 3810c29a8484..78da92678e27 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_CommonParameters.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_CommonParameters.md @@ -15,7 +15,7 @@ Describes the parameters that can be used with any cmdlet. ## LONG DESCRIPTION The common parameters are a set of cmdlet parameters that you can use with any -cmdlet. They are implemented by Windows PowerShell, not by the cmdlet +cmdlet. They are implemented by PowerShell, not by the cmdlet developer, and they are automatically available to any cmdlet. You can use the common parameters with any cmdlet, but they might not have an @@ -26,7 +26,7 @@ The common parameters are also available on advanced functions that use the CmdletBinding attribute or the Parameter attribute, and on all workflows. Several common parameters override system defaults or preferences that you set -by using the Windows PowerShell preference variables. Unlike the preference +by using the PowerShell preference variables. Unlike the preference variables, the common parameters affect only the commands in which they are used. @@ -114,7 +114,7 @@ Valid values: - Stop. Displays the error message and stops executing the command. -- Suspend. This value is only available in Windows PowerShell workflows. When +- Suspend. This value is only available in PowerShell workflows. When a workflow runs into terminating error, this action preference automatically suspends the job to allow for further investigation. After investigation, the workflow can be resumed. @@ -215,7 +215,7 @@ are sent through the pipeline. If you omit this parameter, objects are sent as they are generated. This resource management parameter is designed for advanced users. When you -use this parameter, Windows PowerShell does not call the next cmdlet in the +use this parameter, PowerShell does not call the next cmdlet in the pipeline until the number of objects generated equals OutBuffer + 1. Thereafter, it sends all objects as they are generated. @@ -413,7 +413,7 @@ command: PS> Remove-Item Date.csv -WhatIf ``` -Instead of removing the item, Windows PowerShell lists the operations it would +Instead of removing the item, PowerShell lists the operations it would perform and the items that would be affected. This command produces the following output: @@ -445,7 +445,7 @@ Valid values: risk of the cmdlet. For example, the following command uses the Confirm parameter with a -Remove-Item command. Before removing the item, Windows PowerShell lists the +Remove-Item command. Before removing the item, PowerShell lists the operations it would perform and the items that would be affected, and asks for approval. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Core_Commands.md b/reference/6/Microsoft.PowerShell.Core/About/about_Core_Commands.md index ae597f47e377..1daf624763ef 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Core_Commands.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Core_Commands.md @@ -15,7 +15,7 @@ Lists the cmdlets that are designed for use with PowerShell providers. ## LONG DESCRIPTION PowerShell includes a set of cmdlets that are specifically designed to manage -the items in the data stores that are exposed by Windows PowerShell providers. +the items in the data stores that are exposed by PowerShell providers. You can use these cmdlets in the same ways to manage all the different types of data that the providers make available to you. For more information about providers, type "get-help about_providers". diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Data_Sections.md b/reference/6/Microsoft.PowerShell.Core/About/about_Data_Sections.md index 8e39b2c1a71b..89b1fe3f5c4f 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Data_Sections.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Data_Sections.md @@ -17,7 +17,7 @@ data from script logic. ### Long Description -Scripts that are designed for Windows PowerShell can have one or more +Scripts that are designed for PowerShell can have one or more Data sections that contain only data. You can include one or more Data sections in any script, function, or advanced function. The content of the Data section is restricted to a specified subset of the Windows @@ -28,7 +28,7 @@ both logic and data. It lets you have separate string resource files for text, such as error messages and Help strings. It also isolates the code logic, which facilitates security and validation tests. -In Windows PowerShell, the Data section is used to support script +In PowerShell, the Data section is used to support script internationalization. You can use Data sections to make it easier to isolate, locate, and process strings that will be translated into many user interface (UI) languages. @@ -49,7 +49,7 @@ The Data keyword is required. It is not case-sensitive. The permitted content is limited to the following elements: -- All Windows PowerShell operators, except `-match` +- All PowerShell operators, except `-match` - `If`, `Else`, and `ElseIf` statements @@ -159,7 +159,7 @@ Simple data strings. ```powershell DATA { - "Thank you for using my Windows PowerShell Organize.pst script." + "Thank you for using my PowerShell Organize.pst script." "It is provided free of charge to the community." "I appreciate your comments and feedback." } diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Debuggers.md b/reference/6/Microsoft.PowerShell.Core/About/about_Debuggers.md index e9801c1ed08d..f96a834e3ca1 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Debuggers.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Debuggers.md @@ -10,17 +10,17 @@ title: about_Debuggers ## SHORT DESCRIPTION -Describes the Windows PowerShell debugger. +Describes the PowerShell debugger. ## LONG DESCRIPTION Debugging is the process of examining a script while it is running to identify -and correct errors in the script instructions. The Windows PowerShell debugger +and correct errors in the script instructions. The PowerShell debugger can help you examine and identify errors and inefficiencies in your scripts, -functions, commands, Windows PowerShell workflows, Windows PowerShell Desired +functions, commands, PowerShell workflows, PowerShell Desired State Configuration (DSC) configurations, or expressions. -Starting in Windows PowerShell 5.0, the Windows PowerShell debugger has been +Starting in Windows PowerShell 5.0, the PowerShell debugger has been updated to debug scripts, functions, workflows, commands, configurations, or expressions that are running in either the console or Windows PowerShell ISE on remote computers. You can run Enter-PSSession to start an interactive @@ -33,19 +33,19 @@ disconnected session that is running a script has already hit a breakpoint, and is stopped at the breakpoint, Enter-PSSession automatically starts the command-line debugger, after you reconnect to the session. -The Windows PowerShell debugger can also be used to debug Windows PowerShell -workflows, in either the Windows PowerShell console, or in Windows PowerShell +The PowerShell debugger can also be used to debug PowerShell +workflows, in either the PowerShell console, or in Windows PowerShell ISE. Starting in Windows PowerShell 5.0, you can debug within running jobs or processes, either locally or remotely. -You can use the features of the Windows PowerShell debugger to examine a -Windows PowerShell script, function, command, workflow, or expression while it -is running. The Windows PowerShell debugger includes a set of cmdlets that let +You can use the features of the PowerShell debugger to examine a +PowerShell script, function, command, workflow, or expression while it +is running. The PowerShell debugger includes a set of cmdlets that let you set breakpoints, manage breakpoints, and view the call stack. ## Debugger Cmdlets -The Windows PowerShell debugger includes the following set of cmdlets: +The PowerShell debugger includes the following set of cmdlets: - `Set-PsBreakpoint`: Sets breakpoints on lines, variables, and commands. - `Get-PsBreakpoint`: Gets breakpoints in the current session. @@ -67,7 +67,7 @@ complete. Or, type `stop` or `t`. ### Debugger Commands -When you use the debugger in the Windows PowerShell console, use the following +When you use the debugger in the PowerShell console, use the following commands to control the execution. In Windows PowerShell ISE, use commands on the Debug menu. @@ -80,7 +80,7 @@ applications, see the host application documentation. invocations. The skipped statements are executed, but not stepped through. - `Ctrl+Break`: (Break All in ISE) Breaks into a running script within either - the Windows PowerShell console, or Windows PowerShell ISE. Note that + the PowerShell console, or Windows PowerShell ISE. Note that Ctrl+Break in Windows PowerShell 2.0, 3.0, and 4.0 closes the program. Break All works on both local and remote interactively-running scripts. @@ -124,7 +124,7 @@ concern, examine the values of variables and the state of the system, and continue running the script until you have identified a problem. NOTE: If you step into a statement with a redirection operator, such as ">", -the Windows PowerShell debugger steps over all remaining statements in the +the PowerShell debugger steps over all remaining statements in the script. Displaying the Values of script Variables @@ -172,14 +172,14 @@ command prompt changes so that it begins with "[DBG]:". If you are debugging a workflow, the prompt is "[WFDBG]". You can customize the prompt. -Also, in some host applications, such as the Windows PowerShell console, +Also, in some host applications, such as the PowerShell console, (but not in Windows PowerShell Integrated Scripting Environment [ISE]), a nested prompt opens for debugging. You can detect the nested prompt by the repeating greater-than characters (ASCII 62) that appear at the command prompt. For example, the following is the default debugging prompt in the -Windows PowerShell console: +PowerShell console: ``` [DBG]: PS (get-location)>>> @@ -413,7 +413,7 @@ test-cmdlet ## Debugging Remote Scripts -Starting in Windows PowerShell 5.0, you can run the Windows PowerShell +Starting in Windows PowerShell 5.0, you can run the PowerShell debugger in a remote session, in either the console, or Windows PowerShell ISE. Enter-PSSession functionality has been updated to let you reconnect to and enter a disconnected session that is running on a remote computer, and @@ -489,9 +489,9 @@ The following command displays the contents of the test script file: c:>\PS-test> get-content test.ps1 function psversion { - "Windows PowerShell " + $psversiontable.psversion + "PowerShell " + $psversiontable.psversion if ($psversiontable.psversion.major -lt 6) { - "Upgrade to Windows PowerShell 6.0!" + "Upgrade to PowerShell 6.0!" } else { "Have you run a background job today (start-job)?" @@ -598,7 +598,7 @@ or type "s" for Step. ```powershell DBG> s -test.ps1:2 "Windows PowerShell " + $psversiontable.psversion +test.ps1:2 "PowerShell " + $psversiontable.psversion ``` The debug message includes a preview of the statement in the function. To @@ -831,9 +831,9 @@ For example, type: help set-psbreakpoint -full ``` -## Other Debugging Features in Windows PowerShell +## Other Debugging Features in PowerShell -In addition to the Windows PowerShell debugger, Windows PowerShell includes +In addition to the PowerShell debugger, PowerShell includes several other features that you can use to debug scripts and functions. - Windows PowerShell Integrated Scripting Environment (ISE) includes an diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/6/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 4fa771a6171d..a31f279bec16 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -26,21 +26,21 @@ location of the Windows installation directory. Programs can query the value of this variable to determine where Windows operating system files are located. -Windows PowerShell lets you view and change Windows environment variables, +PowerShell lets you view and change Windows environment variables, including the variables set in the registry, and those set for a particular -session. The Windows PowerShell environment provider simplifies this process +session. The PowerShell environment provider simplifies this process by making it easy to view and change the environment variables. -Unlike other types of variables in Windows PowerShell, environment variables +Unlike other types of variables in PowerShell, environment variables and their values are inherited by child sessions, such as local background jobs and the sessions in which module members run. This makes environment variables well suited to storing values that are needed in both parent and child sessions. -### Windows PowerShell Environment Provider +### PowerShell Environment Provider -The Windows PowerShell environment provider lets you access Windows -environment variables in Windows PowerShell in a Windows PowerShell drive (the +The PowerShell environment provider lets you access Windows +environment variables in PowerShell in a PowerShell drive (the Env: drive). This drive looks much like a file system drive. To go to the Env: drive, type: @@ -55,24 +55,24 @@ Get-ChildItem ``` You can view the environment variables in the Env: drive from any other -Windows PowerShell drive, and you can go into the Env: drive to view and +PowerShell drive, and you can go into the Env: drive to view and change the environment variables. ### Environment Variable Objects -In Windows PowerShell, each environment variable is represented by an object +In PowerShell, each environment variable is represented by an object that is an instance of the System.Collections.DictionaryEntry class. In each DictionaryEntry object, the name of the environment variable is the dictionary key. The value of the variable is the dictionary value. -To display an environment variable in Windows PowerShell, get an object that +To display an environment variable in PowerShell, get an object that represents the variable, and then display the values of the object properties. -When you change an environment variable in Windows PowerShell, use the methods +When you change an environment variable in PowerShell, use the methods that are associated with the DictionaryEntry object. To display the properties and methods of the object that represents an -environment variable in Windows PowerShell, use the Get-Member cmdlet. For +environment variable in PowerShell, use the Get-Member cmdlet. For example, to display the methods and properties of all the objects in the Env: drive, type: @@ -101,10 +101,10 @@ To display the values of all the environment variables, type: Get-ChildItem Env: ``` -By default, Windows PowerShell displays the environment variables in the order +By default, PowerShell displays the environment variables in the order in which it retrieves them. To sort the list of environment variables by variable name, pipe the output of a Get-ChildItem command to the Sort-Object -cmdlet. For example, from any Windows PowerShell drive, type: +cmdlet. For example, from any PowerShell drive, type: ```powershell Get-ChildItem Env: | Sort Name @@ -131,7 +131,7 @@ Get-ChildItem ComputerName ``` You can also display and change the values of environment variables without -using a cmdlet by using the expression parser in Windows PowerShell. To +using a cmdlet by using the expression parser in PowerShell. To display the value of an environment variable, use the following syntax: ```powershell @@ -139,7 +139,7 @@ $Env: ``` For example, to display the value of the WINDIR environment variable, type the -following command at the Windows PowerShell command prompt: +following command at the PowerShell command prompt: ```powershell $Env:windir @@ -154,14 +154,14 @@ To make a persistent change to an environment variable, use System in Control Panel (Advanced tab or the Advanced System Settings item) to store the change in the registry. -When you change environment variables in Windows PowerShell, the change +When you change environment variables in PowerShell, the change affects only the current session. This behavior resembles the behavior of the Set command in Windows-based environments and the Setenv command in UNIX-based environments. You must also have permission to change the values of the variables. If you try to change a value without sufficient permission, the command fails, and -Windows PowerShell displays an error. +PowerShell displays an error. You can change the values of variables without using a cmdlet by using the following syntax: @@ -192,10 +192,10 @@ interpreted as a unit. ### Saving Changes to Environment Variables To create or change the value of an environment variable in every Windows -PowerShell session, add the change to your Windows PowerShell profile. +PowerShell session, add the change to your PowerShell profile. For example, to add the C:\\Temp directory to the Path environment variable in -every Windows PowerShell session, add the following command to your Windows +every PowerShell session, add the following command to your Windows PowerShell profile. ```powershell @@ -212,7 +212,7 @@ $Env:Path + ";C:\Temp"' ### Environment Variables That Store Preferences -Windows PowerShell features can use environment variables to store user +PowerShell features can use environment variables to store user preferences. These variables work like preference variables, but they are inherited by child sessions of the sessions in which they are created. For more information about preference variables, see @@ -237,7 +237,7 @@ The environment variables that store preferences include: * PSModulePath - Stores the paths to the default module directories. Windows PowerShell looks + Stores the paths to the default module directories. PowerShell looks for modules in the specified directories when you do not specify a full path to a module. @@ -247,9 +247,9 @@ The environment variables that store preferences include: $HOME\Documents\WindowsPowerShell\Modules; $PSHOME\Modules ``` -Windows PowerShell sets the value of "\$PSHOME\\Modules" in the registry. It +PowerShell sets the value of "\$PSHOME\\Modules" in the registry. It sets the value of "\$HOME\\Documents\\WindowsPowerShell\\Modules" each time you -start Windows PowerShell. +start PowerShell. In addition, setup programs that install modules in other directories, such as the Program Files directory, can append their locations to the value of @@ -270,7 +270,7 @@ The semi-colon (;) in the command separates the new path from the path that precedes it in the list. To change the value of PSModulePath in every session, add the previous command -to your Windows PowerShell profile or use the SetEnvironmentVariable method of +to your PowerShell profile or use the SetEnvironmentVariable method of the Environment class. The following command uses the GetEnvironmentVariable method to get the diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Execution_Policies.md b/reference/6/Microsoft.PowerShell.Core/About/about_Execution_Policies.md index 3e185fb66558..5292ea117b5b 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Execution_Policies.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Execution_Policies.md @@ -10,13 +10,13 @@ title: about_Execution_Policies ## Short Description -Describes the Windows PowerShell execution policies and explains +Describes the PowerShell execution policies and explains how to manage them. ## Long Description -Windows PowerShell execution policies let you determine the -conditions under which Windows PowerShell loads configuration files +PowerShell execution policies let you determine the +conditions under which PowerShell loads configuration files and runs scripts. You can set an execution policy for the local computer, for the current @@ -25,7 +25,7 @@ setting to set execution policy for computers and users. Execution policies for the local computer and current user are stored in the registry. You do not need to set execution policies in your -Windows PowerShell profile. The execution policy for a particular session +PowerShell profile. The execution policy for a particular session is stored only in memory and is lost when the session is closed. The execution policy is not a security system that restricts user actions. @@ -34,9 +34,9 @@ contents at the command line when they cannot run a script. Instead, the execution policy helps users to set basic rules and prevents them from violating them unintentionally. -## Windows PowerShell Execution Policies +## PowerShell Execution Policies -The Windows PowerShell execution policies are as follows: +The PowerShell execution policies are as follows: "Restricted" is the default policy. @@ -49,7 +49,7 @@ scripts. - Prevents running of all script files, including formatting and configuration files (.ps1xml), module -script files (.psm1), and Windows PowerShell +script files (.psm1), and PowerShell profiles (.ps1). ### AllSigned @@ -97,9 +97,9 @@ files that are downloaded from the Internet. prompts. - This execution policy is designed for configurations -in which a Windows PowerShell script is built in to a +in which a PowerShell script is built in to a a larger application or for configurations in which -Windows PowerShell is the foundation for a program +PowerShell is the foundation for a program that has its own security model. ### Undefined @@ -126,7 +126,7 @@ The Scope values are listed in precedence order. ### Process The execution policy affects only the current session -(the current Windows PowerShell process). +(the current PowerShell process). The execution policy is stored in the $env:PSExecutionPolicyPreference environment variable, @@ -151,7 +151,7 @@ For more information, see [Set-ExecutionPolicy](../../Microsoft.PowerShell.Secur ## Get Your Execution Policy -To get the Windows PowerShell execution policy that is in +To get the PowerShell execution policy that is in effect in the current session, use the `Get-ExecutionPolicy` cmdlet. The following command gets the current execution policy: @@ -195,11 +195,11 @@ Get-ExecutionPolicy -Scope CurrentUser ## Change Your Execution Policy -To change the Windows PowerShell execution policy on your +To change the PowerShell execution policy on your computer, use the `Set-ExecutionPolicy` cmdlet. The change is effective immediately; you do not need to restart -Windows PowerShell. +PowerShell. If you set the execution policy for the local computer (the default) or the current user, the change is saved in the registry and remains @@ -211,7 +211,7 @@ process and any child processes are closed. Note: In Windows Vista and later versions of Windows, to run commands that change the execution policy for the local -computer (the default), start Windows PowerShell with the +computer (the default), start PowerShell with the "Run as administrator" option. To change your execution policy, type: @@ -266,11 +266,11 @@ execution policy is Restricted, which is the default. ## Set a Different Execution Policy for One Session You can use the **ExecutionPolicy** parameter of powershell.exe to -set an execution policy for a new Windows PowerShell session. +set an execution policy for a new PowerShell session. The policy affects only the current session and child sessions. -To set the execution policy for a new session, start Windows PowerShell -at the command line (such as Cmd.exe or Windows PowerShell), and then use +To set the execution policy for a new session, start PowerShell +at the command line (such as Cmd.exe or PowerShell), and then use the **ExecutionPolicy** parameter of powershell.exe to set the execution policy. @@ -313,7 +313,7 @@ the following execution policy settings. | Allow only signed scripts. | AllSigned | - If "Turn on Script Execution" is not configured, it has no -effect. The execution policy set in Windows PowerShell is +effect. The execution policy set in PowerShell is effective. The PowerShellExecutionPolicy.adm and PowerShellExecutionPolicy.admx @@ -336,7 +336,7 @@ For more information, see [about_Group_Policy_Settings](about_Group_Policy_Setti ## Execution Policy Precedence When determining the effective execution policy for a -session, Windows PowerShell evaluates the execution policies +session, PowerShell evaluates the execution policies in the following precedence order: - Group Policy: Computer Configuration @@ -347,8 +347,8 @@ in the following precedence order: ## Manage Signed and Unsigned Scripts -If your Windows PowerShell execution policy is RemoteSigned, -Windows PowerShell will not run unsigned scripts that are +If your PowerShell execution policy is RemoteSigned, +PowerShell will not run unsigned scripts that are downloaded from the Internet (including e-mail and instant messaging programs). @@ -359,7 +359,7 @@ Beginning in Windows PowerShell 3.0, you can use the **Stream** parameter of the `Get-Item` cmdlet to detect files that are blocked because they were downloaded from the Internet, and you can use the `Unblock-File` cmdlet to unblock the scripts -so that you can run them in Windows PowerShell. +so that you can run them in PowerShell. For more information, see [about_Signing](about_Signing.md), [Get-Item](../../Microsoft.PowerShell.Management/Get-Item.md), and diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_For.md b/reference/6/Microsoft.PowerShell.Core/About/about_For.md index 712698ba32eb..d0f3475a0f6e 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_For.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_For.md @@ -139,7 +139,7 @@ for ( ``` This alternative form of the For statement works in PowerShell script files -and at the Windows PowerShell command prompt. However, it is easier to use +and at the PowerShell command prompt. However, it is easier to use the For statement syntax with semicolons when you enter interactive commands at the command prompt. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Foreach.md b/reference/6/Microsoft.PowerShell.Core/About/about_Foreach.md index 6889cf43b50d..e2ac7482c493 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Foreach.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Foreach.md @@ -55,7 +55,7 @@ string values `"a"`, `"b"`, `"c"`, and `"d"`. The first time the `Foreach` statement runs, it sets the `$letter` variable equal to the first item in `$letterArray` (`"a"`). Then, it uses the `Write-Host` cmdlet to display the letter a. The next time through the loop, `$letter` is set to `"b"`, and so -on. After the `Foreach` loop displays the letter d, Windows PowerShell exits +on. After the `Foreach` loop displays the letter d, PowerShell exits the loop. The entire `Foreach` statement must appear on a single line to run it as a diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md b/reference/6/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md index 8c77b333c5a3..290a2b3728da 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md @@ -10,19 +10,19 @@ title: about_Format.ps1xml ## Short Description -The Format.ps1xml files in Windows PowerShell define the default display of -objects in the Windows PowerShell console. You can create your own +The Format.ps1xml files in PowerShell define the default display of +objects in the PowerShell console. You can create your own Format.ps1xml files to change the display of objects or to define default -displays for new object types that you create in Windows PowerShell. +displays for new object types that you create in PowerShell. ## Long Description -The Format.ps1xml files in Windows PowerShell define the default display of -objects in Windows PowerShell. You can create your own Format.ps1xml files to +The Format.ps1xml files in PowerShell define the default display of +objects in PowerShell. You can create your own Format.ps1xml files to change the display of objects or to define default displays for new object -types that you create in Windows PowerShell. +types that you create in PowerShell. -When Windows PowerShell displays an object, it uses the data in structured +When PowerShell displays an object, it uses the data in structured formatting files to determine the default display of the object. The data in the formatting files determines whether the object is rendered in a table or in a list, and it determines which properties are displayed by default. @@ -31,7 +31,7 @@ The formatting affects the display only. It does not affect which object properties are passed down the pipeline or how they are passed. Format.ps1xml files cannot be used to customize the output format for hashtables. -Windows PowerShell includes seven formatting files. These files are located in +PowerShell includes seven formatting files. These files are located in the installation directory (`$PSHOME`). Each file defines the display of a group of Microsoft .NET Framework objects: @@ -55,7 +55,7 @@ group of Microsoft .NET Framework objects: 5. PowerShellCore.format.ps1xml - Objects generated by Windows PowerShell core cmdlets, such as + Objects generated by PowerShell core cmdlets, such as `Get-Member` and `Get-History`. 6. PowerShellTrace.format.ps1xml @@ -83,16 +83,16 @@ to the user. ## Creating New Format.ps1xml Files -The .ps1xml files that are installed with Windows PowerShell are digitally +The .ps1xml files that are installed with PowerShell are digitally signed to prevent tampering because the formatting can include script blocks. Therefore, to change the display format of an existing object view, or to add views for new objects, create your own Format.ps1xml files, and then add them -to your Windows PowerShell session. +to your PowerShell session. To create a new file, copy an existing Format.ps1xml file. The new file can have any name, but it must have a .ps1xml file name extension. 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 +the new file in any directory that is accessible to PowerShell, but it +is useful to place the files in the PowerShell installation directory (`$PSHOME`) or in a subdirectory of the installation directory. To change the formatting of a current view, locate the view in the formatting @@ -103,11 +103,11 @@ other views in the file so that the changes are obvious to anyone examining the file. When you have saved the changes, use the `Update-FormatData` cmdlet to add the -new file to your Windows PowerShell session. If you want your view to take +new file to your PowerShell session. If you want your view to take precedence over a view defined in the built-in files, use the **PrependPath** parameter of `Update-FormatData`. `Update-FormatData` affects only the current session. To make the change to all future sessions, add the -`Update-FormatData` command to your Windows PowerShell profile. +`Update-FormatData` command to your PowerShell profile. ### Example: Adding Calendar Data to Culture Objects @@ -354,12 +354,12 @@ and formatting of the specified location in the view, including ``, ## Update-FormatData -To load your Format.ps1xml files into a Windows PowerShell session, use the +To load your Format.ps1xml files into a PowerShell session, use the `Update-FormatData` cmdlet. If you want the views in your file to take precedence over the views in the built-in Format.ps1xml file, use the **PrependPath** parameter of `Update-FormatData`. `Update-FormatData` affects only the current session. To make the change to all future sessions, add the -`Update-FormatData` command to your Windows PowerShell profile. +`Update-FormatData` command to your PowerShell profile. ## Default Displays in Types.ps1xml diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Functions.md b/reference/6/Microsoft.PowerShell.Core/About/about_Functions.md index 3ff861eea6d9..e76013c3605d 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Functions.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Functions.md @@ -10,11 +10,11 @@ title: about_Functions # SHORT DESCRIPTION -Describes how to create and use functions in Windows PowerShell. +Describes how to create and use functions in PowerShell. # LONG DESCRIPTION -A function is a list of Windows PowerShell statements that has a name that you +A function is a list of PowerShell statements that has a name that you assign. When you run a function, you type the function name. The statements in the list run as if you had typed them at the command prompt. @@ -64,7 +64,7 @@ A function includes the following items: - A scope (optional) - A name that you select - Any number of named parameters (optional) -- One or more Windows PowerShell commands enclosed in braces ({}) +- One or more PowerShell commands enclosed in braces ({}) For more information about the Dynamicparam keyword and dynamic parameters in functions, see @@ -79,7 +79,7 @@ have the following format: function {statements} ``` -For example, the following function starts Windows PowerShell with the Run as +For example, the following function starts PowerShell with the Run as Administrator option. ```powershell @@ -104,24 +104,24 @@ function Get-NewPix ``` You can create a toolbox of useful small functions. Add these functions to -your Windows PowerShell profile, as described in about_Profiles and later in +your PowerShell profile, as described in about_Profiles and later in this topic. ### Function Names You can assign any name to a function, but functions that you share with others should follow the naming rules that have been established for all -Windows PowerShell commands. +PowerShell commands. Functions names should consist of a verb-noun pair in which the verb identifies the action that the function performs and the noun identifies the item on which the cmdlet performs its action. Functions should use the standard verbs that have been approved for all -Windows PowerShell commands. These verbs help us to keep our command names +PowerShell commands. These verbs help us to keep our command names simple, consistent, and easy for users to understand. -For more information about the standard Windows PowerShell verbs, see +For more information about the standard PowerShell verbs, see [Cmdlet Verbs](http://go.microsoft.com/fwlink/?LinkID=160773) on MSDN. ### Functions with Parameters @@ -464,20 +464,20 @@ in functions, and at the command line. Functions normally create a scope. The items created in a function, such as variables, exist only in the function scope. -For more information about scope in Windows PowerShell, see +For more information about scope in PowerShell, see [about_Scopes](about_Scopes.md). ### Finding and Managing Functions Using the Function: Drive -All the functions and filters in Windows PowerShell are automatically stored -in the Function: drive. This drive is exposed by the Windows PowerShell +All the functions and filters in PowerShell are automatically stored +in the Function: drive. This drive is exposed by the PowerShell Function provider. When referring to the Function: drive, type a colon after Function, just as you would do when referencing the C or D drive of a computer. The following command displays all the functions in the current session of -Windows PowerShell: +PowerShell: ```powershell Get-ChildItem function: @@ -485,7 +485,7 @@ Get-ChildItem function: The commands in the function are stored as a script block in the definition property of the function. For example, to display the commands in the Help -function that comes with Windows PowerShell, type: +function that comes with PowerShell, type: ```powershell (Get-ChildItem function:help).Definition @@ -496,15 +496,15 @@ for the Function provider. Type `Get-Help Function`. ### Reusing Functions in New Sessions -When you type a function at the Windows PowerShell command prompt, the +When you type a function at the PowerShell command prompt, the function becomes part of the current session. It is available until the session ends. -To use your function in all Windows PowerShell sessions, add the function -to your Windows PowerShell profile. For more information about profiles, +To use your function in all PowerShell sessions, add the function +to your PowerShell profile. For more information about profiles, see [about_Profiles](about_Profiles.md). -You can also save your function in a Windows PowerShell script file. Type your +You can also save your function in a PowerShell script file. Type your function in a text file, and then save the file with the .ps1 file name extension. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Functions_Advanced.md b/reference/6/Microsoft.PowerShell.Core/About/about_Functions_Advanced.md index 99d8549b8113..3f160bd0e0f7 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Functions_Advanced.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Functions_Advanced.md @@ -25,7 +25,7 @@ compiled cmdlet. There is a difference between authoring a compiled cmdlet and an advanced function. Compiled cmdlets are .NET Framework classes that must be written in a .NET Framework language such as C#. In contrast, advanced functions are -written in the Windows PowerShell script language in the same way that other +written in the PowerShell script language in the same way that other functions or script blocks are written. Advanced functions use the CmdletBinding attribute to identify them as @@ -91,4 +91,4 @@ Advanced functions differ from compiled cmdlets in the following ways: [about_Functions_OutputTypeAttribute](about_Functions_OutputTypeAttribute.md) -[Windows PowerShell Cmdlets](http://go.microsoft.com/fwlink/?LinkID=135279) \ No newline at end of file +[PowerShell Cmdlets](http://go.microsoft.com/fwlink/?LinkID=135279) \ No newline at end of file diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md b/reference/6/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md index a3baad979492..669c915215dd 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md @@ -34,14 +34,14 @@ see [`System.Management.Automation.PSCmdlet`](http://go.microsoft.com/fwlink/?Li The methods described in this section are referred to as the input processing methods. For functions, these three methods are represented by the `Begin`, `Process`, and `End` blocks of the function. Each function must include one or -more of these blocks. The Windows PowerShell runtime uses the code within +more of these blocks. The PowerShell runtime uses the code within these blocks when it is running a function. (These blocks are also available to functions that do not use the `CmdletBinding` attribute.) #### Begin This block is used to provide optional one-time preprocessing for the -function. The Windows PowerShell runtime uses the code in this block one time +function. The PowerShell runtime uses the code in this block one time for each instance of the function in the pipeline. #### Process diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Functions_CmdletBindingAttribute.md b/reference/6/Microsoft.PowerShell.Core/About/about_Functions_CmdletBindingAttribute.md index bd92c36dbcde..0b24073ab519 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Functions_CmdletBindingAttribute.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Functions_CmdletBindingAttribute.md @@ -18,7 +18,7 @@ The CmdletBinding attribute is an attribute of functions that makes them operate like compiled cmdlets that are written in C#, and it provides access to features of cmdlets. -Windows PowerShell binds the parameters of functions that have the +PowerShell binds the parameters of functions that have the CmdletBinding attribute in the same way that it binds the parameters of compiled cmdlets. The $PSCmdlet automatic variable is available to functions with the CmdletBinding attribute, but the $Args variable @@ -70,7 +70,7 @@ http://go.microsoft.com/fwlink/?LinkId=136658. ## DefaultParameterSetName The DefaultParameterSetName argument specifies the name of the parameter -set that Windows PowerShell will attempt to use when it cannot determine +set that PowerShell will attempt to use when it cannot determine which parameter set to use. You can avoid this issue by making the unique parameter of each parameter set a mandatory parameter. @@ -110,7 +110,7 @@ This argument was introduced in Windows PowerShell 3.0. followed by the objects. If the cmdlet cannot determine the total count, it returns "Unknown total count". -Windows PowerShell includes NewTotalCount, a helper method that gets the +PowerShell includes NewTotalCount, a helper method that gets the total count value to return and includes an estimate of the accuracy of the total count value. @@ -161,7 +161,7 @@ When parameters are not positional (they are "named"), the parameter name (or an abbreviation or alias of the name) is required in the command. When PositionalBinding is $True, function parameters are positional by -default. Windows PowerShell assigns position number to the parameters in +default. PowerShell assigns position number to the parameters in the order in which they are declared in the function. When PositionalBinding is $False, function parameters are not positional diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Group_Policy_Settings.md b/reference/6/Microsoft.PowerShell.Core/About/about_Group_Policy_Settings.md index 06982dd53f07..7b6236598519 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Group_Policy_Settings.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Group_Policy_Settings.md @@ -10,14 +10,14 @@ title: about_Group_Policy_Settings ## SHORT DESCRIPTION -Describes the Group Policy settings for Windows PowerShell +Describes the Group Policy settings for PowerShell ## LONG DESCRIPTION -Windows PowerShell includes Group Policy settings to help you define +PowerShell includes Group Policy settings to help you define consistent option values for servers in an enterprise environment. -The Windows PowerShell Group Policy settings are in the following +The PowerShell Group Policy settings are in the following Group Policy paths: Computer Configuration\ @@ -80,7 +80,7 @@ For more information, see [about_Execution_Policies](about_Execution_Policies.md ## TURN ON MODULE LOGGING The "Turn on Module Logging" policy setting turns on logging for -selected Windows PowerShell modules. The setting is effective in +selected PowerShell modules. The setting is effective in all sessions on all affected computers. If you enable this policy setting and specify one or more modules, @@ -88,7 +88,7 @@ pipeline execution events for the specified modules are recorded in the Windows PowerShell log in Event Viewer. If you disable this policy setting, logging of execution events is -disabled for all Windows PowerShell modules. +disabled for all PowerShell modules. If this policy setting is not configured, the **LogPipelineExecutionDetails** property of each module or snap-in determines whether the execution @@ -106,7 +106,7 @@ Import-Module ``` To turn on module logging for all sessions on a particular computer, -add the previous commands to the 'All Users' Windows PowerShell profile +add the previous commands to the 'All Users' PowerShell profile ($Profile.AllUsersAllHosts). For more information about module logging, see [about_Modules](about_Modules.md). @@ -124,7 +124,7 @@ the Group Policy setting under 'Computer Configuration' is effective. The Group Policy setting under 'User Configuration' is ignored. The `Update-Help` cmdlet downloads and installs the newest help files for -Windows PowerShell modules and installs them on the computer. By default, +PowerShell modules and installs them on the computer. By default, `Update-Help` downloads new help files from an Internet location specified by the module. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_History.md b/reference/6/Microsoft.PowerShell.Core/About/about_History.md index eca45af0808f..b7fa908e9e88 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_History.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_History.md @@ -14,14 +14,14 @@ Describes how to get and run commands in the command history. ## Long Description -When you enter a command at the command prompt, Windows PowerShell saves the +When you enter a command at the command prompt, PowerShell saves the command in the command history. You can use the commands in the history as a record of your work. And, you can recall and run the commands from the command history. ### History Cmdlets -Windows PowerShell has a set of cmdlets that manage the command history. +PowerShell has a set of cmdlets that manage the command history. | Cmdlet | Alias | Description | | ---------------- | ------ | ------------------------------------------ | @@ -32,7 +32,7 @@ Windows PowerShell has a set of cmdlets that manage the command history. ### Keyboard Shortcuts for Managing History -In the Windows PowerShell console, you can use the following shortcuts to +In the PowerShell console, you can use the following shortcuts to manage the command history. For other host applications, see the product documentation. @@ -51,9 +51,9 @@ For other host applications, see the product documentation. ### MaximumHistoryCount The `$MaximumHistoryCount` preference variable determines the maximum number -of commands that Windows PowerShell saves in the command history. +of commands that PowerShell saves in the command history. -The default value is 4096, meaning that Windows PowerShell saves the 4096 most +The default value is 4096, meaning that PowerShell saves the 4096 most recent commands, but you can change the value of the variable. For example, the following command lowers the `$MaximumHistoryCount` to 100 @@ -63,10 +63,10 @@ commands: $MaximumHistoryCount = 100 ``` -To apply the setting, restart Windows PowerShell. +To apply the setting, restart PowerShell. -To save the new variable value for all your Windows PowerShell sessions, add -the assignment statement to a Windows PowerShell profile. For more information +To save the new variable value for all your PowerShell sessions, add +the assignment statement to a PowerShell profile. For more information about profiles, see [about_Profiles](http://go.microsoft.com/fwlink/?LinkID=113729). diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Job_Details.md b/reference/6/Microsoft.PowerShell.Core/About/about_Job_Details.md index 28d0a19cc807..04bffd932127 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Job_Details.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Job_Details.md @@ -15,7 +15,7 @@ Provides details about background jobs on local and remote computers. # DETAILED DESCRIPTION This topic explains the concept of a background job and provides technical -information about how background jobs work in Windows PowerShell. +information about how background jobs work in PowerShell. This topic is a supplement to the [about_Jobs](about_Jobs.md) and [about_Remote_Jobs](about_Remote_Jobs.md) topics. @@ -27,9 +27,9 @@ a cmdlet, a function, a script, or any other command-based task. It is designed to run commands that take an extended period of time, but you can use it to run any command in the background. -When a synchronous command runs, the Windows PowerShell command prompt is +When a synchronous command runs, the PowerShell command prompt is suppressed until the command is complete. But a background job does not -suppress the Windows PowerShell prompt. A command to start a background job +suppress the PowerShell prompt. A command to start a background job returns a job object. The prompt returns immediately so you can work on other tasks while the background job runs. @@ -41,7 +41,7 @@ You can also run commands to stop the job, to wait for the job to be completed, and to delete the job. To make the timing of a background job independent of other commands, each -background job runs in its own Windows PowerShell environment +background job runs in its own PowerShell environment (a "session"). However, this can be a temporary connection that is created only to run the job and is then destroyed, or it can be a persistent session (a PSSession) that you can use to run several related jobs or @@ -115,7 +115,7 @@ Id Name PSJobTypeName State HasMoreData Location Command 3 Job3 Failed False localhost Get-Process ``` -To get the child jobs of a job on all versions of Windows PowerShell, +To get the child jobs of a job on all versions of PowerShell, use the ChildJob property of the parent job. ```powershell @@ -220,15 +220,15 @@ ComputerName DateTime Server02 Thursday, March 13, 2008 4:16:03 PM ``` -The child jobs feature of Windows PowerShell background jobs gives you +The child jobs feature of PowerShell background jobs gives you more control over the jobs that you run. # JOB TYPES -Windows PowerShell supports different types of jobs for different tasks. +PowerShell supports different types of jobs for different tasks. Beginning in Windows PowerShell 3.0, developers can write "job source -adapters" that add new job types to Windows PowerShell and include the +adapters" that add new job types to PowerShell and include the job source adapters in modules. When you import the module, you can use the new job type in your session. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Line_Editing.md b/reference/6/Microsoft.PowerShell.Core/About/about_Line_Editing.md index 8ac24fbc3b5c..aae731c234f6 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Line_Editing.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Line_Editing.md @@ -10,12 +10,12 @@ title: about_Line_Editing ## SHORT DESCRIPTION -Describes how to edit commands at the Windows PowerShell command prompt. +Describes how to edit commands at the PowerShell command prompt. ## LONG DESCRIPTION -The Windows PowerShell console has some useful features to help -you to edit commands at the Windows PowerShell command prompt. +The PowerShell console has some useful features to help +you to edit commands at the PowerShell command prompt. ### Move Left and Right diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Objects.md b/reference/6/Microsoft.PowerShell.Core/About/about_Objects.md index ad7b6fce21a8..6365e7f2b085 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Objects.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Objects.md @@ -10,11 +10,11 @@ title: about_Objects ## Short Description -Provides essential information about objects in Windows PowerShell. +Provides essential information about objects in PowerShell. ## Long Description -Every action you take in Windows PowerShell occurs within the context of +Every action you take in PowerShell occurs within the context of objects. As data moves from one command to the next, it moves as one or more identifiable objects. An object, then, is a collection of data that represents an item. An object is made up of three types of data: the diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_PSSession_Details.md b/reference/6/Microsoft.PowerShell.Core/About/about_PSSession_Details.md index ec35fe1a8f05..bdd93381b010 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_PSSession_Details.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_PSSession_Details.md @@ -10,27 +10,27 @@ title: about_PSSession_Details ## Short Description -Provides detailed information about Windows PowerShell sessions and the +Provides detailed information about PowerShell sessions and the role they play in remote commands. ## Long Description -A session is an environment in which Windows PowerShell runs. A session is -created for you whenever you start Windows PowerShell. You can create -additional sessions, called "Windows PowerShell sessions" or "PSSessions" +A session is an environment in which PowerShell runs. A session is +created for you whenever you start PowerShell. You can create +additional sessions, called "PowerShell sessions" or "PSSessions" on your computer or another computer. -Unlike the sessions that Windows PowerShell creates for you, you control +Unlike the sessions that PowerShell creates for you, you control and manage the PSSessions that you create. PSSessions play an important role in remote computing. When you create a -PSSession that is connected to a remote computer, Windows PowerShell +PSSession that is connected to a remote computer, PowerShell establishes a persistent connection to the remote computer to support the PSSession. You can use the PSSession to run a series of commands, functions, and scripts that share data. This topic provides detailed information about sessions and PSSessions -in Windows PowerShell. For basic information about the tasks that you +in PowerShell. For basic information about the tasks that you can perform with sessions, see [about_PSSessions](about_PSSessions.md). ## About Sessions @@ -38,9 +38,9 @@ can perform with sessions, see [about_PSSessions](about_PSSessions.md). Technically, a session is an execution environment in which Windows PowerShell runs. Each session includes an instance of the System.Management.Automation engine and a host program in which Windows -PowerShell runs. The host can be the familiar Windows PowerShell console +PowerShell runs. The host can be the familiar PowerShell console or another program that runs commands, such as Cmd.exe, or a program built -to host Windows PowerShell, such as Windows PowerShell Integrated Scripting +to host PowerShell, such as Windows PowerShell Integrated Scripting Environment (ISE). From a Windows perspective, a session is a Windows process on the target computer. @@ -57,9 +57,9 @@ asynchronously (concurrently) fails. ## About PSSessions -A session is created each time that you start Windows PowerShell. And, -Windows PowerShell creates temporary sessions to run individual commands. -However, you can also create sessions (called "Windows PowerShell sessions" +A session is created each time that you start PowerShell. And, +PowerShell creates temporary sessions to run individual commands. +However, you can also create sessions (called "PowerShell sessions" or "PSSessions") that you control and manage. PSSessions are critical to remote commands. If you use the **ComputerName** @@ -94,7 +94,7 @@ parameter to run commands in the PSSession. Many other cmdlets that get data from remote computers, such as `Get-Process`, `Get-Service`, `Get-EventLog`, and `Get-WmiObject` have only a -**ComputerName** parameter. They use technologies other than Windows PowerShell +**ComputerName** parameter. They use technologies other than PowerShell remoting to gather data remotely. These cmdlets do not have a **Session** parameter, but you can use the `Invoke-Command` cmdlet to run these commands in a PSSession. @@ -107,7 +107,7 @@ To create a PSSession, use the `New-PSSession` cmdlet. You can use ## Can I Create a PSSession on Any Computer? To create a PSSession that is connected to a remote computer, the computer -must be configured for remoting in Windows PowerShell. The current user +must be configured for remoting in PowerShell. The current user must be a member of the Administrators group on the remote computer, or the current user must be able to supply the credentials of a member of the Administrators group. For more information, @@ -161,7 +161,7 @@ You can use the `Disconnect-PSSession` cmdlet to disconnect from a PSSession. The PSSession is disconnected from the local session, but is maintained on the remote computer. Commands continue to run in the disconnected PSSession. You -can close Windows PowerShell and shut down the originating computer +can close PowerShell and shut down the originating computer without interrupting the PSSession. Then, even hours later, you can use the `Get-PSSession` cmdlet to @@ -177,19 +177,19 @@ in which they were created. If you disconnect a PSSession and then close the originating computer, the PSSession is maintained on the remote computer. -In addition, Windows PowerShell attempts to recover active +In addition, PowerShell attempts to recover active PSSessions that are disconnected unintentionally, such as by a computer reboot, a temporary power outage or network -disruption. Windows PowerShell attempts to maintain or recover +disruption. PowerShell attempts to maintain or recover the PSSession to an Opened state, if the originating session is still available, or to a disconnected state if it is not. An "active" PSSession is one that is running commands. If a PSSession is connected (not disconnected) and commands are running in the PSSession when the connected session closes, -Windows PowerShell attempts to maintain the PSSession on the +PowerShell attempts to maintain the PSSession on the remote computer. However, if no commands are running in the -PSSession, Windows PowerShell closes the PSSession when the +PSSession, PowerShell closes the PSSession when the connected session closes. For more information, see [about_Remote_Disconnected_Sessions](about_Remote_Disconnected_Sessions.md). diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_PSSessions.md b/reference/6/Microsoft.PowerShell.Core/About/about_PSSessions.md index 73030eed6e2f..f42e80944431 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_PSSessions.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_PSSessions.md @@ -10,22 +10,22 @@ title: about_PSSessions ## Short Description -Describes Windows PowerShell sessions (PSSessions) and explains how to +Describes PowerShell sessions (PSSessions) and explains how to establish a persistent connection to a remote computer. ## Long Description -To run Windows PowerShell commands on a remote computer, you can use the -**ComputerName** parameter of a cmdlet, or you can create a Windows PowerShell +To run PowerShell commands on a remote computer, you can use the +**ComputerName** parameter of a cmdlet, or you can create a PowerShell session (PSSession) and run commands in the PSSession. -When you create a PSSession, Windows PowerShell establishes a persistent +When you create a PSSession, PowerShell establishes a persistent connection to the remote computer. Use a PSSession to run a series of related commands on a remote computer. Commands that run in the same PSSession can share data, such as the values of variables, aliases, and functions. You can also create a PSSession on the local computer and run commands in it. -A local PSSession uses the Windows PowerShell remoting infrastructure to +A local PSSession uses the PowerShell remoting infrastructure to create and maintain the PSSession. Beginning in Windows PowerShell 3.0, PSSessions are independent of the @@ -38,26 +38,26 @@ This topic explains how to create, use, get, and delete PSSessions. For more advanced information, see [about_PSSession_Details](about_PSSession_Details.md). -Note: PSSessions use the Windows PowerShell remoting infrastructure. To use +Note: PSSessions use the PowerShell remoting infrastructure. To use PSSessions, the local and remote computers must be configured for remoting. For more information, see [about_Remote_Requirements](about_Remote_Requirements.md). In Windows Vista and later versions of Windows, to create a PSSession on a -local computer, you must start Windows PowerShell with the "Run as +local computer, you must start PowerShell with the "Run as administrator" option. ## What Is a Session? -A session is an environment in which Windows PowerShell runs. +A session is an environment in which PowerShell runs. -Each time you start Windows PowerShell, a session is created for you, and you +Each time you start PowerShell, a session is created for you, and you can run commands in the session. You can also add items to your session, such as modules and snap-ins, and you can create items, such as variables, functions, and aliases. These items exist only in the session and are deleted when the session ends. -You can also create user-managed sessions, known as " Windows PowerShell +You can also create user-managed sessions, known as " PowerShell sessions" or "PSSessions," on the local computer or on a remote computer. Like the default session, you can run commands in a PSSession and add and create items. However, unlike the session that starts automatically, you can control @@ -73,13 +73,13 @@ support the session. If you use the **ComputerName** parameter of the `Invoke-Command` or `Enter-PSSession` cmdlet to run a remote command or to start an interactive -session, Windows PowerShell creates a temporary session on the remote computer +session, PowerShell creates a temporary session on the remote computer and closes the session as soon as the command is complete or as soon as the interactive session ends. You cannot control these temporary sessions, and you cannot use them for more than a single command or a single interactive session. -In Windows PowerShell, the "current session" is the session that you are +In PowerShell, the "current session" is the session that you are working in. The "current session" can refer to any session, including a temporary session or a PSSession. @@ -95,7 +95,7 @@ You can run remote commands without creating a PSSession. Use the or a series of unrelated commands on one or many computers. When you use the **ComputerName** parameter of `Invoke-Command` or -`Enter-PSSession`, Windows PowerShell establishes a temporary connection to +`Enter-PSSession`, PowerShell establishes a temporary connection to the remote computer and then closes the connection as soon as the command is complete. Any data elements that you create are lost when the connection is closed. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_PackageManagement.md b/reference/6/Microsoft.PowerShell.Core/About/about_PackageManagement.md index cdfa3cbff14d..1340d7fb9339 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_PackageManagement.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_PackageManagement.md @@ -28,9 +28,9 @@ PackageManagement supports a flexible plug-in model that enables support for other software package management systems. The PackageManagement module is included with Windows PowerShell 5.0 and later -releases of Windows PowerShell, and works on three levels of package -management structure: package providers, package sources, and the packages -themselves. Let us define some terms: +releases of Windows PowerShell and PowerShell Core, and works on three levels +of package management structure: package providers, package sources, +and the packages themselves. Let us define some terms: - Package manager: Software package management system. In PackageManagement terms, this is a package provider. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Parameters.md b/reference/6/Microsoft.PowerShell.Core/About/about_Parameters.md index f53c4379e61b..8c0f9a1ac550 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Parameters.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Parameters.md @@ -22,7 +22,7 @@ parameters follow the command name and have the following form: ``` The name of the parameter is preceded by a hyphen (-), which signals to -Windows PowerShell that the word following the hyphen is a parameter name. +PowerShell that the word following the hyphen is a parameter name. Some parameters do not require or accept a parameter value. Other parameters require a value, but do not require the parameter name in the command. @@ -102,7 +102,7 @@ parameter attributes. This setting indicates whether the parameter is mandatory, that is, whether all commands that use this cmdlet must include this parameter. When the value -is **"True"** and the parameter is missing from the command, Windows PowerShell +is **"True"** and the parameter is missing from the command, PowerShell prompts you for a value for the parameter. #### Parameter Position @@ -198,7 +198,7 @@ True (by Value) Indicates that you can pipe any value to the Framework type. ``` -When a parameter is "True (by Value)", Windows PowerShell tries to associate +When a parameter is "True (by Value)", PowerShell tries to associate any piped values with that parameter before it tries other methods to interpret the command. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Preference_Variables.md b/reference/6/Microsoft.PowerShell.Core/About/about_Preference_Variables.md index f171a5281f94..18b547c57771 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Preference_Variables.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Preference_Variables.md @@ -87,7 +87,7 @@ PS> $ConfirmPreference = "Medium" ``` Like all variables, the values that you set are specific to the current -PowerShell session. To make them effective in all Windows PowerShell session, +PowerShell session. To make them effective in all PowerShell session, add them to your PowerShell profile. For more information, see about_Profiles. ### WORKING REMOTELY @@ -95,7 +95,7 @@ add them to your PowerShell profile. For more information, see about_Profiles. When you run commands on a remote computer, the remote commands are subject only to the preferences set in the PowerShell client on the remote computer. For example, when you run a remote command, the value of the \$DebugPreference -variable on remote computer determines how Windows PowerShell responds to +variable on remote computer determines how PowerShell responds to debugging messages. For more information about remote commands, see @@ -1143,7 +1143,7 @@ $PSSessionOption = New-PSSessionOption -NoCompression To use the \$PSSessionOption preference variable in every PowerShell session, add a New-PSSessionOption command that creates the \$PSSessionOption variable -to your Windows PowerShell profile. +to your PowerShell profile. You can also set custom options for a particular remote session. The options that you set take precedence over the system defaults and the value of the diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Profiles.md b/reference/6/Microsoft.PowerShell.Core/About/about_Profiles.md index 59dec3a5e401..d200a95d7a31 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Profiles.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Profiles.md @@ -167,7 +167,7 @@ that are specific to a host application, such as a command that sets the background color for a host application, in a profile that is specific to that host application. -If you are an administrator who is customizing Windows PowerShell for many +If you are an administrator who is customizing PowerShell for many users, follow these guidelines: - Store the common items in the `$profile.AllUsersAllHosts` profile diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Quoting_Rules.md b/reference/6/Microsoft.PowerShell.Core/About/about_Quoting_Rules.md index c7366b99753f..5a62ae4d2356 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Quoting_Rules.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Quoting_Rules.md @@ -89,11 +89,11 @@ The value of $(2+3) is 5. ``` To prevent the substitution of a variable value in a double-quoted string, use -the backtick character (`)(ASCII 96), which is the Windows PowerShell escape +the backtick character (`)(ASCII 96), which is the PowerShell escape character. In the following example, the backtick character that precedes the first $i -variable prevents Windows PowerShell from replacing the variable name with its +variable prevents PowerShell from replacing the variable name with its value. For example: ```powershell @@ -158,8 +158,8 @@ The output of this command is: don't ``` -To force Windows PowerShell to interpret a double quotation mark literally, -use a backtick character. This prevents Windows PowerShell from interpreting +To force PowerShell to interpret a double quotation mark literally, +use a backtick character. This prevents PowerShell from interpreting the quotation mark as a string delimiter. For example: ```powershell diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Regular_Expressions.md b/reference/6/Microsoft.PowerShell.Core/About/about_Regular_Expressions.md index 8ead15af0db0..1f53724f936d 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Regular_Expressions.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Regular_Expressions.md @@ -10,11 +10,11 @@ title: about_Regular_Expressions ## SHORT DESCRIPTION -Describes regular expressions in Windows PowerShell. +Describes regular expressions in PowerShell. ## LONG DESCRIPTION -Windows PowerShell supports the following regular expression characters. +PowerShell supports the following regular expression characters. ``` Format value @@ -59,7 +59,7 @@ Logic Matches the character that follows as an escaped character. Example "Try$" -match "Try\\$" ``` -Windows PowerShell supports the character classes available in Microsoft .NET +PowerShell supports the character classes available in Microsoft .NET Framework regular expressions. ``` @@ -106,7 +106,7 @@ Logic: Matches any nondigit. Equivalent to \P{Nd} for Unicode and [^0-9] for non-Unicode behavior. Example: "abcd" -match "\D+" ``` -Windows PowerShell supports the quantifiers available in .NET Framework +PowerShell supports the quantifiers available in .NET Framework regular expressions. The following are some examples of quantifiers. ``` @@ -140,8 +140,8 @@ Example: "abc" -match "\w{2,3}" All the comparisons shown in the preceding table evaluate to true. Notice that the escape character for regular expressions, a backslash (\\), is -different from the escape character for Windows PowerShell. The escape -character for Windows PowerShell is the backtick character (`) (ASCII 96). +different from the escape character for PowerShell. The escape +character for PowerShell is the backtick character (`) (ASCII 96). For more information, see [Regular Expression Language - Quick Reference](https://go.microsoft.com/fwlink/?LinkId=133231). diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Remote.md b/reference/6/Microsoft.PowerShell.Core/About/about_Remote.md index 6bf622ac5323..e74647d3c906 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Remote.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Remote.md @@ -10,7 +10,7 @@ title: about_Remote ## SHORT DESCRIPTION -Describes how to run remote commands in Windows PowerShell. +Describes how to run remote commands in PowerShell. ## LONG DESCRIPTION @@ -24,7 +24,7 @@ topics that describe each cmdlet that is used in these commands. The topics provide the details and explain how you can modify the commands to meet your needs. -Note: To use Windows PowerShell remoting, the local and remote computers must +Note: To use PowerShell remoting, the local and remote computers must be configured for remoting. For more information, see [about_Remote_Requirements](about_Remote_Requirements.md). @@ -66,10 +66,10 @@ For more information, see Enter-PSSession. Several cmdlets have a ComputerName parameter that lets you get objects from remote computers. -Because these cmdlets do not use WS-Management-based Windows PowerShell +Because these cmdlets do not use WS-Management-based PowerShell remoting, you can use the ComputerName parameter of these cmdlets on any -computer that is running Windows PowerShell. The computers do not have to be -configured for Windows PowerShell remoting, and the computers do not have to +computer that is running PowerShell. The computers do not have to be +configured for PowerShell remoting, and the computers do not have to meet the system requirements for remoting. The following cmdlets have a ComputerName parameter: @@ -224,7 +224,7 @@ remote computer where it terminates the remote command. - For information about PSSessions and persistent connections, see [about_PSSessions](about_PSSessions.md). -- For information about Windows PowerShell background jobs, see [about_Jobs](about_Jobs.md). +- For information about PowerShell background jobs, see [about_Jobs](about_Jobs.md). ## KEYWORDS diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Disconnected_Sessions.md b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Disconnected_Sessions.md index 396c15a85728..f3051a64af53 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Disconnected_Sessions.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Disconnected_Sessions.md @@ -21,10 +21,10 @@ continue to run while the session is disconnected. The Disconnected Sessions feature is available only when the computer at the remote end of a connection is running Windows PowerShell 3.0 or a later -version of Windows PowerShell. +version of Windows PowerShell and PowerShell Core. The Disconnected Sessions feature allows you to close the session in which a -PSSession was created, and even close Windows PowerShell, and shut down the +PSSession was created, and even close PowerShell, and shut down the computer, without disrupting commands running in the PSSession. It is especially useful for running commands that take an extended time to complete, and it provides the time and device flexibility that IT professionals require. @@ -194,7 +194,7 @@ which you created the PSSession or from other sessions on the local computer or other computers. You can create a PSSession, run commands in the PSSession, disconnect from the -PSSession, close Windows PowerShell, and shut down the computer. Hours later, +PSSession, close PowerShell, and shut down the computer. Hours later, you can open a different computer, get the PSSession, connect to it, and get the results of commands that ran in the PSSession while it was disconnected. Then you can run more commands in the session. @@ -292,7 +292,7 @@ Availability property. An Availability value of None indicates that you can connect to the session. A value of Busy indicates that you cannot connect to the PSSession because it is connected to another session. -The following example is run in two sessions (Windows PowerShell console +The following example is run in two sessions (PowerShell console windows) on the same computer. Note the changing values of the State and Availability properties in each session as the PSSession is disconnected and reconnected. @@ -351,7 +351,7 @@ is maintained before it is deleted. PSSessions are idle when the "heartbeat thread" receives no response. Disconnecting a session makes it idle and starts the Idle Timeout clock, even -if commands are still running in the disconnected session. Windows PowerShell +if commands are still running in the disconnected session. PowerShell considers disconnected sessions to be active, but idle. When creating and disconnecting sessions, verify that the idle timeout in the @@ -628,7 +628,7 @@ cmdlet to wait until the session is reconnected (in the Opened state), use the ## Robust Sessions and Unintentional Disconnection Occasionally, a PSSession might be disconnected unintentionally due to a -computer failure or network outage. Windows PowerShell attempts to recover the +computer failure or network outage. PowerShell attempts to recover the PSSession, but its success depends upon the severity and duration of the cause. @@ -641,10 +641,10 @@ the `Connect-PSSession` cmdlet to reconnect to the session and the session was disconnected. If you close (exit) the session in which a PSSession was created while -commands are running in the PSSession, Windows PowerShell maintains the +commands are running in the PSSession, PowerShell maintains the PSSession in the Disconnected state on the remote computer. If you close (exit) the session in which a PSSession was created, but no commands are -running in the PSSession, Windows PowerShell does not attempt to maintain the +running in the PSSession, PowerShell does not attempt to maintain the PSSession. ## See Also diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_FAQ.md b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_FAQ.md index dd14949a0e16..2192afa2f67e 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_FAQ.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_FAQ.md @@ -15,16 +15,16 @@ PowerShell. ## LONG DESCRIPTION -When you work remotely, you type commands in Windows PowerShell on one +When you work remotely, you type commands in PowerShell on one computer (known as the "local computer"), but the commands run on another computer (known as the "remote computer"). The experience of working remotely should be as much like working directly at the remote computer as possible. -Note: To use Windows PowerShell remoting, the remote computer must be +Note: To use PowerShell remoting, the remote computer must be configured for remoting. For more information, see [about_Remote_Requirements](about_Remote_Requirements.md). -### MUST BOTH COMPUTERS HAVE WINDOWS POWERSHELL INSTALLED? +### MUST BOTH COMPUTERS HAVE POWERSHELL INSTALLED? Yes. To work remotely, the local and remote computers must have Windows PowerShell, the Microsoft .NET Framework, and the Web Services for Management @@ -38,7 +38,7 @@ reconnect to it, work only when both computers are running Windows PowerShell 3.0. You must have permission to connect to the remote computer, permission to run -Windows PowerShell, and permission to access data stores (such as files and +PowerShell, and permission to access data stores (such as files and folders), and the registry on the remote computer. For more information, see [about_Remote_Requirements](about_Remote_Requirements.md). @@ -46,12 +46,12 @@ For more information, see [about_Remote_Requirements](about_Remote_Requirements. ### HOW DOES REMOTING WORK? When you submit a remote command, the command is transmitted across the -network to the Windows PowerShell engine on the remote computer, and it runs -in the Windows PowerShell client on the remote computer. The command results -are sent back to the local computer and appear in the Windows PowerShell +network to the PowerShell engine on the remote computer, and it runs +in the PowerShell client on the remote computer. The command results +are sent back to the local computer and appear in the PowerShell session on the local computer. -To transmit the commands and receive the output, Windows PowerShell uses the +To transmit the commands and receive the output, PowerShell uses the WS-Management protocol. For information about the WS-Management protocol, see [WS-Management Protocol](http://go.microsoft.com\/fwlink/?LinkId=144634) in the MSDN library. @@ -61,7 +61,7 @@ computer. This enables you to disconnect from the session and reconnect from a different session or a different computer without interrupting the commands or losing state. -### IS WINDOWS POWERSHELL REMOTING SECURE? +### IS POWERSHELL REMOTING SECURE? When you connect to a remote computer, the system uses the user name and password credentials on the local computer or the credentials that you supply @@ -74,15 +74,15 @@ Management (WinRM) requests. Then, users can use the UseSSL parameters of the Invoke-Command, New-PSSession, and Enter-PSSession cmdlets when establishing a connection. This option uses the more secure HTTPS channel instead of HTTP. -### DO ALL REMOTE COMMANDS REQUIRE WINDOWS POWERSHELL REMOTING? +### DO ALL REMOTE COMMANDS REQUIRE POWERSHELL REMOTING? No. Several cmdlets have a ComputerName parameter that lets you get objects from the remote computer. -These cmdlets do not use Windows PowerShell remoting. So, you can use them on -any computer that is running Windows PowerShell, even if the computer is not -configured for Windows PowerShell remoting or if the computer does not meet -the requirements for Windows PowerShell remoting. +These cmdlets do not use PowerShell remoting. So, you can use them on +any computer that is running PowerShell, even if the computer is not +configured for PowerShell remoting or if the computer does not meet +the requirements for PowerShell remoting. These cmdlets include the following: @@ -102,7 +102,7 @@ Get-Command -ParameterName ComputerName ``` To determine whether the ComputerName parameter of a particular cmdlet -requires Windows PowerShell remoting, see the parameter description. To +requires PowerShell remoting, see the parameter description. To display the parameter description, type: ```ppowershell @@ -150,7 +150,7 @@ topics for the cmdlets that support remoting. You can use the Enter-PSSession cmdlet to start an interactive session with a remote computer. -At the Windows PowerShell prompt, type: +At the PowerShell prompt, type: ```powershell Enter-PSSession @@ -182,11 +182,11 @@ For more information, see Enter-PSSession. Yes. You can run remote commands by specifying the name of the remote computer, its NetBIOS name, or its IP address. Or, you can run remote commands -by specifying a Windows PowerShell session (PSSession) that is connected to +by specifying a PowerShell session (PSSession) that is connected to the remote computer. When you use the ComputerName parameter of Invoke-Command or Enter-PSSession, -Windows PowerShell establishes a temporary connection. Windows PowerShell uses +PowerShell establishes a temporary connection. PowerShell uses the connection to run only the current command, and then it closes the connection. This is a very efficient method for running a single command or several unrelated commands, even on many remote computers. @@ -207,10 +207,10 @@ For more information about sessions, see about_PSSessions. Yes. The ComputerName parameter of the Invoke-Command cmdlet accepts multiple computer names, and the Session parameter accepts multiple PSSessions. -When you run an Invoke-Command command, Windows PowerShell runs the commands +When you run an Invoke-Command command, PowerShell runs the commands on all of the specified computers or in all of the specified PSSessions. -Windows PowerShell can manage hundreds of concurrent remote connections. +PowerShell can manage hundreds of concurrent remote connections. However, the number of remote commands that you can send might be limited by the resources of your computer and its capacity to establish and maintain multiple network connections. @@ -219,7 +219,7 @@ For more information, see the example in the Invoke-Command Help topic. ### WHERE ARE MY PROFILES? -Windows PowerShell profiles are not run automatically in remote sessions, so +PowerShell profiles are not run automatically in remote sessions, so the commands that the profile adds are not present in the session. In addition, the \$profile automatic variable is not populated in remote sessions. @@ -248,13 +248,13 @@ are available in $s. You can also use a startup script in a session configuration to run a profile in every remote session that uses the session configuration. -For more information about Windows PowerShell profiles, see about_Profiles. +For more information about PowerShell profiles, see about_Profiles. For more information about session configurations, see Register-PSSessionConfiguration. ### HOW DOES THROTTLING WORK ON REMOTE COMMANDS? -To help you manage the resources on your local computer, Windows PowerShell +To help you manage the resources on your local computer, PowerShell includes a per-command throttling feature that lets you limit the number of concurrent remote connections that are established for each command. @@ -279,7 +279,7 @@ Get-Command -ParameterName ThrottleLimit ### IS THE OUTPUT OF REMOTE COMMANDS DIFFERENT FROM LOCAL OUTPUT? -When you use Windows PowerShell locally, you send and receive "live" .NET +When you use PowerShell locally, you send and receive "live" .NET Framework objects; "live" objects are objects that are associated with actual programs or system components. When you invoke the methods or change the properties of live objects, the changes affect the actual program or @@ -287,11 +287,11 @@ component. And, when the properties of a program or component change, the properties of the object that represent them also change. However, because most live objects cannot be transmitted over the network, -Windows PowerShell "serializes" most of the objects sent in remote commands, +PowerShell "serializes" most of the objects sent in remote commands, that is, it converts each object into a series of XML (Constraint Language in XML [CLiXML]) data elements for transmission. -When Windows PowerShell receives a serialized object, it converts the XML into +When PowerShell receives a serialized object, it converts the XML into a deserialized object type. The deserialized object is an accurate record of the properties of the program or component at a previous time, but it is no longer "live", that is, it is no longer directly associated with the @@ -311,7 +311,7 @@ For information about interpreting and formatting remote output, see ### CAN I RUN BACKGROUND JOBS REMOTELY? -Yes. A Windows PowerShell background job is a Windows PowerShell command that +Yes. A PowerShell background job is a PowerShell command that runs asynchronously without interacting with the session. When you start a background job, the command prompt returns immediately, and you can continue to work in the session while the job runs even if it runs for an extended @@ -326,20 +326,20 @@ parameter of the Invoke-Command cmdlet to run any remote command as a background job. And, you can use Invoke-Command to run a Start-Job command remotely. -For more information about background jobs in Windows PowerShell , see +For more information about background jobs in PowerShell , see [about_Jobs(about_Jobs.md)] and [about_Remote_Jobs(about_Remote_Jobs.md)]. ### CAN I RUN WINDOWS PROGRAMS ON A REMOTE COMPUTER? -You can use Windows PowerShell remote commands to run Windows-based programs +You can use PowerShell remote commands to run Windows-based programs on remote computers. For example, you can run Shutdown.exe or Ipconfig on a remote computer. -However, you cannot use Windows PowerShell commands to open the user interface +However, you cannot use PowerShell commands to open the user interface for any program on a remote computer. When you start a Windows program on a remote computer, the command is not -completed, and the Windows PowerShell command prompt does not return, until +completed, and the PowerShell command prompt does not return, until the program is finished or until you press CTRL\+C to interrupt the command. For example, if you run the IpConfig program on a remote computer, the command prompt does not return until IpConfig is completed. @@ -350,7 +350,7 @@ PowerShell command is not completed, and the command prompt does not return until you stop the program process or until you press CTRL\+C, which interrupts the command and stops the process. -For example, if you use a Windows PowerShell command to run Notepad on a +For example, if you use a PowerShell command to run Notepad on a remote computer, the Notepad process starts on the remote computer, but the Notepad user interface does not appear. To interrupt the command and restore the command prompt, press CTRL\+C. @@ -402,9 +402,9 @@ Get-Command *PSSessionConfiguration ### WHAT ARE FAN-IN AND FAN OUT CONFIGURATIONS? -The most common Windows PowerShell remoting scenario involving multiple +The most common PowerShell remoting scenario involving multiple computers is the one-to-many configuration, in which one local computer (the -administrator's computer) runs Windows PowerShell commands on numerous remote +administrator's computer) runs PowerShell commands on numerous remote computers. This is known as the "fan-out" scenario. However, in some enterprises, the configuration is many-to-one, where many @@ -412,21 +412,21 @@ client computers connect to a single remote computer that is running Windows PowerShell, such as a file server or a kiosk. This is known as the "fan-in" configuration. -Windows PowerShell remoting supports both fan-out and fan-in configurations. +PowerShell remoting supports both fan-out and fan-in configurations. -For the fan-out configuration, Windows PowerShell uses the Web Services for +For the fan-out configuration, PowerShell uses the Web Services for Management (WS-Management) protocol and the WinRM service that supports the Microsoft implementation of WS-Management. When a local computer connects to a remote computer, WS-Management establishes a connection and uses a plug-in for -Windows PowerShell to start the Windows PowerShell host process +PowerShell to start the PowerShell host process (Wsmprovhost.exe) on the remote computer. The user can specify an alternate port, an alternate session configuration, and other features to customize the remote connection. -To support the "fan-in" configuration, Windows PowerShell uses Internet +To support the "fan-in" configuration, PowerShell uses Internet Information Services (IIS) to host WS-Management, to load the Windows -PowerShell plug-in, and to start Windows PowerShell. In this scenario, instead -of starting each Windows PowerShell session in a separate process, all Windows +PowerShell plug-in, and to start PowerShell. In this scenario, instead +of starting each PowerShell session in a separate process, all Windows PowerShell sessions run in the same host process. IIS hosting and fan-in remote management is not supported in Windows XP or in @@ -435,14 +435,14 @@ Windows Server 2003. In a fan-in configuration, the user can specify a connection URI and an HTTP endpoint, including the transport, computer name, port, and application name. IIS forwards all the requests with a specified application name to the -application. The default is WS-Management, which can host Windows PowerShell. +application. The default is WS-Management, which can host PowerShell. You can also specify an authentication mechanism and prohibit or allow redirection from HTTP and HTTPS endpoints. ### CAN I TEST REMOTING ON A SINGLE COMPUTER \(NOT IN A DOMAIN\)? -Yes. Windows PowerShell remoting is available even when the local computer is +Yes. PowerShell remoting is available even when the local computer is not in a domain. You can use the remoting features to connect to sessions and to create sessions on the same computer. The features work the same as they do when you connect to a remote computer. @@ -466,7 +466,7 @@ changes. LocalAccountTokenFilterPolicy in HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System - You can use the following Windows PowerShell command to add this entry: + You can use the following PowerShell command to add this entry: ```powershell $parameters = @{ @@ -500,14 +500,14 @@ credentials. To enable authentication, use the following command to add the remote computer to the list of trusted hosts for the local computer in WinRM. Type the command -at the Windows PowerShell prompt. +at the PowerShell prompt. ```powershell Set-Item WSMan:\localhost\Client\TrustedHosts -Value ``` For example, to add the Server01 computer to the list of trusted hosts on the -local computer, type the following command at the Windows PowerShell prompt: +local computer, type the following command at the PowerShell prompt: ```powershell Set-Item WSMan:\localhost\Client\TrustedHosts -Value Server01 diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Jobs.md b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Jobs.md index 36f61eac5bfe..8208ce068f89 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Jobs.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Jobs.md @@ -59,7 +59,7 @@ local computer. Use the Enter-PSSession cmdlet to start an interactive session with a remote computer. You can use the ComputerName parameter of Enter-PSSession to establish a temporary connection for the interactive session. Or, you can use -the Session parameter to run the interactive session in a Windows PowerShell +the Session parameter to run the interactive session in a PowerShell session (PSSession). The following command starts an interactive session on the Server01 computer. @@ -168,7 +168,7 @@ is completed, the results are returned to the local computer. You can use the cmdlets that contain the Job noun (the Job cmdlets) to manage any job created by any cmdlet. Many of the cmdlets that have AsJob parameters -do not use Windows PowerShell remoting, so you can use them even on computers +do not use PowerShell remoting, so you can use them even on computers that are not configured for remoting and that do not meet the requirements for remoting. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Output.md b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Output.md index afe998afcf46..d409f3c9db03 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Output.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Output.md @@ -79,7 +79,7 @@ Monday, July 21, 2008 7:16:58 PM Server02 Several cmdlets, including Get-Process, Get-Service, and Get-EventLog, have a ComputerName parameter that gets the objects on a remote computer. -These cmdlets do not use Windows PowerShell remoting, so you can use them +These cmdlets do not use PowerShell remoting, so you can use them even on computers that are not configured for remoting in Windows PowerShell. @@ -151,19 +151,19 @@ When you run remote commands that generate output, the command output is transmitted across the network back to the local computer. Because most live Microsoft .NET Framework objects (such as the objects -that Windows PowerShell cmdlets return) cannot be transmitted over the +that PowerShell cmdlets return) cannot be transmitted over the network, the live objects are "serialized". In other words, the live objects are converted into XML representations of the object and its properties. Then, the XML-based serialized object is transmitted across the network. -On the local computer, Windows PowerShell receives the XML-based serialized +On the local computer, PowerShell receives the XML-based serialized object and "deserializes" it by converting the XML-based object into a standard .NET Framework object. However, the deserialized object is not a live object. It is a snapshot of the object at the time that it was serialized, and it includes properties -but no methods. You can use and manage these objects in Windows PowerShell, +but no methods. You can use and manage these objects in PowerShell, including passing them in pipelines, displaying selected properties, and formatting them. @@ -192,7 +192,7 @@ any special handling or formatting. # ORDERING THE RESULTS The order of the computer names in the ComputerName parameter of cmdlets -determines the order in which Windows PowerShell connects to the remote +determines the order in which PowerShell connects to the remote computers. However, the results appear in the order in which the local computer receives them, which might be a different order. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Requirements.md b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Requirements.md index d35af82e7c4a..ab325e6e8c77 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Requirements.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Requirements.md @@ -11,19 +11,19 @@ title: about_Remote_Requirements ## SHORT DESCRIPTION Describes the system requirements and configuration requirements for running -remote commands in Windows PowerShell. +remote commands in PowerShell. ## LONG DESCRIPTION This topic describes the system requirements, user requirements, and resource requirements for establishing remote connections and running remote commands -in Windows PowerShell. It also provides instructions for configuring remote +in PowerShell. It also provides instructions for configuring remote operations. Note: Many cmdlets (including the Get-Service, Get-Process, Get-WMIObject, Get-EventLog, and Get-WinEvent cmdlets) get objects from remote computers by using Microsoft .NET Framework methods to retrieve the objects. They do not -use the Windows PowerShell remoting infrastructure. The requirements in this +use the PowerShell remoting infrastructure. The requirements in this document do not apply to these cmdlets. To find the cmdlets that have a ComputerName parameter but do not use Windows @@ -51,7 +51,7 @@ You can create remote sessions between computers running Windows PowerShell PowerShell 3.0, such as the ability to disconnect and reconnect to sessions, are available only when both computers are running Windows PowerShell 3.0. -To find the version number of an installed version of Windows PowerShell, +To find the version number of an installed version of PowerShell, use the $PSVersionTable automatic variable. Windows Remote Management (WinRM) 3.0 and Microsoft .NET Framework 4 are @@ -143,7 +143,7 @@ Administrator privileges are required for the following remoting operations: - Viewing and changing WS-Management settings on the local computer. These are the settings in the LocalHost node of the WSMAN: drive. -To perform these tasks, you must start Windows PowerShell with the "Run as +To perform these tasks, you must start PowerShell with the "Run as administrator" option even if you are a member of the Administrators group on the local computer. @@ -170,28 +170,28 @@ the "Run as administrator" option to start the program. ## HOW TO CONFIGURE YOUR COMPUTER FOR REMOTING Computers running all supported versions of Windows can establish remote -connections to and run remote commands in Windows PowerShell without any +connections to and run remote commands in PowerShell without any configuration. However, to receive connections, and allow users to create -local and remote user-managed Windows PowerShell sessions ("PSSessions") and -run commands on the local computer, you must enable Windows PowerShell +local and remote user-managed PowerShell sessions ("PSSessions") and +run commands on the local computer, you must enable PowerShell remoting on the computer. Windows Server 2012 and newer releases of Windows Server are enabled for -Windows PowerShell remoting by default. If the settings are changed, you can +PowerShell remoting by default. If the settings are changed, you can restore the default settings by running the Enable-PSRemoting cmdlet. On all other supported versions of Windows, you need to run the -Enable-PSRemoting cmdlet to enable Windows PowerShell remoting. +Enable-PSRemoting cmdlet to enable PowerShell remoting. -The remoting features of Windows PowerShell are supported by the WinRM +The remoting features of PowerShell are supported by the WinRM service, which is the Microsoft implementation of the Web Services for -Management (WS-Management) protocol. When you enable Windows PowerShell +Management (WS-Management) protocol. When you enable PowerShell remoting, you change the default configuration of WS-Management and add system configuration that allow users to connect to WS-Management. -To configure Windows PowerShell to receive remote commands: +To configure PowerShell to receive remote commands: -1. Start Windows PowerShell with the "Run as administrator" option. +1. Start PowerShell with the "Run as administrator" option. 2. At the command prompt, type: `Enable-PSRemoting` To verify that remoting is configured correctly, run a test command such as @@ -216,9 +216,9 @@ If the command fails, for assistance, see ## UNDERSTAND POLICIES -When you work remotely, you use two instances of Windows PowerShell, one on +When you work remotely, you use two instances of PowerShell, one on the local computer and one on the remote computer. As a result, your work is -affected by the Windows policies and the Windows PowerShell policies on the +affected by the Windows policies and the PowerShell policies on the local and remote computers. In general, before you connect and as you are establishing the connection, the diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Troubleshooting.md b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Troubleshooting.md index 38c89c13fe51..93f66ef61263 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Troubleshooting.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Troubleshooting.md @@ -10,15 +10,15 @@ title: about_Remote_Troubleshooting ## SHORT DESCRIPTION -Describes how to troubleshoot remote operations in Windows PowerShell. +Describes how to troubleshoot remote operations in PowerShell. ## LONG DESCRIPTION This section describes some of the problems that you might encounter when -using the remoting features of Windows PowerShell that are based on +using the remoting features of PowerShell that are based on WS-Management technology and it suggests solutions to these problems. -Before using Windows PowerShell remoting, see about_Remote and +Before using PowerShell remoting, see about_Remote and about_Remote_Requirements for guidance on configuration and basic use Also, the Help topics for each of the remoting cmdlets, particularly the parameter descriptions, have useful information that is designed to help you avoid @@ -26,7 +26,7 @@ problems. NOTE: To view or change settings for the local computer in the WSMan: drive, including changes to the session configurations, trusted hosts, ports, or -listeners, start Windows PowerShell with the "Run as administrator" option. +listeners, start PowerShell with the "Run as administrator" option. ## TROUBLESHOOTING PERMISSION AND AUTHENTICATION ISSUES @@ -68,7 +68,7 @@ WS-Management service is running on the remote host and configured to listen for requests on the correct port and HTTP URL. No configuration is required to enable a computer to send remote -commands. However, to receive remote commands, Windows PowerShell remoting +commands. However, to receive remote commands, PowerShell remoting must be enabled on the computer. Enabling includes starting the WinRM service, setting the startup type for the WinRM service to Automatic, creating listeners for HTTP and HTTPS connections, and creating default @@ -103,7 +103,7 @@ ERROR: The connection to the remote host was refused. Verify that the WS-Management service is running on the remote host and configured to listen for requests on the correct port and HTTP URL. -To enable a single computer to receive remote Windows PowerShell commands +To enable a single computer to receive remote PowerShell commands and accept connections, use the Enable-PSRemoting cmdlet. To enable remoting for multiple computers in an enterprise, you can use the @@ -200,7 +200,7 @@ the Windows Remote Management service. ERROR: ACCESS IS DENIED -Windows PowerShell remoting depends upon the Windows Remote Management +PowerShell remoting depends upon the Windows Remote Management (WinRM) service. The service must be running to support remote commands. On server versions of Windows, the startup type of the Windows Remote @@ -529,9 +529,9 @@ ERROR: The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. -Because Windows PowerShell remoting uses the HTTP protocol, it is affected +Because PowerShell remoting uses the HTTP protocol, it is affected by HTTP proxy settings. In enterprises that have proxy servers, users -cannot access a Windows PowerShell remote computer directly. +cannot access a PowerShell remote computer directly. To resolve this problem, use proxy setting options in your remote command. The following settings are available: @@ -569,9 +569,9 @@ the option object that New-PSSessionOption creates in the value of the $PSSessionOption preference variable. For more information about the $PSSessionOption preference variable, see about_Preference_Variables. -To set these options for all remote commands all Windows PowerShell sessions +To set these options for all remote commands all PowerShell sessions on the local computer, add the $PSSessionOption preference variable to your -Windows PowerShell profile. For more information about Windows PowerShell +PowerShell profile. For more information about PowerShell profiles, see about_Profiles. ### HOW TO DETECT A 32-BIT SESSION ON A 64-BIT COMPUTER @@ -630,7 +630,7 @@ process. For example, the following command starts a process with the RemoteSigned execution policy. The execution policy change affects only the current -process and does not change the Windows PowerShell ExecutionPolicy registry +process and does not change the PowerShell ExecutionPolicy registry setting. ```powershell @@ -674,7 +674,7 @@ The following quotas are available in the basic configuration. MaximumReceivedObjectSizeMB parameters of the Register-PSSessionConfiguration cmdlet. -When quotas conflict with a command, Windows PowerShell generates an error. +When quotas conflict with a command, PowerShell generates an error. To resolve the error, change the remote command to comply with the quota. Or, determine the source of the quota, and then increase the quota to allow @@ -702,7 +702,7 @@ the time specified in OperationTimeout. You can use timeouts to protect the local computer and the remote computer from excessive resource use, both accidental and malicious. When timeouts -are set on both the local and remote computer, Windows PowerShell uses the +are set on both the local and remote computer, PowerShell uses the shortest timeout settings. The following timeouts are available in the basic configuration. @@ -746,13 +746,13 @@ New-PSSessionOption. ## TROUBLESHOOTING UNRESPONSIVE BEHAVIOR This section discusses remoting problems that prevent a command from completing -and prevent or delay the return of the Windows PowerShell prompt. +and prevent or delay the return of the PowerShell prompt. ### HOW TO INTERRUPT A COMMAND Some native Windows programs, such as programs with a user interface, console applications that prompt for input, and console applications that use the -Win32 console API, do not work correctly in the Windows PowerShell remote host. +Win32 console API, do not work correctly in the PowerShell remote host. When you use these programs, you might see unexpected behavior, such as no output, partial output, or a remote command that does not complete. @@ -772,7 +772,7 @@ WinRM operations are in progress. To resolve this issue, verify that the WinRM service is running and try the command again. -1. Start Windows PowerShell with the "Run as administrator" option. +1. Start PowerShell with the "Run as administrator" option. 2. Run the following command:    Start-Service WinRM diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Variables.md b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Variables.md index 5f102a0b9724..02f98a466bd8 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Variables.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Variables.md @@ -25,7 +25,7 @@ command. ## USING REMOTE VARIABLES -Windows PowerShell assumes that the variables used in remote commands are +PowerShell assumes that the variables used in remote commands are defined in the session in which the command runs. In the following example, the \$ps variable is defined in the temporary session @@ -86,7 +86,7 @@ remote command and using the ArgumentList parameter of the Invoke-Command cmdlet to specify the local variable as the parameter value. This command format is valid on Windows PowerShell 2.0 and later versions of -Windows PowerShell. +Windows PowerShell and PowerShell Core. - Use the param keyword to define parameters for the remote command. The parameter names are placeholders that do not need to match the name of the diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md b/reference/6/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md index db84fc679557..cc7ed4ebe549 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md @@ -22,7 +22,7 @@ and from Windows Explorer in earlier versions of Windows. The "Run with PowerShell" feature is designed to run scripts that do not have required parameters and do not return output to the command prompt. -When you use the "Run with PowerShell" feature, the Windows PowerShell console +When you use the "Run with PowerShell" feature, the PowerShell console window appears only briefly, if at all. You cannot interact with it. To use the "Run with PowerShell" feature: @@ -30,7 +30,7 @@ To use the "Run with PowerShell" feature: In File Explorer (or Windows Explorer), right-click the script file name and then select "Run with PowerShell". -The "Run with PowerShell" feature starts a Windows PowerShell session that has +The "Run with PowerShell" feature starts a PowerShell session that has an execution policy of Bypass, runs the script, and closes the session. It runs a command that has the following format: diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Script_Blocks.md b/reference/6/Microsoft.PowerShell.Core/About/about_Script_Blocks.md index 005666181238..a4064dc1f323 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Script_Blocks.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Script_Blocks.md @@ -10,11 +10,11 @@ title: about_Script_Blocks ## Short description Defines what a script block is and explains how to use script blocks in -the Windows PowerShell programming language. +the PowerShell programming language. ## Long description -In the Windows PowerShell programming language, a script block is a +In the PowerShell programming language, a script block is a collection of statements or expressions that can be used as a single unit. A script block can accept arguments and return values. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Script_Internationalization.md b/reference/6/Microsoft.PowerShell.Core/About/about_Script_Internationalization.md index 5750029a1ee3..9c22ee76b04c 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Script_Internationalization.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Script_Internationalization.md @@ -16,7 +16,7 @@ scripts to display messages and instructions to users in their user interface ## Long Description -The Windows PowerShell script internationalization features allow you to +The PowerShell script internationalization features allow you to better serve users throughout the world by displaying Help and user messages for scripts and functions in the user's UI language. @@ -27,7 +27,7 @@ separate from code so they are easily identified and extracted. A new cmdlet, `ConvertFrom-StringData`, converts text strings into dictionary-like hash tables to facilitate translation. -To support international Help text, Windows PowerShell includes the following +To support international Help text, PowerShell includes the following features: * A Data section that separates text strings from code instructions. For more diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Session_Configuration_Files.md b/reference/6/Microsoft.PowerShell.Core/About/about_Session_Configuration_Files.md index b38184abc208..4962c76435d4 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Session_Configuration_Files.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Session_Configuration_Files.md @@ -19,7 +19,7 @@ sessions that use the session configuration. A "session configuration file" is a text file with a .pssc file name extension that contains a hash table of session configuration properties and values. You can use a session configuration file to set the properties of a session -configuration. Doing so defines the environment of any Windows PowerShell +configuration. Doing so defines the environment of any PowerShell sessions that use that session configuration. Session configuration files make it easy to create custom session @@ -39,7 +39,7 @@ affected by the settings in the session configuration. ## Creating Custom Sessions -You can customize many features of a Windows PowerShell session by specifying +You can customize many features of a PowerShell session by specifying session properties in a session configuration. You can customize a session by writing a C# program that defines a custom runspace, or you can use a session configuration file to define the properties of sessions created by using the @@ -53,8 +53,8 @@ the modules required for those tasks; and sessions where unprivileged users can only run specific commands as a privileged account. In addition to that, you can manage whether users of the session can use -Windows PowerShell language elements such as script blocks, or whether they -can only run commands. You can manage the version of Windows PowerShell users +PowerShell language elements such as script blocks, or whether they +can only run commands. You can manage the version of PowerShell users can run in the session; manage which modules are imported into the session; and manage which cmdlets, functions, and aliases session users can run. When using the RoleDefinitions field, you can give users different capabilities in @@ -91,7 +91,7 @@ Invoke-Item -Path .\Defaults.pssc ``` To create a session configuration for sessions in which user can run commands, -but not use other elements of the Windows PowerShell language, type: +but not use other elements of the PowerShell language, type: ```powershell New-PSSessionConfigurationFile -LanguageMode NoLanguage @@ -166,7 +166,7 @@ Set-PSSessionConfiguration -Name LockedDown When users use the LockedDown session configuration to create a session, they will be able to run cmdlets but they will not be able to create or use -variables, assign values, or use other Windows PowerShell language elements. +variables, assign values, or use other PowerShell language elements. The following command uses the New-PSSession cmdlet to create a session on the computer Srv01 that uses the LockedDown session configuration, saving an diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Special_Characters.md b/reference/6/Microsoft.PowerShell.Core/About/about_Special_Characters.md index 3ecaef6c95e7..7ee546fc0d52 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Special_Characters.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Special_Characters.md @@ -15,13 +15,13 @@ PowerShell interprets the next character in a command or parameter. # LONG DESCRIPTION -Windows PowerShell supports a set of special character sequences that are used +PowerShell supports a set of special character sequences that are used to represent characters that are not part of the standard character set. -The special characters in Windows PowerShell begin with the backtick +The special characters in PowerShell begin with the backtick character, also known as the grave accent (ASCII 96). -The following special characters are recognized by Windows PowerShell: +The following special characters are recognized by PowerShell: ``` | Character | Description | @@ -44,9 +44,9 @@ when used within double quoted (") strings. ## NULL (`0) -Windows PowerShell recognizes a null special character (`0) and represents it +PowerShell recognizes a null special character (`0) and represents it with a character code of 0. It appears as an empty space in the Windows -PowerShell output. This allows you to use Windows PowerShell to read and +PowerShell output. This allows you to use PowerShell to read and process text files that use null characters, such as string termination or record termination indicators. The null special character is not equivalent to the $null variable, which stores a value of NULL. @@ -148,7 +148,7 @@ Delete everything before this point. ## HORIZONTAL TAB (`t) The horizontal tab character (`t) advances to the next tab stop and continues -writing at that point. By default, the Windows PowerShell console has a tab +writing at that point. By default, the PowerShell console has a tab stop at every eighth space. For example, the following command inserts two tabs between each column. @@ -186,8 +186,8 @@ printed documents only. It does not affect screen output. ## STOP PARSING (--%) -The stop-parsing symbol (--%) prevents Windows PowerShell from interpreting -arguments in program calls as Windows PowerShell commands and expressions. +The stop-parsing symbol (--%) prevents PowerShell from interpreting +arguments in program calls as PowerShell commands and expressions. Place the stop-parsing symbol after the program name and before program arguments that might cause errors. @@ -198,7 +198,7 @@ For example, the following Icacls command uses the stop-parsing symbol. icacls X:\VMS --% /grant Dom\HVAdmin:(CI)(OI)F ``` -Windows PowerShell sends the following command to Icacls. +PowerShell sends the following command to Icacls. ```output X:\VMS /grant Dom\HVAdmin:(CI)(OI)F diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Splatting.md b/reference/6/Microsoft.PowerShell.Core/About/about_Splatting.md index 8db566e6bcd8..5d858b61f5cd 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Splatting.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Splatting.md @@ -20,10 +20,10 @@ administrator and the winner of the Advanced Division of the 2012 Scripting Games. Revised for Windows PowerShell 3.0.] Splatting is a method of passing a collection of parameter values to a command -as unit. Windows PowerShell associates each value in the collection with a +as unit. PowerShell associates each value in the collection with a command parameter. Splatted parameter values are stored in named splatting variables, which look like standard variables, but begin with an At symbol (@) -instead of a dollar sign ($). The At symbol tells Windows PowerShell that you +instead of a dollar sign ($). The At symbol tells PowerShell that you are passing a collection of values, instead of a single value. Splatting makes your commands shorter and easier to read. You can re-use the @@ -85,7 +85,7 @@ Copy-Item @HashArguments ``` Note: In the first command, the At symbol (@) indicates a hash table, not a -splatted value. The syntax for hash tables in Windows PowerShell is: +splatted value. The syntax for hash tables in PowerShell is: @{\=\; \=\; …}* ## SPLATTING WITH ARRAYS diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Split.md b/reference/6/Microsoft.PowerShell.Core/About/about_Split.md index 7bf35f1a8f9c..c8343d9d9fd4 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Split.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Split.md @@ -20,7 +20,7 @@ change the following elements of the Split operation: - Delimiter. The default is whitespace, but you can specify characters, strings, patterns, or script blocks that specify the delimiter. The Split - operator in Windows PowerShell uses a regular expression in the delimiter, + operator in PowerShell uses a regular expression in the delimiter, rather than a simple character. - Maximum number of substrings. The default is to return all substrings. If you specify a number less than the number of substrings, the remaining diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Trap.md b/reference/6/Microsoft.PowerShell.Core/About/about_Trap.md index 5c2ea269a886..60508eea4313 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Trap.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Trap.md @@ -14,8 +14,8 @@ Describes a keyword that handles a terminating error. ## LONG DESCRIPTION -A terminating error stops a statement from running. If Windows PowerShell -does not handle a terminating error in some way, Windows PowerShell also +A terminating error stops a statement from running. If PowerShell +does not handle a terminating error in some way, PowerShell also stops running the function or script in the current pipeline. In other languages, such as C\#, terminating errors are referred to as exceptions. @@ -41,8 +41,8 @@ appear anywhere in the script or command. ### TRAPPING ALL TERMINATING ERRORS When a terminating error occurs that is not handled in another way in a -script or command, Windows PowerShell checks for a Trap statement that -handles the error. If a Trap statement is present, Windows PowerShell +script or command, PowerShell checks for a Trap statement that +handles the error. If a Trap statement is present, PowerShell continues running the script or command in the Trap statement. The following example is a very simple Trap statement: @@ -105,10 +105,10 @@ trap [System.Management.Automation.CommandNotFoundException] When a function or script encounters a string that does not match a known command, this Trap statement displays the "Command error trapped" string. -After running any statements in the Trap statement list, Windows PowerShell +After running any statements in the Trap statement list, PowerShell writes the error object to the error stream and then continues the script. -Windows PowerShell uses the Microsoft .NET Framework exception types. The +PowerShell uses the Microsoft .NET Framework exception types. The following example specifies the System.Exception error type: ```powershell @@ -121,7 +121,7 @@ It also traps other error types. You can have more than one Trap statement in a script. Each error can be trapped by only one Trap statement. If an error occurs, and more than one -Trap statement is available, Windows PowerShell uses the Trap statement +Trap statement is available, PowerShell uses the Trap statement with the most specific error type that matches the error. The following script example contains an error. The script includes a @@ -148,7 +148,7 @@ At C:\PS>testScript1.ps1:3 char:19 + nonsenseString <<<< ``` -Because Windows PowerShell does not recognize "nonsenseString" as a cmdlet +Because PowerShell does not recognize "nonsenseString" as a cmdlet or other item, it returns a CommandNotFoundException error. This terminating error is trapped by the specific Trap statement. @@ -178,7 +178,7 @@ traps any terminating error. ### TRAPPING ERRORS AND SCOPE If a terminating error occurs in the same scope as the Trap statement, -after running the Trap statements, Windows PowerShell continues at the +after running the Trap statements, PowerShell continues at the statement after the error. If the Trap statement is in a different scope from the error, execution continues at the next statement that is in the same scope as the Trap statement. @@ -212,7 +212,7 @@ function1 was completed ``` The Trap statement in the function traps the error. After displaying the -message, Windows PowerShell resumes running the function. Note that +message, PowerShell resumes running the function. Note that Function1 was completed. Compare this with the following example, which has the same error and Trap @@ -244,7 +244,7 @@ At C:\PS>TestScript2.ps1:4 char:19 In this example, the "function2 was completed" command was not run. Although both terminating errors occur within a function, if the Trap -statement is outside the function, Windows PowerShell does not go back into +statement is outside the function, PowerShell does not go back into the function after the Trap statement runs. ### USING THE BREAK AND CONTINUE KEYWORDS @@ -273,9 +273,9 @@ At line:4 char:7 Because the Trap statement included the Break keyword, the function does not continue to run, and the "Function completed" line is not run. -If you include a Continue statement in a Trap statement, Windows PowerShell +If you include a Continue statement in a Trap statement, PowerShell resumes after the statement that caused the error, just as it would without -Break or Continue. With the Continue keyword, however, Windows PowerShell +Break or Continue. With the Continue keyword, however, PowerShell does not write an error to the error stream. The following sample function uses the Continue keyword in a Trap diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Try_Catch_Finally.md b/reference/6/Microsoft.PowerShell.Core/About/about_Try_Catch_Finally.md index 5cf0bf73b091..a1da79ef485c 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Try_Catch_Finally.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Try_Catch_Finally.md @@ -19,8 +19,8 @@ Use Try, Catch, and Finally blocks to respond to or handle terminating errors in scripts. The Trap statement can also be used to handle terminating errors in scripts. For more information, see about_Trap. -A terminating error stops a statement from running. If Windows PowerShell -does not handle a terminating error in some way, Windows PowerShell also +A terminating error stops a statement from running. If PowerShell +does not handle a terminating error in some way, PowerShell also stops running the function or script using the current pipeline. In other languages, such as C\#, terminating errors are referred to as exceptions. For more information about errors, see about_Errors. @@ -29,7 +29,7 @@ Use the Try block to define a section of a script in which you want Windows PowerShell to monitor for errors. When an error occurs within the Try block, the error is first saved to the $Error automatic variable. Windows PowerShell then searches for a Catch block to handle the error. If the Try -statement does not have a matching Catch block, Windows PowerShell +statement does not have a matching Catch block, PowerShell continues to search for an appropriate Catch block or Trap statement in the parent scopes. After a Catch block is completed or if no appropriate Catch block or Trap statement is found, the Finally block is run. If the error @@ -74,7 +74,7 @@ is optional. The Catch keyword is followed by an optional list of error type specifications and a statement list. If a terminating error occurs in the -Try block, Windows PowerShell searches for an appropriate Catch block. If +Try block, PowerShell searches for an appropriate Catch block. If one is found, the statements in the Catch block are executed. The Catch block can specify one or more error types. An error type is a @@ -115,7 +115,7 @@ catch { "An error occurred." } The Catch keyword must immediately follow the Try block or another Catch block. -Windows PowerShell does not recognize "NonsenseString" as a cmdlet or other +PowerShell does not recognize "NonsenseString" as a cmdlet or other item. Running this script returns the following result: ```powershell @@ -153,7 +153,7 @@ System.IO.IOException types. The second Catch block does not specify an error type. The second Catch block handles any other terminating errors that occur. -Windows PowerShell matches error types by inheritance. A Catch block +PowerShell matches error types by inheritance. A Catch block handles errors of the specified .NET Framework exception class or of any class that derives from the specified class. The following example contains a Catch block that catches a "Command Not Found" error: @@ -182,7 +182,7 @@ class. To free resources used by a script, add a Finally block after the Try and Catch blocks. The Finally block statements run regardless of whether the -Try block encounters a terminating error. Windows PowerShell runs the +Try block encounters a terminating error. PowerShell runs the Finally block before the script terminates or before the current block goes out of scope. diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Type_Operators.md b/reference/6/Microsoft.PowerShell.Core/About/about_Type_Operators.md index fe50399ae77c..41f6cab8596a 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Type_Operators.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Type_Operators.md @@ -24,7 +24,7 @@ The -as operator tries to convert the input object to the specified .NET Framework type. If it succeeds, it returns the converted object. It if fails, it returns \$null. It does not return an error. -The following table lists the type operators in Windows PowerShell. +The following table lists the type operators in PowerShell. |Operator|Description |Example | |--------|---------------------------|---------------------------------| diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Types.ps1xml.md b/reference/6/Microsoft.PowerShell.Core/About/about_Types.ps1xml.md index 5dc1d7442bc7..ec60dda55926 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Types.ps1xml.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Types.ps1xml.md @@ -11,13 +11,13 @@ title: about_Types.ps1xml # SHORT DESCRIPTION Explains how to use Types.ps1xml files to extend the types of objects -that are used in Windows PowerShell. +that are used in PowerShell. # LONG DESCRIPTION Extended type data defines additional properties and methods ("members") -of object types in Windows PowerShell. There are two techniques for adding -extended type data to a Windows PowerShell session. +of object types in PowerShell. There are two techniques for adding +extended type data to a PowerShell session. - Types.ps1xml file: An XML file that defines extended type data. - `Update-TypeData`: A cmdlet that reloads Types.ps1xml files and defines @@ -31,11 +31,11 @@ session see ## About Extended Type Data Extended type data defines additional properties and methods ("members") of -object types in Windows PowerShell. You can extend any type that is supported -by Windows PowerShell and use the added properties and methods in the same way +object types in PowerShell. You can extend any type that is supported +by PowerShell and use the added properties and methods in the same way that you use the properties that are defined on the object types. -For example, Windows PowerShell adds a `DateTime` property to all +For example, PowerShell adds a `DateTime` property to all `System.DateTime` objects, such as the ones that the `Get-Date` cmdlet returns. @@ -46,19 +46,19 @@ Sunday, January 29, 2012 9:43:57 AM You won't find the `DateTime` property in the description of the [`System.DateTime` structure](http://msdn.microsoft.com/library/system.datetime.aspx), -because Windows PowerShell adds the property and it is visible only in Windows +because PowerShell adds the property and it is visible only in Windows PowerShell. -To add the `DateTime` property to all Windows PowerShell sessions, Windows +To add the `DateTime` property to all PowerShell sessions, Windows PowerShell defines the `DateTime` property in the Types.ps1xml file in the -Windows PowerShell installation directory (`$PSHOME`). +PowerShell installation directory (`$PSHOME`). -## Adding Extended Type Data to Windows PowerShell. +## Adding Extended Type Data to PowerShell. -There are three sources of extended type data in Windows PowerShell sessions. +There are three sources of extended type data in PowerShell sessions. -- The Types.ps1xml files in the Windows PowerShell installation directory - are loaded automatically into every Windows PowerShell session. +- The Types.ps1xml files in the PowerShell installation directory + are loaded automatically into every PowerShell session. - The Types.ps1xml files that modules export are loaded when the module is imported into the current session. @@ -73,7 +73,8 @@ types. ## The TypeData Cmdlets The following TypeData cmdlets are included in the Microsoft.PowerShell.Utility -module in Windows PowerShell 3.0 and later versions of Windows PowerShell. +module in Windows PowerShell 3.0 and later versions of Windows PowerShell +and PowerShell Core. - `Get-TypeData`: Gets extended type data in the current session. - `Update-TypeData`: Reloads Types.ps1xml files. Adds extended type data to the @@ -87,9 +88,9 @@ For more information about these cmdlets, see the help topic for each cmdlet. The Types.ps1xml files in the `$PSHOME` directory are added automatically to every session. -The Types.ps1xml file in the Windows PowerShell installation directory +The Types.ps1xml file in the PowerShell installation directory (`$PSHOME`) is an XML-based text file that lets you add properties and -methods to the objects that are used in Windows PowerShell. Windows +methods to the objects that are used in PowerShell. Windows PowerShell has built-in Types.ps1xml files that add several elements to the .NET Framework types, but you can create additional Types.ps1xml files to further extend the types. @@ -136,7 +137,7 @@ Get Method System.Object Get(Int32) ``` As a result, you can use either the Count property or the Length property -of arrays in Windows PowerShell. For example: +of arrays in PowerShell. For example: ```powershell C:\PS> (1, 2, 3, 4).count @@ -150,32 +151,32 @@ C:\PS> (1, 2, 3, 4).length ## Creating New Types.ps1xml Files -The .ps1xml files that are installed with Windows PowerShell are +The .ps1xml files that are installed with PowerShell are digitally signed to prevent tampering because the formatting can include script blocks. Therefore, to add a property or method to a .NET Framework type, create your own Types.ps1xml files, and then add them to your -Windows PowerShell session. +PowerShell session. To create a new file, start by copying an existing Types.ps1xml file. The new file can have any name, but it must have a .ps1xml file name extension. 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 +to PowerShell, but it is useful to place the files in the Windows PowerShell installation directory (`$PSHOME`) or in a subdirectory of the installation directory. When you have saved the new file, use the `Update-TypeData` cmdlet to add -the new file to your Windows PowerShell session. If you want your types +the new file to your PowerShell session. If you want your types to take precedence over the types that are defined in the built-in file, use the PrependData parameter of the `Update-TypeData` cmdlet. `Update-TypeData` affects only the current session. To make the change to all future sessions, export the console, or add the `Update-TypeData` -command to your Windows PowerShell profile. +command to your PowerShell profile. ## Types.ps1xml and Add-Member The Types.ps1xml files add properties and methods to all the instances of the objects of the specified .NET Framework type in the affected -Windows PowerShell session. However, if you need to add properties or +PowerShell session. However, if you need to add properties or methods only to one instance of an object, use the `Add-Member` cmdlet. For more information, see [Add-Member](../../Microsoft.PowerShell.Utility/Add-Member.md). @@ -330,7 +331,7 @@ the name of the new method and a pair of `` tags that specify the code in which the method is defined. For example, the Mode property of directories (`System.IO.DirectoryInfo` -objects) is a code property defined in the Windows PowerShell +objects) is a code property defined in the PowerShell FileSystem provider. ```xml @@ -357,7 +358,7 @@ the name of the new property and a pair of `` tags that specify the code in which the property is defined. For example, the `Mode` property of directories (`System.IO.DirectoryInfo` -objects) is a code property defined in the Windows PowerShell +objects) is a code property defined in the PowerShell FileSystem provider. ```xml @@ -387,7 +388,7 @@ create a property (such as `` or ``) or a method (such as `` or ``) can be members of the set. In Types.ps1xml files, the `` tag is used to define the -default views of the .NET Framework objects in Windows PowerShell. In +default views of the .NET Framework objects in PowerShell. In this case, the name of the member set (the value within the `` tags) is always "PsStandardMembers", and the names of the properties (the value of the `` tag) are one of the following: @@ -560,7 +561,7 @@ library](http://go.microsoft.com/fwlink/?LinkId=144538). ## `Update-TypeData` -To load your Types.ps1xml files into a Windows PowerShell session, run +To load your Types.ps1xml files into a PowerShell session, run the `Update-TypeData` cmdlet. If you want the types in your file to take precedence over types in the built-in Types.ps1xml file, add the PrependData parameter of `Update-TypeData`. `Update-TypeData` affects only diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Updatable_Help.md b/reference/6/Microsoft.PowerShell.Core/About/about_Updatable_Help.md index f6e1d2be1d9f..8bbdc986b9b2 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Updatable_Help.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Updatable_Help.md @@ -389,7 +389,7 @@ the script. The Online parameter does not work with About topics. To see the about topics for PowerShell Core, including help topics about the PowerShell language, see -[Windows PowerShell Core Module About Topics](http://go.microsoft.com/fwlink/?LinkID=113206). +[PowerShell Core Module About Topics](http://go.microsoft.com/fwlink/?LinkID=113206). ## HOW TO MINIMIZE OR PREVENT INTERNET DOWNLOADS diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_psconsolehostreadline.md b/reference/6/Microsoft.PowerShell.Core/About/about_psconsolehostreadline.md index 73345218a067..0ee058fb180f 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_psconsolehostreadline.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_psconsolehostreadline.md @@ -15,7 +15,7 @@ prompt. ## LONG DESCRIPTION -Starting in Windows PowerShell V3, you can write a function named +Starting in Windows PowerShell 3.0, you can write a function named PSConsoleHostReadLine that overrides the default way that console input is processed. @@ -45,9 +45,9 @@ By default, PowerShell reads input from the console in what is known as keypresses, F7 menus, and other input. When you press Enter or Tab, Windows PowerShell gets the text that you have typed up to that point. There is no way for it to know that you pressed Ctrl-R, Ctrl-A, Ctrl-E, or any other keys -before pressing Enter or Tab. In Windows PowerShell version 3, the +before pressing Enter or Tab. In Windows PowerShell 3.0, the PSConsoleHostReadLine function solves this issue. When you define a function -named PSConsoleHostReadline in the Windows PowerShell console host, Windows +named PSConsoleHostReadline in the PowerShell console host, Windows PowerShell calls that function instead of the "Cooked Mode" input mechanism. ### SEE ALSO diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_simplified_syntax.md b/reference/6/Microsoft.PowerShell.Core/About/about_simplified_syntax.md index 9dded3153bf4..2c4763a05b90 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_simplified_syntax.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_simplified_syntax.md @@ -63,7 +63,7 @@ Get-Process | ForEach Description #### The Foreach statement outside a command pipeline The part of the Foreach statement enclosed in parenthesis represents a -variable and a collection to iterate. Windows PowerShell creates the variable +variable and a collection to iterate. PowerShell creates the variable `$` automatically when the Foreach loop runs. Prior to each iteration through the loop, the variable is set to a value in the collection. The block following a Foreach statement `{}` contains a set of commands @@ -87,7 +87,7 @@ string values "a", "b", "c", and "d". The first time the Foreach statement runs, it sets the $letter variable equal to the first item in $letterArray ("a"). Then, it uses the Write-Host cmdlet to display the letter a. The next time through the loop, $letter is set to "b", and so on. After the Foreach -loop displays the letter d, Windows PowerShell exits the loop. +loop displays the letter d, PowerShell exits the loop. Foreach statements can also be used together with cmdlets that return a collection of items. In the following example, the Foreach statement steps @@ -119,7 +119,7 @@ In this example, the Foreach loop uses a property of the $file variable to perform a comparison operation ($file.length -gt 100KB). The $file variable contains all the properties in the object that is returned by the Get-ChildItem cmdlet. Therefore, you can return more than just a file name. In -the next example, Windows PowerShell returns the length and the last access +the next example, PowerShell returns the length and the last access time inside the statement list: ```powershell @@ -177,7 +177,7 @@ specifier show no decimal places. #### The Foreach Statement Inside a Command Pipeline -When Foreach appears in a command pipeline, Windows PowerShell uses the +When Foreach appears in a command pipeline, PowerShell uses the foreach alias, which calls the ForEach-Object command. When you use the foreach alias in a command pipeline, you do not include the `($ in $)` syntax as you do with the Foreach statement. This is because