Skip to content

Replace Windows PowerShell with PowerShell #2776

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 143 commits into from
Aug 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
aeb7675
resolves 5817 (#2148)
KevinMarquette Mar 6, 2018
66d54d2
Bringing even with staging.
v-alje Mar 16, 2018
d743469
Bringing even with staging (#2191)
v-alje Mar 20, 2018
4ef21af
Bringing even with upstream branch
v-alje Mar 20, 2018
583dea7
Bringing even with staging.
v-alje Mar 21, 2018
848e701
Bringing even with staging.
v-alje Mar 22, 2018
d217786
Bringing even with staging.
v-alje Mar 22, 2018
589eab8
Bringing even with staging.
v-alje Mar 23, 2018
d039326
Bringing even with staging.
v-alje Mar 24, 2018
bb6ba41
Bringing even with staging.
v-alje Mar 26, 2018
f155d98
Document 6.1.0 Web Cmdlets -Resume Feature (#2220)
markekraus Mar 27, 2018
2fd1beb
Bringing even with staging.
v-alje Mar 27, 2018
eabcf2b
Document New -Form Parameter for Web Cmdlets (#2233)
markekraus Mar 28, 2018
7d04bc6
Bringing even with staging.
v-alje Mar 28, 2018
9be49f4
Update docs with the info about session configurations created by Ena…
kalgiz Mar 28, 2018
58cf6e2
Bringing even with staging.
v-alje Mar 29, 2018
8d0649b
Document PowerShell/PowerShell#6018
markekraus Mar 30, 2018
c3997b9
Merge pull request #2288 from markekraus/SkipHeaderValidationContentType
Mar 31, 2018
0755906
Resolving merge conflicts
v-alje Apr 2, 2018
10c0f67
Bringing even with staging.
v-alje Apr 5, 2018
cfa36eb
Bringing even with staging.
v-alje Apr 6, 2018
4eb81a5
update documentation to reflect that -ConfigurationName can be used w…
SteveL-MSFT Apr 9, 2018
72b311d
update doc to reflect change in telemety opt out (#2316)
SteveL-MSFT Apr 9, 2018
e97859d
Add -Not Feature to Where-Object (#2292)
SimonWahlin Apr 9, 2018
ac405fb
Bringing even with staging.
v-alje Apr 9, 2018
fb78f5d
Update docs for support of new hostname format (#2321)
SteveL-MSFT Apr 10, 2018
7d0fb6e
update doc on new -workingdirectory parameter (#2320)
SteveL-MSFT Apr 10, 2018
13f49bb
Bringing even with staging.
v-alje Apr 10, 2018
9c18b46
Fix typo. (#2326)
sethvs Apr 11, 2018
abe5faa
Bringing even with staging.
v-alje Apr 11, 2018
6d8ce68
Bringing even with staging.
v-alje Apr 16, 2018
fe185c7
Merge pull request #2334 from sethvs/SSHRemoting
Apr 16, 2018
c82883c
Bringing even with staging.
v-alje Apr 17, 2018
ac90975
Bringing even with staging.
v-alje Apr 17, 2018
622f5f5
Bringing even with staging.
v-alje Apr 20, 2018
df9df9b
clarify that disconnect only works with WSMan (#2344)
SteveL-MSFT Apr 21, 2018
681fc5c
Bringing even with staging.
v-alje Apr 24, 2018
71ba67f
Bringing even with staging.
v-alje Apr 24, 2018
3ae5176
Bringing even with staging.
v-alje Apr 25, 2018
ddf96e6
Bringing even with staging.
v-alje Apr 26, 2018
ab91262
Bringing even with staging.
v-alje Apr 27, 2018
b95f6f0
Bringing even with staging.
v-alje Apr 27, 2018
fc41b54
Bringing even with staging.
v-alje Apr 30, 2018
afac580
Bringing even with staging.
v-alje May 1, 2018
9b42246
Bringing even with staging.
v-alje May 2, 2018
5abd212
Bringing even with staging.
v-alje May 3, 2018
8884f33
Bringing even with staging.
v-alje May 4, 2018
da40eaa
Bringing even with staging.
v-alje May 4, 2018
dcdbf25
Bringing even with staging.
v-alje May 4, 2018
67691c3
Bringing even with staging.
v-alje May 8, 2018
acc5ec8
Web Cmdlets .NET Core 2.1 and PowerShell 6.1.0 Refresh (#2411)
markekraus May 8, 2018
fc9d365
Bringing even with staging.
v-alje May 8, 2018
9646918
Bringing even with staging.
v-alje May 9, 2018
b33b910
Bringing even with staging.
v-alje May 9, 2018
fb05328
Bringing even with staging.
v-alje May 10, 2018
7f6f798
Bringing even with staging.
v-alje May 10, 2018
12442b0
Bringing even with staging.
v-alje May 11, 2018
2f04c6d
Bringing even with staging.
v-alje May 12, 2018
aaa185d
Bringing even with staging.
v-alje May 14, 2018
cc4df71
Bringing even with staging.
v-alje May 14, 2018
65a61ac
Bringing even with staging.
v-alje May 15, 2018
4f2e61c
Bringing even with staging.
v-alje May 16, 2018
070f210
Update docs to reflect new -Subsystem parameter (#2339)
SteveL-MSFT May 17, 2018
4d2553e
update SSH remoting doc in regards to MFA (#2350)
SteveL-MSFT May 17, 2018
eb475eb
Bringing even with staging.
v-alje May 17, 2018
5648563
Bringing even with staging.
v-alje May 18, 2018
1c3b4f0
Bringing even with staging.
v-alje May 21, 2018
1b5e255
Bringing even with staging.
v-alje May 21, 2018
f056dca
Bringing even with staging.
v-alje May 22, 2018
efb38ef
Bringing even with staging.
v-alje May 22, 2018
7fd1067
Bringing even with staging.
v-alje May 24, 2018
b96cf7f
Bringing even with staging.
v-alje May 25, 2018
d7c1690
Bringing even with staging.
v-alje May 29, 2018
bd77a55
Bringing even with staging.
v-alje May 29, 2018
20d2149
Bringing even with staging.
v-alje May 30, 2018
afc8ec3
Bringing even with staging.
v-alje May 31, 2018
1d5eeea
Bringing even with staging.
v-alje May 31, 2018
15a02b2
Bringing even with staging.
v-alje Jun 1, 2018
a3afa49
Bringing even with staging.
v-alje Jun 4, 2018
90ced51
Bringing even with staging.
v-alje Jun 5, 2018
51a4bf8
Bringing even with staging.
v-alje Jun 5, 2018
28265e8
Bringing even with staging.
v-alje Jun 6, 2018
8e5a1fd
Bringing even with staging.
v-alje Jun 6, 2018
1b854fd
Bringing even with staging.
v-alje Jun 7, 2018
fd90c9e
Bringing even with staging.
v-alje Jun 12, 2018
90e8204
Bringing even with staging.
v-alje Jun 12, 2018
395853e
Bringing even with staging.
v-alje Jun 13, 2018
47f4051
Bringing even with staging.
v-alje Jun 14, 2018
4e02c17
Bringing even with staging.
v-alje Jun 15, 2018
32ae0e9
Bringing even with staging.
v-alje Jun 15, 2018
941cd96
add instructions to install preview for macOS
TravisEz13 Jun 15, 2018
e58d339
change wording to match other locations
TravisEz13 Jun 15, 2018
185f1cc
Bringing even with staging.
v-alje Jun 16, 2018
3a1dde9
Merge pull request #2589 from TravisEz13/add_mac_preview_install_inst…
Jun 18, 2018
eb3c7ba
Bringing even with staging.
v-alje Jun 18, 2018
11a84d7
Bringing even with staging.
v-alje Jun 19, 2018
1a931cb
Bringing even with staging.
v-alje Jun 20, 2018
9ef4c9c
Bringing even with staging.
v-alje Jun 20, 2018
af82bc1
Bringing even with staging.
v-alje Jun 21, 2018
7894428
Bringing even with staging.
v-alje Jun 21, 2018
4d7b6a9
Bringing even with staging.
v-alje Jun 22, 2018
1c55e76
Bringing even with staging.
v-alje Jun 22, 2018
410dcd3
Bringing even with staging.
v-alje Jun 25, 2018
6d0d651
Bringing even with staging.
v-alje Jun 26, 2018
741a126
Bringing even with staging.
v-alje Jun 26, 2018
c6c47d6
Bringing even with staging.
v-alje Jun 26, 2018
6048a10
Bringing even with staging.
v-alje Jun 27, 2018
0d46bae
Bringing even with staging.
v-alje Jun 27, 2018
7799a96
Bringing even with staging.
v-alje Jun 28, 2018
1b923bd
Bringing even with staging.
v-alje Jun 29, 2018
b95d99a
Bringing even with staging.
v-alje Jul 2, 2018
e2c10b3
Modification for Measure-Object help file for -AllStats switch.
kvprasoon Jul 2, 2018
ba3ddc1
Merge pull request #2645 from kvprasoon/release-ps61
Jul 3, 2018
422898d
Bringing even with staging.
v-alje Jul 4, 2018
6459489
fixing merge conflict
sdwheeler Jul 6, 2018
5d51405
Bringing even with staging.
v-alje Jul 6, 2018
405c0f9
Bringing even with staging.
v-alje Jul 7, 2018
303d60c
Bringing even with staging.
v-alje Jul 9, 2018
02caf44
update registration of MSFT repo using .deb pkg
SteveL-MSFT Jul 9, 2018
b85fbc2
Bringing even with staging.
v-alje Jul 10, 2018
11fbc0b
Bringing even with staging.
v-alje Jul 12, 2018
bb01b48
Bringing even with staging.
v-alje Jul 13, 2018
f7fe13b
Merge pull request #2676 from SteveL-MSFT/update-install
DCtheGeek Jul 16, 2018
52ea63a
Bringing even with staging.
v-alje Jul 16, 2018
b0abc5f
Bringing even with staging.
v-alje Jul 17, 2018
06ab1cc
Bringing even with staging.
v-alje Jul 18, 2018
48e6216
Bringing even with staging.
v-alje Jul 18, 2018
2c2c6dc
Bringing even with staging.
v-alje Jul 18, 2018
b969cf3
Bringing even with staging.
v-alje Jul 20, 2018
d94b7e7
Bringing even with staging.
v-alje Jul 20, 2018
00eb00c
Bringing even with staging.
v-alje Jul 21, 2018
ce7e263
fix merge conflict
Jul 25, 2018
4c5f0bc
Bringing even with staging.
v-alje Jul 26, 2018
640a51c
Bringing even with staging.
v-alje Jul 26, 2018
c9c7621
Bringing even with staging.
v-alje Jul 27, 2018
fde2a4d
Bringing even with staging.
v-alje Jul 28, 2018
f400244
fixing merge conflict
Jul 31, 2018
7948cb3
Bringing even with staging.
v-alje Aug 1, 2018
b3bde3c
fix merge conflict
Aug 2, 2018
025761f
Bringing even with staging.
v-alje Aug 2, 2018
13cbcbf
Bringing even with staging.
v-alje Aug 3, 2018
aa50d1c
Bringing even with staging.
v-alje Aug 3, 2018
9b5ca85
Replace Windows PowerShell with PowerShell
it-praktyk Aug 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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 using the WSMan transport.

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ supported versions of Windows, you must change the security descriptors of the
session configurations to allow remote access.

To enable remote access to the session configurations on the computer, use the
Enable-PSRemoting cmdlet.
Enable-PSRemoting cmdlet. This cmdlet creates two session configurations:
- with the name defined as: "PowerShell." + "current PowerShell version"
- with name "PowerShell.6", untied to any specific PowerShell version.

Also, by default, only members of the Administrators group on the computer
have Execute permission to the default session configurations, but you can
Expand Down
11 changes: 10 additions & 1 deletion reference/6/Microsoft.PowerShell.Core/About/about_pwsh.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pwsh[.exe]
[-NoProfile]
[-OutputFormat {Text | XML}]
[-WindowStyle <style>]
[-WorkingDirectory <DirectoryPath>]
[-File <FilePath> [<Args>]]
[-Command { - | <script-block> [-args <arg-array>]
| <string> [<CommandParameters>] } ]
Expand Down Expand Up @@ -107,6 +108,13 @@ Determines how output from PowerShell is formatted. Valid values are "Text"
Sets the window style for the session. Valid values are Normal, Minimized,
Maximized and Hidden.

#### -WorkingDirectory <DirectoryPath>

Sets the initial working directory when starting PowerShell. Any valid
PowerShell file path is supported.

To start PowerShell in your home directory, use: pwsh -WorkingDirectory ~

#### -Command

Executes the specified commands (and any parameters) as though they were typed
Expand Down Expand Up @@ -146,8 +154,9 @@ pwsh -Version
# Example using a script block
pwsh -Command {Get-Command -Name Get-Item}

# Example using a string
# Examples using a string
pwsh -Command "Get-Command -Name Get-Item"
pwsh -Command "& {Get-Command -Name Get-Command}"

# Example using a command as the last parameter
pwsh -Command Get-Command -Name Get-Item
Expand Down
2 changes: 2 additions & 0 deletions reference/6/Microsoft.PowerShell.Core/Disconnect-PSSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ The **Disconnect-PSSession** cmdlet disconnects a Windows PowerShell 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.

Note that this capability only works with PSSessions using the WSMan transport.

The **Disconnect-PSSession** cmdlet disconnects only open **PSSessions** that are connected to the current session.
**Disconnect-PSSession** cannot disconnect broken or closed **PSSession** objects, or interactive **PSSession** objects started by using the Enter-PSSession cmdlet, and it cannot disconnect **PSSession** objects that are connected to other sessions.

Expand Down
35 changes: 32 additions & 3 deletions reference/6/Microsoft.PowerShell.Core/Enter-PSSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ Enter-PSSession -ContainerId <String> [-ConfigurationName <String>] [-RunAsAdmin

### HostName
```
Enter-PSSession [-HostName] <string> [-Port <int>] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport] [<CommonParameters>]
Enter-PSSession [-HostName] <string> [-Port <int>] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport]
[-Subsystem <String>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -154,14 +155,14 @@ You can also use the **Exit** keyword to end the interactive session.

### Example 6: Start an interactive session using SSH
```
PS C:\> Enter-PSSession -HostName LinuxServer01 -UserName UserA
PS C:\> Enter-PSSession -HostName UserA@LinuxServer01
```

This example shows how to start an interactive session using Secure Shell (SSH). If SSH is configured on the remote computer to prompt for passwords then you will get a password prompt. Otherwise you will have to use SSH key based user authentication.

### Example 7: Start an interactive session using SSH and specify the Port and user authentication key
```
PS C:\> Enter-PSSession -HostName LinuxServer02 -UserName UserA -Port 22 -KeyFilePath c:\<path>\userAKey_rsa
PS C:\> Enter-PSSession -HostName UserA@LinuxServer02:22 -KeyFilePath c:\<path>\userAKey_rsa
```

This example shows how to start an interactive session using SSH. It uses the *Port* parameter to specify the port to use and the *KeyFilePath* parameter to specify an RSA key used to authenticate the user on the remote computer.
Expand Down Expand Up @@ -304,6 +305,9 @@ Specifies the session configuration that is used for the interactive session.
Enter a configuration name or the fully qualified resource URI for a session configuration.
If you specify only the configuration name, the following schema URI is prepended: http://schemas.microsoft.com/powershell.

When used with SSH, this specifies the subsystem to use on the target as defined in sshd_config.
The default value for SSH is the `powershell` subsystem.

The session configuration for a session is located on the remote computer.
If the specified session configuration does not exist on the remote computer, the command fails.

Expand Down Expand Up @@ -419,6 +423,10 @@ Accept wildcard characters: False
### -HostName
Specifies a computer name for a Secure Shell (SSH) based connection.
This is similar to the *ComputerName* parameter except that the connection to the remote computer is made using SSH rather than Windows WinRM.
This parameter supports specifying the user name and/or port as part of the host name parameter value using
the form `user@hostname:port`.
The user name and/or port specified as part of the host name takes precedence over the `-UserName` and `-Port` parameters, if specified.
This allows passing multiple computer names to this parameter where some have specific user names and/or ports, while others use the user name and/or port from the `-UserName` and `-Port` parameters.

This parameter was introduced in PowerShell 6.0.

Expand Down Expand Up @@ -621,6 +629,27 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Subsystem
Specifies the SSH subsystem used for the new **PSSession**.

This specifies the subsystem to use on the target as defined in sshd_config.
The subsystem starts a specific version of PowerShell with predefined parameters.
If the specified subsystem does not exist on the remote computer, the command fails.

If this parameter is not used, the default is the 'powershell' subsystem.

```yaml
Type: String
Parameter Sets: HostName
Aliases:

Required: False
Position: Named
Default value: powershell
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -UserName
Specifies the user name for the account used to create a session on the remote computer. User authentication method will depend on how Secure Shell (SSH) is configured on the remote computer.

Expand Down
43 changes: 36 additions & 7 deletions reference/6/Microsoft.PowerShell.Core/Invoke-Command.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ Invoke-Command [-ConfigurationName <String>] [-ThrottleLimit <Int32>] [-AsJob] [

### HostName
```
Invoke-Command -ScriptBlock <scriptblock> -HostName <string[]> [-Port <int>] [-AsJob]
[-HideComputerName] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport] [-RemoteDebug]
[-InputObject <psobject>] [-ArgumentList <Object[]>] [<CommonParameters>]
Invoke-Command [-Subsystem <String>] -ScriptBlock <scriptblock> -HostName <string[]> [-Port <int>]
[-AsJob] [-HideComputerName] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport] [-RemoteDebug]
[-InputObject <psobject>] [-ArgumentList <Object[]>] [<CommonParameters>]
```

### FilePathHostName
Expand Down Expand Up @@ -491,21 +491,21 @@ To get the results of commands and scripts that run in disconnected sessions, us

### Example 17: Run a command on a remote computer using SSH
```
PS C:\> Invoke-Command -HostName LinuxServer01 -UserName UserA -ScriptBlock { Get-MailBox * }
PS C:\> Invoke-Command -HostName UserA@LinuxServer01 -ScriptBlock { Get-MailBox * }
```

This example shows how to run a command on a remote computer using Secure Shell (SSH). If SSH is configured on the remote computer to prompt for passwords then you will get a password prompt. Otherwise you will have to use SSH key based user authentication.

### Example 18: Run a command on a remote computer using SSH and specify a user authentication key
```
PS C:\> Invoke-Command -HostName LinuxServer01 -UserName UserA -ScriptBlock { Get-MailBox * } -KeyFilePath c:\<path>\userAKey_rsa
PS C:\> Invoke-Command -HostName UserA@LinuxServer01 -ScriptBlock { Get-MailBox * } -KeyFilePath c:\<path>\userAKey_rsa
```

This example shows how to run a command on a remote computer using SSH and specifying a key file for user authentication. You will not get a password prompt unless the key authentication fails and the remote computer is configured to allow basic password authentication.

### Example 19: Run a script file on multiple remote computers using SSH as a job
```
PS C:\> $sshConnections = @{ HostName="WinServer1"; UserName="domain\userA"; KeyFilePath="c:\users\UserA\id_rsa" }, @{ HostName="LinuxServer5"; UserName="UserB"; KeyFilePath="c:\UserB\<path>\id_rsa }
PS C:\> $sshConnections = @{ HostName="WinServer1"; UserName="domain\userA"; KeyFilePath="c:\users\UserA\id_rsa" }, @{ HostName="UserB@LinuxServer5"; KeyFilePath="c:\UserB\<path>\id_rsa }
PS C:\> $results = Invoke-Command -FilePath c:\Scripts\CollectEvents.ps1 -SSHConnection $sshConnections
```

Expand Down Expand Up @@ -703,6 +703,9 @@ Specifies the session configuration that is used for the new **PSSession**.
Enter a configuration name or the fully qualified resource URI for a session configuration.
If you specify only the configuration name, the following schema URI is prepended: http://schemas.microsoft.com/PowerShell.

When used with SSH, this specifies the subsystem to use on the target as defined in sshd_config.
The default value for SSH is the `powershell` subsystem.

The session configuration for a session is located on the remote computer.
If the specified session configuration does not exist on the remote computer, the command fails.

Expand Down Expand Up @@ -1168,6 +1171,10 @@ Accept wildcard characters: False

### -HostName
Specifies an array of computer names for a Secure Shell (SSH) based connection. This is similar to the ComputerName parameter except that the connection to the remote computer is made using SSH rather than Windows WinRM.
This parameter supports specifying the user name and/or port as part of the host name parameter value using
the form `user@hostname:port`.
The user name and/or port specified as part of the host name takes precedence over the `-UserName` and `-Port` parameters, if specified.
This allows passing multiple computer names to this parameter where some have specific user names and/or ports, while others use the user name and/or port from the `-UserName` and `-Port` parameters.

This parameter was introduced in PowerShell 6.0.

Expand Down Expand Up @@ -1221,6 +1228,27 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Subsystem
Specifies the SSH subsystem used for the new **PSSession**.

This specifies the subsystem to use on the target as defined in sshd_config.
The subsystem starts a specific version of PowerShell with predefined parameters.
If the specified subsystem does not exist on the remote computer, the command fails.

If this parameter is not used, the default is the 'powershell' subsystem.

```yaml
Type: String
Parameter Sets: HostName
Aliases:

Required: False
Position: Named
Default value: powershell
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -UserName
Specifies the user name for the account used to run a command on the remote computer. User authentication method will depend on how Secure Shell (SSH) is configured on the remote computer.

Expand All @@ -1245,9 +1273,10 @@ Accept wildcard characters: False
```

### -SSHConnection
This parameter takes an array of hashtables where each hashtable contains one or more connection parameters needed to establish a Secure Shell (SSH) connection (HostName, Port, UserName, KeyFilePath).
This parameter takes an array of hashtables where each hashtable contains one or more connection parameters needed to establish a Secure Shell (SSH) connection (HostName, Port, UserName, KeyFilePath, Subsystem).

The hashtable connection parameters are the same as defined for the HostName parameter set.
Note that the order of the keys in the hashtable result in user name and port being used for the connection where the last one specified is used. For example, if you use `@{UserName="first";HostName="second@host"}`, then the user name `second` will be used. However, if you use `@{HostName="second@host:22";Port=23}`, then port 23 will be used.

The SSHConnection parameter is useful for creating multiple sessions where each session requires different connection information.

Expand Down
9 changes: 6 additions & 3 deletions reference/6/Microsoft.PowerShell.Core/New-PSSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,21 +215,21 @@ The value of the SessionOption parameter is the **SessionOption** object in the

### Example 12: Create a session using SSH
```
PS C:\> New-PSSession -HostName LinuxServer01 -UserName UserA
PS C:\> New-PSSession -HostName UserA@LinuxServer01
```

This example shows how to create a new **PSSession** using Secure Shell (SSH). If SSH is configured on the remote computer to prompt for passwords then you will get a password prompt. Otherwise you will have to use SSH key based user authentication.

### Example 13: Create a session using SSH and specify the port and user authentication key
```
PS C:\> New-PSSession -HostName LinuxServer01 -UserName UserA -Port 22 -KeyFilePath c:\<path>\userAKey_rsa
PS C:\> New-PSSession -HostName UserA@LinuxServer01:22 -KeyFilePath c:\<path>\userAKey_rsa
```

This example shows how to create a **PSSession** using Secure Shell (SSH). It uses the *Port* parameter to specify the port to use and the *KeyFilePath* parameter to specify an RSA key used to identify and authenticate the user on the remote computer.

### Example 14: Create multiple sessions using SSH
```
PS C:\> $sshConnections = @{ HostName="WinServer1"; UserName="domain\userA"; KeyFilePath="c:\users\UserA\id_rsa" }, @{ HostName="LinuxServer5"; UserName="UserB"; KeyFilePath="c:\UserB\<path>\id_rsa }
PS C:\> $sshConnections = @{ HostName="WinServer1"; UserName="domain\userA"; KeyFilePath="c:\users\UserA\id_rsa" }, @{ HostName="UserB@LinuxServer5"; KeyFilePath="c:\UserB\<path>\id_rsa }
PS C:\> New-PSSession -SSHConnection $sshConnections
```

Expand Down Expand Up @@ -372,6 +372,9 @@ Specifies the session configuration that is used for the new **PSSession**.
Enter a configuration name or the fully qualified resource URI for a session configuration.
If you specify only the configuration name, the following schema URI is prepended: http://schemas.microsoft.com/PowerShell.

When used with SSH, this specifies the subsystem to use on the target as defined in sshd_config.
The default value for SSH is the `powershell` subsystem.

The session configuration for a session is located on the remote computer.
If the specified session configuration does not exist on the remote computer, the command fails.

Expand Down
2 changes: 1 addition & 1 deletion reference/6/Microsoft.PowerShell.Core/Save-Help.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Do not specify a file name or file name extension.
```yaml
Type: String[]
Parameter Sets: Path
Aliases:
Aliases: Path

Required: True
Position: 0
Expand Down
2 changes: 1 addition & 1 deletion reference/6/Microsoft.PowerShell.Core/Update-Help.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ For more information, see about_Group_Policy_Settings (http://go.microsoft.com/f
```yaml
Type: String[]
Parameter Sets: Path
Aliases:
Aliases: Path

Required: False
Position: 1
Expand Down
24 changes: 24 additions & 0 deletions reference/6/Microsoft.PowerShell.Core/Where-Object.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Selects objects from a collection based on their property values.
Where-Object [-InputObject <PSObject>] [-Property] <String> [[-Value] <Object>] [-EQ] [<CommonParameters>]
```

### NotSet
```
Where-Object [-Property] <string> -Not [-InputObject <psobject>] [<CommonParameters>]
```

### ScriptBlockSet

```
Expand Down Expand Up @@ -924,6 +929,25 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Not
Indicates that this cmdlet gets objects if the property does not exist or has a value of null or false.

For example: `Get-Service | where -Not "DependentServices"`

This parameter was introduced in Windows PowerShell 6.1.

```yaml
Type: SwitchParameter
Parameter Sets: Not
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -NotContains

Indicates that this cmdlet gets objects if none of the items in the property value is an exact match for the specified value.
Expand Down
2 changes: 1 addition & 1 deletion reference/6/Microsoft.PowerShell.Management/New-Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This parameter is required.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Aliases: Path

Required: True
Position: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ If you specify only a file name, use the *WorkingDirectory* parameter to specify
```yaml
Type: String
Parameter Sets: (All)
Aliases: PSPath
Aliases: PSPath, Path

Required: True
Position: 1
Expand Down
Loading