Updates from: 02/09/2021 04:25:35
Service Microsoft Docs article Related commit history on GitHub Change details
Microsoft.PowerShell.Core https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Core/Exit-PSSession?view=powershell-5.1 https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Exit-PSSession.md
@@ -3,7 +3,7 @@ external help file: System.Management.Automation.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Core Previously updated : 06/09/2017 Last updated : 02/08/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/exit-pssession?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Exit-PSSession
@@ -11,7 +11,7 @@ Title: Exit-PSSession
# Exit-PSSession
-## SYNOPSIS
+## Synopsis
Ends an interactive session with a remote computer. ## SYNTAX
@@ -20,18 +20,20 @@ Ends an interactive session with a remote computer.
Exit-PSSession [<CommonParameters>] ```
-## DESCRIPTION
-The **Exit-PSSession** cmdlet ends interactive sessions that you started by using the Enter-PSSession cmdlet.
+## Description
-You can also use the **Exit** keyword to end an interactive session.
-The effect is the same as using **Exit-PSSession**.
+The `Exit-PSSession` cmdlet ends interactive sessions that you started by using the
+`Enter-PSSession` cmdlet.
-## EXAMPLES
+You can also use the `exit` keyword to end an interactive session. The effect is the same as using
+`Exit-PSSession`.
+
+## Examples
### Example 1: Start and stop an interactive session
-```
-PS C:\> Enter-PSSession -computername Server01
+```powershell
+PS C:\> Enter-PSSession -ComputerName Server01
Server01\PS> Exit-PSSession PS C:\> ```
@@ -40,7 +42,7 @@ These commands start and then stop an interactive session with the Server01 remo
### Example 2: Start and stop an interactive session by using a PSSession object
-```
+```powershell
PS C:\> $s = New-PSSession -ComputerName Server01 PS C:\> Enter-PSSession -Session $s Server01\PS> Exit-PSSession
@@ -50,51 +52,56 @@ Id Name ComputerName State ConfigurationName
1 Session1 Server01 Opened Microsoft.PowerShell ```
-These commands start and stop an interactive session with the Server01 computer that uses a Windows PowerShell session (**PSSession**).
+These commands start and stop an interactive session with the Server01 computer that uses a Windows
+PowerShell session (**PSSession**).
-Because the interactive session was started by using a Windows PowerShell session, the **PSSession** is still available when the interactive session ends.
-If you use the *ComputerName* parameter, **Enter-PSSession** creates a temporary session that it closes when the interactive session ends.
+Because the interactive session was started by using a Windows PowerShell session, the **PSSession**
+is still available when the interactive session ends. If you use the _ComputerName_ parameter,
+`Enter-PSSession` creates a temporary session that it closes when the interactive session ends.
-The first command uses the New-PSSession cmdlet to create a **PSSession** on the Server01 computer.
-The command saves the **PSSession** in the $s variable.
+The first command uses the `New-PSSession` cmdlet to create a **PSSession** on the Server01
+computer. The command saves the **PSSession** in the `$s` variable.
-The second command uses **Enter-PSSession** to start an interactive session using the **PSSession** in $s.
+The second command uses `Enter-PSSession` to start an interactive session using the **PSSession** in
+`$s`.
-The third command uses **Exit-PSSession** to stop the interactive session.
+The third command uses `Exit-PSSession` to stop the interactive session.
-The final command displays the **PSSession** in the $s variable.
-The **State** property shows the **PSSession** is still open and available for use.
+The final command displays the **PSSession** in the `$s` variable. The **State** property shows the
+**PSSession** is still open and available for use.
### Example 3: Use the Exit keyword to stop a session
-```
-PS C:\> Enter-PSSession -computername Server01
+```powershell
+PS C:\> Enter-PSSession -ComputerName Server01
Server01\PS> exit PS C:\> ```
-This example uses the **Exit** keyword to stop an interactive session started by using **Enter-PSSession**.
-The **Exit** keyword has the same effect as using **Exit-PSSession**.
+This example uses the `exit` keyword to stop an interactive session started by using
+`Enter-PSSession`. The `exit` keyword has the same effect as using `Exit-PSSession`.
-## PARAMETERS
+## Parameters
### CommonParameters+ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### None+ You cannot pipe objects to this cmdlet.
-## OUTPUTS
+## Outputs
### None
-This cmdlet does not return any output.
-## NOTES
+This cmdlet does not return any output.
-* This cmdlet takes only the common parameters.
+## Notes
+This cmdlet takes only the common parameters.
## RELATED LINKS
Microsoft.PowerShell.Core https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Core/Exit-PSSession?view=powershell-7.0 https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Exit-PSSession.md
@@ -3,14 +3,15 @@ external help file: System.Management.Automation.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Core Previously updated : 06/09/2017 Last updated : 02/08/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/exit-pssession?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Exit-PSSession + # Exit-PSSession
-## SYNOPSIS
+## Synopsis
Ends an interactive session with a remote computer. ## SYNTAX
@@ -19,19 +20,20 @@ Ends an interactive session with a remote computer.
Exit-PSSession [<CommonParameters>] ```
-## DESCRIPTION
+## Description
-The **Exit-PSSession** cmdlet ends interactive sessions that you started by using the Enter-PSSession cmdlet.
+The `Exit-PSSession` cmdlet ends interactive sessions that you started by using the
+`Enter-PSSession` cmdlet.
-You can also use the **Exit** keyword to end an interactive session.
-The effect is the same as using **Exit-PSSession**.
+You can also use the `exit` keyword to end an interactive session. The effect is the same as using
+`Exit-PSSession`.
-## EXAMPLES
+## Examples
### Example 1: Start and stop an interactive session
-```
-PS> Enter-PSSession -computername Server01
+```powershell
+PS> Enter-PSSession -ComputerName Server01
Server01\PS> Exit-PSSession PS> ```
@@ -40,7 +42,7 @@ These commands start and then stop an interactive session with the Server01 remo
### Example 2: Start and stop an interactive session by using a PSSession object
-```
+```powershell
PS> $s = New-PSSession -ComputerName Server01 PS> Enter-PSSession -Session $s Server01\PS> Exit-PSSession
@@ -50,55 +52,56 @@ Id Name ComputerName State ConfigurationName
1 Session1 Server01 Opened Microsoft.PowerShell ```
-These commands start and stop an interactive session with the Server01 computer that uses a PowerShell session (**PSSession**).
+These commands start and stop an interactive session with the Server01 computer that uses a
+PowerShell session (**PSSession**).
-Because the interactive session was started by using a PowerShell session, the **PSSession** is still available when the interactive session ends.
-If you use the *ComputerName* parameter, **Enter-PSSession** creates a temporary session that it closes when the interactive session ends.
+Because the interactive session was started by using a PowerShell session, the **PSSession** is
+still available when the interactive session ends. If you use the _ComputerName_ parameter,
+`Enter-PSSession` creates a temporary session that it closes when the interactive session ends.
-The first command uses the New-PSSession cmdlet to create a **PSSession** on the Server01 computer.
-The command saves the **PSSession** in the $s variable.
+The first command uses the `New-PSSession` cmdlet to create a **PSSession** on the Server01
+computer. The command saves the **PSSession** in the `$s` variable.
-The second command uses **Enter-PSSession** to start an interactive session using the **PSSession** in $s.
+The second command uses `Enter-PSSession` to start an interactive session using the **PSSession** in
+`$s`.
-The third command uses **Exit-PSSession** to stop the interactive session.
+The third command uses `Exit-PSSession` to stop the interactive session.
-The final command displays the **PSSession** in the $s variable.
-The **State** property shows the **PSSession** is still open and available for use.
+The final command displays the **PSSession** in the `$s` variable. The **State** property shows the
+**PSSession** is still open and available for use.
### Example 3: Use the Exit keyword to stop a session
-```
-PS> Enter-PSSession -computername Server01
+```powershell
+PS> Enter-PSSession -ComputerName Server01
Server01\PS> exit PS> ```
-This example uses the **Exit** keyword to stop an interactive session started by using **Enter-PSSession**.
-The **Exit** keyword has the same effect as using **Exit-PSSession**.
+This example uses the `exit` keyword to stop an interactive session started by using
+`Enter-PSSession`. The `exit` keyword has the same effect as using `Exit-PSSession`.
-## PARAMETERS
+## Parameters
### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### None You cannot pipe objects to this cmdlet.
-## OUTPUTS
+## Outputs
### None This cmdlet does not return any output.
-## NOTES
-
-* This cmdlet takes only the common parameters.
+## Notes
-*
+This cmdlet takes only the common parameters.
## RELATED LINKS
Microsoft.PowerShell.Core https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Core/About/about_Automatic_Variables?view=powershell-7.1 https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md
@@ -80,7 +80,7 @@ function, script, or script block. When you create a function, you can declare
the parameters by using the `param` keyword or by adding a comma-separated list of parameters in parentheses after the function name.
-In an event action, the `$Args` variable contains objects that represent the
+In an event action, the `$args` variable contains objects that represent the
event arguments of the event that is being processed. This variable is populated only within the `Action` block of an event registration command. The value of this variable can also be found in the **SourceArgs** property of
Microsoft.PowerShell.Core https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Core/Exit-PSSession?view=powershell-7.1 https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Exit-PSSession.md
@@ -3,14 +3,15 @@ external help file: System.Management.Automation.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Core Previously updated : 06/09/2017 Last updated : 02/08/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/exit-pssession?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Exit-PSSession + # Exit-PSSession
-## SYNOPSIS
+## Synopsis
Ends an interactive session with a remote computer. ## SYNTAX
@@ -19,19 +20,20 @@ Ends an interactive session with a remote computer.
Exit-PSSession [<CommonParameters>] ```
-## DESCRIPTION
+## Description
-The **Exit-PSSession** cmdlet ends interactive sessions that you started by using the Enter-PSSession cmdlet.
+The `Exit-PSSession` cmdlet ends interactive sessions that you started by using the
+`Enter-PSSession` cmdlet.
-You can also use the **Exit** keyword to end an interactive session.
-The effect is the same as using **Exit-PSSession**.
+You can also use the `exit` keyword to end an interactive session. The effect is the same as using
+`Exit-PSSession`.
-## EXAMPLES
+## Examples
### Example 1: Start and stop an interactive session
-```
-PS> Enter-PSSession -computername Server01
+```powershell
+PS> Enter-PSSession -ComputerName Server01
Server01\PS> Exit-PSSession PS> ```
@@ -40,7 +42,7 @@ These commands start and then stop an interactive session with the Server01 remo
### Example 2: Start and stop an interactive session by using a PSSession object
-```
+```powershell
PS> $s = New-PSSession -ComputerName Server01 PS> Enter-PSSession -Session $s Server01\PS> Exit-PSSession
@@ -50,55 +52,56 @@ Id Name ComputerName State ConfigurationName
1 Session1 Server01 Opened Microsoft.PowerShell ```
-These commands start and stop an interactive session with the Server01 computer that uses a PowerShell session (**PSSession**).
+These commands start and stop an interactive session with the Server01 computer that uses a
+PowerShell session (**PSSession**).
-Because the interactive session was started by using a PowerShell session, the **PSSession** is still available when the interactive session ends.
-If you use the *ComputerName* parameter, **Enter-PSSession** creates a temporary session that it closes when the interactive session ends.
+Because the interactive session was started by using a PowerShell session, the **PSSession** is
+still available when the interactive session ends. If you use the _ComputerName_ parameter,
+`Enter-PSSession` creates a temporary session that it closes when the interactive session ends.
-The first command uses the New-PSSession cmdlet to create a **PSSession** on the Server01 computer.
-The command saves the **PSSession** in the $s variable.
+The first command uses the `New-PSSession` cmdlet to create a **PSSession** on the Server01
+computer. The command saves the **PSSession** in the `$s` variable.
-The second command uses **Enter-PSSession** to start an interactive session using the **PSSession** in $s.
+The second command uses `Enter-PSSession` to start an interactive session using the **PSSession** in
+`$s`.
-The third command uses **Exit-PSSession** to stop the interactive session.
+The third command uses `Exit-PSSession` to stop the interactive session.
-The final command displays the **PSSession** in the $s variable.
-The **State** property shows the **PSSession** is still open and available for use.
+The final command displays the **PSSession** in the `$s` variable. The **State** property shows the
+**PSSession** is still open and available for use.
### Example 3: Use the Exit keyword to stop a session
-```
-PS> Enter-PSSession -computername Server01
+```powershell
+PS> Enter-PSSession -ComputerName Server01
Server01\PS> exit PS> ```
-This example uses the **Exit** keyword to stop an interactive session started by using **Enter-PSSession**.
-The **Exit** keyword has the same effect as using **Exit-PSSession**.
+This example uses the `exit` keyword to stop an interactive session started by using
+`Enter-PSSession`. The `exit` keyword has the same effect as using `Exit-PSSession`.
-## PARAMETERS
+## Parameters
### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### None You cannot pipe objects to this cmdlet.
-## OUTPUTS
+## Outputs
### None This cmdlet does not return any output.
-## NOTES
-
-* This cmdlet takes only the common parameters.
+## Notes
-*
+This cmdlet takes only the common parameters.
## RELATED LINKS
@@ -117,4 +120,3 @@ This cmdlet does not return any output.
[Receive-PSSession](Receive-PSSession.md) [Remove-PSSession](Remove-PSSession.md)-
Microsoft.PowerShell.Core https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Core/Exit-PSSession?view=powershell-7.2 https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Exit-PSSession.md
@@ -2,14 +2,15 @@
external help file: System.Management.Automation.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Core Previously updated : 06/09/2017 Last updated : 02/08/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/exit-pssession?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Exit-PSSession + # Exit-PSSession
-## SYNOPSIS
+## Synopsis
Ends an interactive session with a remote computer. ## SYNTAX
@@ -18,19 +19,20 @@ Ends an interactive session with a remote computer.
Exit-PSSession [<CommonParameters>] ```
-## DESCRIPTION
+## Description
-The **Exit-PSSession** cmdlet ends interactive sessions that you started by using the Enter-PSSession cmdlet.
+The `Exit-PSSession` cmdlet ends interactive sessions that you started by using the
+`Enter-PSSession` cmdlet.
-You can also use the **Exit** keyword to end an interactive session.
-The effect is the same as using **Exit-PSSession**.
+You can also use the `exit` keyword to end an interactive session. The effect is the same as using
+`Exit-PSSession`.
-## EXAMPLES
+## Examples
### Example 1: Start and stop an interactive session
-```
-PS> Enter-PSSession -computername Server01
+```powershell
+PS> Enter-PSSession -ComputerName Server01
Server01\PS> Exit-PSSession PS> ```
@@ -39,7 +41,7 @@ These commands start and then stop an interactive session with the Server01 remo
### Example 2: Start and stop an interactive session by using a PSSession object
-```
+```powershell
PS> $s = New-PSSession -ComputerName Server01 PS> Enter-PSSession -Session $s Server01\PS> Exit-PSSession
@@ -49,55 +51,56 @@ Id Name ComputerName State ConfigurationName
1 Session1 Server01 Opened Microsoft.PowerShell ```
-These commands start and stop an interactive session with the Server01 computer that uses a PowerShell session (**PSSession**).
+These commands start and stop an interactive session with the Server01 computer that uses a
+PowerShell session (**PSSession**).
-Because the interactive session was started by using a PowerShell session, the **PSSession** is still available when the interactive session ends.
-If you use the *ComputerName* parameter, **Enter-PSSession** creates a temporary session that it closes when the interactive session ends.
+Because the interactive session was started by using a PowerShell session, the **PSSession** is
+still available when the interactive session ends. If you use the _ComputerName_ parameter,
+`Enter-PSSession` creates a temporary session that it closes when the interactive session ends.
-The first command uses the New-PSSession cmdlet to create a **PSSession** on the Server01 computer.
-The command saves the **PSSession** in the $s variable.
+The first command uses the `New-PSSession` cmdlet to create a **PSSession** on the Server01
+computer. The command saves the **PSSession** in the `$s` variable.
-The second command uses **Enter-PSSession** to start an interactive session using the **PSSession** in $s.
+The second command uses `Enter-PSSession` to start an interactive session using the **PSSession** in
+`$s`.
-The third command uses **Exit-PSSession** to stop the interactive session.
+The third command uses `Exit-PSSession` to stop the interactive session.
-The final command displays the **PSSession** in the $s variable.
-The **State** property shows the **PSSession** is still open and available for use.
+The final command displays the **PSSession** in the `$s` variable. The **State** property shows the
+**PSSession** is still open and available for use.
### Example 3: Use the Exit keyword to stop a session
-```
-PS> Enter-PSSession -computername Server01
+```powershell
+PS> Enter-PSSession -ComputerName Server01
Server01\PS> exit PS> ```
-This example uses the **Exit** keyword to stop an interactive session started by using **Enter-PSSession**.
-The **Exit** keyword has the same effect as using **Exit-PSSession**.
+This example uses the `exit` keyword to stop an interactive session started by using
+`Enter-PSSession`. The `exit` keyword has the same effect as using `Exit-PSSession`.
-## PARAMETERS
+## Parameters
### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### None You cannot pipe objects to this cmdlet.
-## OUTPUTS
+## Outputs
### None This cmdlet does not return any output.
-## NOTES
-
-* This cmdlet takes only the common parameters.
+## Notes
-*
+This cmdlet takes only the common parameters.
## RELATED LINKS
@@ -116,4 +119,3 @@ This cmdlet does not return any output.
[Receive-PSSession](Receive-PSSession.md) [Remove-PSSession](Remove-PSSession.md)-
Microsoft.PowerShell.Utility https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Utility/Get-Date?view=powershell-7.2 https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Date.md
@@ -607,9 +607,9 @@ The valid **UFormat specifiers** are displayed in the following table:
| `%t` | Horizontal tab character | | | `%T` | Time in 24-hour format | 17:45:52 | | `%U` | Same as 'W' | |
-| `%u` | Day of the week - number | Sunday = 0 |
+| `%u` | Numeric day of the week (1-7) | Monday = 1, Sunday = 7 |
| `%V` | Week of the year | 01-53 |
-| `%w` | Same as 'u' | |
+| `%w` | Numeric day of the week (0-6) | Sunday = 0, Saturday = 6 |
| `%W` | Week of the year | 00-52 | | `%X` | Same as 'T' | | | `%x` | Date in standard format for locale | 06/27/19 for English-US |