2
2
external help file : System.Management.Automation.dll-Help.xml
3
3
Locale : en-US
4
4
Module Name : Microsoft.PowerShell.Core
5
- ms.date : 05/15/2019
5
+ ms.date : 08/16/2022
6
6
online version : https://docs.microsoft.com/powershell/module/microsoft.powershell.core/enter-pssession?view=powershell-5.1&WT.mc_id=ps-gethelp
7
7
schema : 2.0.0
8
8
title : Enter-PSSession
@@ -108,8 +108,10 @@ session as text.
108
108
109
109
The first command uses the ` Enter-PSSession ` cmdlet to start an interactive session with Server01, a
110
110
remote computer. When the session starts, the command prompt changes to include the computer name.
111
- The second command gets the Windows PowerShell process and redirects the output to the Process.txt
112
- file. The command is submitted to the remote computer, and the file is saved on the remote computer.
111
+
112
+ The second command gets the PowerShell process and redirects the output to the Process.txt file. The
113
+ command is submitted to the remote computer, and the file is saved on the remote computer.
114
+
113
115
The third command uses the ** Exit** keyword to end the interactive session and close the connection.
114
116
The fourth command confirms that the Process.txt file is on the remote computer. A ` Get-ChildItem `
115
117
("dir") command on the local computer cannot find the file.
@@ -137,7 +139,7 @@ PS C:\> Enter-PSSession -Session $s
137
139
```
138
140
139
141
These commands use the ** Session** parameter of ` Enter-PSSession ` to run the interactive session in
140
- an existing Windows PowerShell session (** PSSession** ).
142
+ an existing PowerShell session (** PSSession** ).
141
143
142
144
### Example 4: Start an interactive session and specify the Port and Credential parameters
143
145
@@ -172,8 +174,8 @@ Allows redirection of this connection to an alternate Uniform Resource Identifie
172
174
redirection is not allowed.
173
175
174
176
When you use the ** ConnectionURI** parameter, the remote destination can return an instruction to
175
- redirect to a different URI. By default, Windows PowerShell does not redirect connections, but you
176
- can use this parameter to allow it to redirect the connection.
177
+ redirect to a different URI. By default, PowerShell does not redirect connections, but you can use
178
+ this parameter to allow it to redirect the connection.
177
179
178
180
You can also limit the number of times the connection is redirected by changing the
179
181
** MaximumConnectionRedirectionCount** session option value. Use the ** MaximumRedirection** parameter
@@ -187,7 +189,7 @@ Aliases:
187
189
188
190
Required : False
189
191
Position : Named
190
- Default value : None
192
+ Default value : False
191
193
Accept pipeline input : False
192
194
Accept wildcard characters : False
193
195
` ` `
@@ -239,11 +241,12 @@ of the Windows operating system.
239
241
For more information about the values of this parameter, see
240
242
[AuthenticationMechanism Enum](/dotnet/api/system.management.automation.runspaces.authenticationmechanism).
241
243
242
- Caution : Credential Security Support Provider (CredSSP) authentication, in which the user's
243
- credentials are passed to a remote computer to be authenticated, is designed for commands that
244
- require authentication on more than one resource, such as accessing a remote network share. This
245
- mechanism increases the security risk of the remote operation. If the remote computer is
246
- compromised, the credentials that are passed to it can be used to control the network session.
244
+ > [!CAUTION]
245
+ > Credential Security Support Provider (CredSSP) authentication, in which the user's credentials are
246
+ > passed to a remote computer to be authenticated, is designed for commands that require
247
+ > authentication on more than one resource, such as accessing a remote network share. This mechanism
248
+ > increases the security risk of the remote operation. If the remote computer is compromised, the
249
+ > credentials that are passed to it can be used to control the network session.
247
250
248
251
` ` ` yaml
249
252
Type: System.Management.Automation.Runspaces.AuthenticationMechanism
@@ -266,8 +269,7 @@ this action. Enter the certificate thumbprint of the certificate.
266
269
Certificates are used in client certificate-based authentication. They can be mapped only to local
267
270
user accounts; they do not work with domain accounts.
268
271
269
- To get a certificate, use the `Get-Item` or `Get-ChildItem` command in the Windows PowerShell Cert :
270
- drive.
272
+ To get a certificate, use the `Get-Item` or `Get-ChildItem` command in the PowerShell Cert : drive.
271
273
272
274
` ` ` yaml
273
275
Type: System.String
@@ -296,9 +298,9 @@ computer. For instructions for adding a computer name to the TrustedHosts list,
296
298
Computer to the Trusted Host List" in
297
299
[about_Remote_Troubleshooting](About/about_Remote_Troubleshooting.md).
298
300
299
- Note : In Windows Vista and later versions of the Windows operating system, to include the local
300
- computer in the value of the **ComputerName** parameter, you must start Windows PowerShell with the
301
- Run as administrator option.
301
+ > [!NOTE]
302
+ > On the Windows operating system, to include the local computer in the value of the
303
+ > **ComputerName** parameter, you must start PowerShell with the Run as administrator option.
302
304
303
305
` ` ` yaml
304
306
Type: System.String
@@ -355,11 +357,11 @@ and **ApplicationName** parameters to specify the **ConnectionURI** values.
355
357
356
358
Valid values for the Transport segment of the URI are HTTP and HTTPS. If you specify a connection
357
359
URI with a Transport segment, but do not specify a port, the session is created by using standards
358
- ports : 80 for HTTP and 443 for HTTPS. To use the default ports for Windows PowerShell remoting,
359
- specify port 5985 for HTTP or 5986 for HTTPS.
360
+ ports : 80 for HTTP and 443 for HTTPS. To use the default ports for PowerShell remoting, specify port
361
+ 5985 for HTTP or 5986 for HTTPS.
360
362
361
- If the destination computer redirects the connection to a different URI, Windows PowerShell prevents
362
- the redirection unless you use the **AllowRedirection** parameter in the command.
363
+ If the destination computer redirects the connection to a different URI, PowerShell prevents the
364
+ redirection unless you use the **AllowRedirection** parameter in the command.
363
365
364
366
` ` ` yaml
365
367
Type: System.Uri
@@ -556,7 +558,7 @@ Aliases:
556
558
557
559
Required: False
558
560
Position: Named
559
- Default value: None
561
+ Default value: False
560
562
Accept pipeline input: False
561
563
Accept wildcard characters: False
562
564
` ` `
@@ -637,7 +639,7 @@ Aliases:
637
639
638
640
Required: False
639
641
Position: Named
640
- Default value: None
642
+ Default value: False
641
643
Accept pipeline input: False
642
644
Accept wildcard characters: False
643
645
` ` `
0 commit comments