Skip to content

Commit

Permalink
Replace Windows PowerShell with PowerShell (MicrosoftDocs#2814)
Browse files Browse the repository at this point in the history
  • Loading branch information
it-praktyk authored and Sean Wheeler committed Aug 13, 2018
1 parent d681723 commit 3367dc0
Show file tree
Hide file tree
Showing 51 changed files with 316 additions and 316 deletions.
8 changes: 4 additions & 4 deletions reference/6/Microsoft.PowerShell.Core/Add-History.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PS C:\> Get-History | Export-Csv c:\testing\history.csv
PS C:\> Import-Csv history.csv | Add-History
```

These commands add the commands typed in one Windows PowerShell session to the history of a different Windows PowerShell session.
These commands add the commands typed in one PowerShell session to the history of a different PowerShell session.

The first command gets objects representing the commands in the history and exports them to the History.csv file.

Expand Down Expand Up @@ -63,7 +63,7 @@ PS C:\> Get-History -Id 5 -Count 5 | Add-History
This command adds the first five commands in the history to the end of the history list.
It uses the Get-History cmdlet to get the five commands ending in command 5.
The pipeline operator passes them to the **Add-History** cmdlet, which appends them to the current history.
The **Add-History** command does not include any parameters, but Windows PowerShell associates the objects passed through the pipeline with the *InputObject* parameter of **Add-History**.
The **Add-History** command does not include any parameters, but PowerShell associates the objects passed through the pipeline with the *InputObject* parameter of **Add-History**.

### Example 4: Add commands in a .csv file to the current history
```
Expand All @@ -86,7 +86,7 @@ PS C:\> Add-History -InputObject (Import-Clixml c:\temp\history01.xml)

This command adds the commands in the History01.xml file to the current session history.
It uses the *InputObject* parameter to pass the results of the command in parentheses to the **Add-History** cmdlet.
The command in parentheses, which is executed first, imports the History01.xml file into Windows PowerShell.
The command in parentheses, which is executed first, imports the History01.xml file into PowerShell.
The **Add-History** cmdlet then adds the commands in the file to the session history.

## PARAMETERS
Expand Down Expand Up @@ -138,7 +138,7 @@ This cmdlet returns a **HistoryInfo** object if you specify the *PassThru* param
Otherwise, this cmdlet does not generate any output.
## NOTES
* The session history is a list of the commands entered during the session together with the ID. The session history represents the order of execution, the status, and the start and end times of the command. As you enter each command, Windows PowerShell adds it to the history so that you can reuse it. For more information about the session history, see about_History.
* The session history is a list of the commands entered during the session together with the ID. The session history represents the order of execution, the status, and the start and end times of the command. As you enter each command, PowerShell adds it to the history so that you can reuse it. For more information about the session history, see about_History.
To specify the commands to add to the history, use the *InputObject* parameter.
The **Add-History** command accepts only **HistoryInfo** objects, such as those returned for each command by the **Get-History** cmdlet.
Expand Down
18 changes: 9 additions & 9 deletions reference/6/Microsoft.PowerShell.Core/Connect-PSSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Connect-PSSession [-ThrottleLimit <Int32>] [-Id] <Int32[]> [-WhatIf] [-Confirm]
```

## DESCRIPTION
The **Connect-PSSession** cmdlet reconnects to user-managed Windows PowerShell sessions (**PSSessions**) that were disconnected.
The **Connect-PSSession** cmdlet reconnects to user-managed PowerShell sessions (**PSSessions**) that were disconnected.
It works on sessions that are disconnected intentionally, such as by using the Disconnect-PSSession cmdlet or the *InDisconnectedSession* parameter of the Invoke-Command cmdlet, and those that were disconnected unintentionally, such as by a temporary network outage.

**Connect-PSSession** can connect to any disconnected session that was started by the same user.
Expand Down Expand Up @@ -153,7 +153,7 @@ Id Name ComputerName State ConfigurationName Availabil
-- ---- ------------ ----- ----------------- ------------
1 ITTask Server01 Disconnected ITTasks None
Later that evening, the administrator starts her home computer, logs on to the corporate network, and starts Windows PowerShell. The fourth command uses the Get-PSSession cmdlet to get the sessions on the Server01 computer. The command finds the ITTask session.The fifth command uses the **Connect-PSSession** cmdlet to connect to the ITTask session. The command saves the session in the $s variable.
Later that evening, the administrator starts her home computer, logs on to the corporate network, and starts PowerShell. The fourth command uses the Get-PSSession cmdlet to get the sessions on the Server01 computer. The command finds the ITTask session.The fifth command uses the **Connect-PSSession** cmdlet to connect to the ITTask session. The command saves the session in the $s variable.
PS C:\> Get-PSSession -ComputerName Server01 -Name ITTask
Id Name ComputerName State ConfigurationName Availability
Expand Down Expand Up @@ -181,7 +181,7 @@ PS C:\> Invoke-Command -Session $s {$BackupSpecs = Receive-Job -JobName Job2}
PS C:\> Invoke-Command -Session $s {\\Server30\Scripts\New-SQLDatabase.ps1 -InitData $BackupSpecs.Initialization}
The ninth command disconnects from the session in the $s variable.The administrator closes Windows PowerShell and closes the computer. She can reconnect to the session on the next day and check the script status from her work computer.
The ninth command disconnects from the session in the $s variable.The administrator closes PowerShell and closes the computer. She can reconnect to the session on the next day and check the script status from her work computer.
PS C:\> Disconnect-PSSession -Session $s -OutputBufferingMode Drop -IdleTimeoutSec 60*60*15
Id Name ComputerName State ConfigurationName Availability
-- ---- ------------ ----- ----------------- ------------
Expand All @@ -199,7 +199,7 @@ Later that evening, the administrator logs on to her home computer and verifies
Indicates that this cmdlet allows redirection of this connection to an alternate URI.

When you use the *ConnectionURI* parameter, the remote destination can return an instruction to redirect to a different URI.
By default, Windows PowerShell does not redirect connections, but you can use this parameter to allow it to redirect the connection.
By default, PowerShell does not redirect connections, but you can use this parameter to allow it to redirect the connection.

You can also limit the number of times the connection is redirected by changing the **MaximumConnectionRedirectionCount** session option value.
Use the *MaximumRedirection* parameter of the New-PSSessionOption cmdlet or set the **MaximumConnectionRedirectionCount** property of the **$PSSessionOption** preference variable.
Expand Down Expand Up @@ -281,7 +281,7 @@ Certificates are used in client certificate-based authentication.
They can be mapped only to local user accounts.
They do not work with domain accounts.

To get a certificate thumbprint, use a Get-Item or Get-ChildItem command in the Windows PowerShell Cert: drive.
To get a certificate thumbprint, use a Get-Item or Get-ChildItem command in the PowerShell Cert: drive.

```yaml
Type: String
Expand Down Expand Up @@ -371,9 +371,9 @@ If you do not specify a connection URI, you can use the *UseSSL* and *Port* para

Valid values for the **Transport** segment of the URI are HTTP and HTTPS.
If you specify a connection URI with a Transport segment, but do not specify a port, the session is created with standards ports: 80 for HTTP and 443 for HTTPS.
To use the default ports for Windows PowerShell remoting, specify port 5985 for HTTP or 5986 for HTTPS.
To use the default ports for PowerShell remoting, specify port 5985 for HTTP or 5986 for HTTPS.

If the destination computer redirects the connection to a different URI, Windows PowerShell prevents the redirection unless you use the *AllowRedirection* parameter in the command.
If the destination computer redirects the connection to a different URI, PowerShell prevents the redirection unless you use the *AllowRedirection* parameter in the command.

```yaml
Type: Uri[]
Expand Down Expand Up @@ -477,7 +477,7 @@ To connect to a remote computer, the remote computer must be listening on the po
The default ports are 5985, which is the WinRM port for HTTP, and 5986, which is the WinRM port for HTTPS.

Before using an alternate port, you must configure the WinRM listener on the remote computer to listen at that port.
To configure the listener, type the following two commands at the Windows PowerShell prompt:
To configure the listener, type the following two commands at the PowerShell prompt:

`Remove-Item -Path WSMan:\Localhost\listener\listener* -Recurse`

Expand Down Expand Up @@ -563,7 +563,7 @@ Accept wildcard characters: False
Indicates that this cmdlet uses the Secure Sockets Layer (SSL) protocol to connect to the disconnected session.
By default, SSL is not used.

WS-Management encrypts all Windows PowerShell content transmitted over the network.
WS-Management encrypts all PowerShell content transmitted over the network.
The *UseSSL* parameter is an additional protection that sends the data across an HTTPS connection instead of an HTTP connection.

If you use this parameter, but SSL is not available on the port that is used for the command, the command fails.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ You can pipe a session configuration object or a string that contains the name o
This cmdlet does not return any objects.
## NOTES
* To run this cmdlet on Windows Vista, Windows Server 2008, and later versions of the Windows operating system, you must start Windows PowerShell by using the Run as administrator option.
* To run this cmdlet on Windows Vista, Windows Server 2008, and later versions of the Windows operating system, you must start PowerShell by using the Run as administrator option.
*
Expand Down
6 changes: 3 additions & 3 deletions reference/6/Microsoft.PowerShell.Core/Disconnect-PSSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Disconnect-PSSession [-IdleTimeoutSec <Int32>] [-OutputBufferingMode <OutputBuff
```

## DESCRIPTION
The **Disconnect-PSSession** cmdlet disconnects a Windows PowerShell session (**PSSession**), such as one started by using the New-PSSession cmdlet, from the current session.
The **Disconnect-PSSession** cmdlet disconnects a PowerShell session (**PSSession**), such as one started by using the New-PSSession cmdlet, from the current session.
As a result, the **PSSession** is in a disconnected state.
You can connect to the disconnected **PSSession** from the current session or from another session on the local computer or a different computer.

Expand Down Expand Up @@ -115,7 +115,7 @@ Id Name ComputerName State ConfigurationName Availabil
2 ITTask Srv2 Opened Microsoft.PowerShell Available
3 ITTask Srv30 Opened Microsoft.PowerShell Available
The manager logs on to his home computer, connects to his corporate network, starts Windows PowerShell, and uses the Get-PSSession cmdlet to get the ITTask session on the Srv1 computer. He uses the credentials of the technician to access the session.
The manager logs on to his home computer, connects to his corporate network, starts PowerShell, and uses the Get-PSSession cmdlet to get the ITTask session on the Srv1 computer. He uses the credentials of the technician to access the session.
PS C:\> Get-PSSession -ComputerName Srv1 -Name ITTask -Credential Domain01\User01
Id Name ComputerName State ConfigurationName Availability
-- ---- ------------ ----- ----------------- ------------
Expand Down Expand Up @@ -447,7 +447,7 @@ You can pipe a session to this cmdlet.
This cmdlet returns an object that represents the session that it disconnected.
## NOTES
* The **Disconnect-PSSession** cmdlet works only when the local and remote computers are running Windows PowerShell 3.0 or later versions of Windows PowerShell.
* The **Disconnect-PSSession** cmdlet works only when the local and remote computers are running Windows PowerShell 3.0 or later versions of Windows PowerShell or PowerShell Core.
* If you use **Disconnect-PSSession** on a disconnected session, the command does not affect the session and it does not generate errors.
* Disconnected loopback sessions with interactive security tokens, which are created by using the *EnableNetworkAccess* parameter, can be reconnected only from the computer on which the session was created. This restriction protects the computer from malicious access.
* When you disconnect a **PSSession**, the session state is **Disconnected** and the availability is **None**.
Expand Down
14 changes: 7 additions & 7 deletions reference/6/Microsoft.PowerShell.Core/Enter-PSHostProcess.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ Enter-PSHostProcess [-HostProcessInfo] <PSHostProcessInfo> [[-AppDomainName] <St
## DESCRIPTION
The **Enter-PSHostProcess** cmdlet connects to and enters into an interactive session with a local process.

Instead of creating a new process to host Windows PowerShell and run a remote session, the remote, interactive session is run in an existing process that is already running Windows PowerShell.
Instead of creating a new process to host PowerShell and run a remote session, the remote, interactive session is run in an existing process that is already running PowerShell.
When you are interacting with a remote session on a specified process, you can enumerate running runspaces, and then select a runspace to debug by running either Debug-Runspace or Enable-RunspaceDebug.

The process that you want to enter must be hosting Windows PowerShell (System.Management.Automation.dll).
The process that you want to enter must be hosting PowerShell (System.Management.Automation.dll).
You must be either a member of the Administrators group on the computer on which the process is found, or you must be the user who is running the script that started the process.

After you have selected a runspace to debug, a remote debug session is opened for the runspace if it is either currently running a command or is stopped in the debugger.
Expand All @@ -50,9 +50,9 @@ You can then debug the runspace script in the same way you would debug other rem
Detach from a debugging session, and then the interactive session with the process, by running exit twice, or stop script execution by running the existing debugger quit command.

If you specify a process by using the *Name* parameter, and there is only one process found with the specified name, the process is entered.
If more than one process with the specified name is found, Windows PowerShell returns an error, and lists all processes found with the specified name.
If more than one process with the specified name is found, PowerShell returns an error, and lists all processes found with the specified name.

To support attaching to processes on remote computers, the **Enter-PSHostProcess** cmdlet is enabled in a specified remote computer, so that you can attach to a local process within a remote Windows PowerShell session.
To support attaching to processes on remote computers, the **Enter-PSHostProcess** cmdlet is enabled in a specified remote computer, so that you can attach to a local process within a remote PowerShell session.

## EXAMPLES

Expand Down Expand Up @@ -191,10 +191,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
## NOTES
* **Enter-PSHostProcess** cannot enter the process of the Windows PowerShell session in which you are running the command. You can, however, enter the process of another Windows PowerShell session, or a Windows PowerShell ISE session that is running at the same time as the session in which you are running **Enter-PSHostProcess**.
* **Enter-PSHostProcess** cannot enter the process of the PowerShell session in which you are running the command. You can, however, enter the process of another PowerShell session, or a Windows PowerShell ISE session that is running at the same time as the session in which you are running **Enter-PSHostProcess**.
**Enter-PSHostProcess** can enter only those processes that are hosting Windows PowerShell.
That is, they have loaded the Windows PowerShell engine.
**Enter-PSHostProcess** can enter only those processes that are hosting PowerShell.
That is, they have loaded the PowerShell engine.
To exit a process from within the process, type exit, and then press Enter.
Expand Down
Loading

0 comments on commit 3367dc0

Please sign in to comment.