Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 3 additions & 4 deletions reference/5.1/Microsoft.PowerShell.Management/Test-Path.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 10/18/2018
ms.date: 11/11/2021
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/test-path?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Test-Path
Expand Down Expand Up @@ -442,9 +442,8 @@ in programs and scripts where you want to display all or part of a path name in
Use them as you would use **Dirname**, **Normpath**, **Realpath**, **Join**, or other path
manipulators.

The `Test-Path` is designed to work with the data exposed by any provider.
To list the providers available in your session, type `Get-PSProvider`.
For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
The `Test-Path` is designed to work with the data exposed by any provider. To list the providers
available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).

## Related links

Expand Down
7 changes: 4 additions & 3 deletions reference/7.0/Microsoft.PowerShell.Management/Test-Path.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 05/20/2021
ms.date: 11/11/2021
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/test-path?view=powershell-7&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Test-Path
Expand Down Expand Up @@ -183,8 +183,9 @@ At line:1 char:11

### Example 8: Test a path with whitespace as the value

When a whitespace or empty string is provided for the the `-Path` parameter, it returns **False**.
The following example show whitespace and empty string.
When a whitespace string is provided for the the `-Path` parameter, it returns **True**. When an
empty string is provided, `Test-Path` returns an error. The following example shows whitespace and
empty string.

```powershell
Test-Path ' '
Expand Down
7 changes: 4 additions & 3 deletions reference/7.1/Microsoft.PowerShell.Management/Test-Path.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 05/20/2021
ms.date: 11/11/2021
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/test-path?view=powershell-7.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Test-Path
Expand Down Expand Up @@ -183,8 +183,9 @@ At line:1 char:11

### Example 8: Test a path with whitespace as the value

When a whitespace or empty string is provided for the the `-Path` parameter, it returns **False**.
The following example show whitespace and empty string.
When a whitespace string is provided for the the `-Path` parameter, it returns **True**. When an
empty string is provided, `Test-Path` returns an error. The following example shows whitespace and
empty string.

```powershell
Test-Path ' '
Expand Down
9 changes: 5 additions & 4 deletions reference/7.2/Microsoft.PowerShell.Management/Test-Path.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 05/20/2021
ms.date: 11/11/2021
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/test-path?view=powershell-7.2&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Test-Path
Expand Down Expand Up @@ -35,7 +35,7 @@ Test-Path -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-Exc
The `Test-Path` cmdlet determines whether all elements of the path exist. It returns `$True` if all
elements exist and `$False` if any are missing. It can also tell whether the path syntax is valid
and whether the path leads to a container or a terminal or leaf element. If the `Path` is whitespace
an empty string, then `$False` is returned. If the `Path` is `$null`, array of `$null` or empty
or an empty string, then `$False` is returned. If the `Path` is `$null`, array of `$null` or an empty
array, a non-terminating error is returned.

## Examples
Expand Down Expand Up @@ -183,8 +183,9 @@ At line:1 char:11

### Example 8: Test a path with whitespace as the value

When a whitespace or empty string is provided for the the `-Path` parameter, it returns **False**.
The following example show whitespace and empty string.
When a whitespace string is provided for the the `-Path` parameter, it returns **True**. When an
empty string is provided, `Test-Path` returns an error. The following example shows whitespace and
empty string.

```powershell
Test-Path ' '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ The installer creates a shortcut in the Windows Start Menu.
- You can launch PowerShell via the Start Menu or `$env:ProgramFiles\PowerShell\<version>\pwsh.exe`

> [!NOTE]
> PowerShell 7.1 installs to a new directory and runs side-by-side with Windows PowerShell 5.1.
> PowerShell 7.1 is an in-place upgrade that replaces PowerShell 7.0 and lower.
> PowerShell 7.2 installs to a new directory and runs side-by-side with Windows PowerShell 5.1.
> PowerShell 7.2 is an in-place upgrade that replaces PowerShell 7.0 and lower.
>
> - PowerShell 7.1 is installed to `$env:ProgramFiles\PowerShell\7`
> - PowerShell 7.2 is installed to `$env:ProgramFiles\PowerShell\7`
> - The `$env:ProgramFiles\PowerShell\7` folder is added to `$env:PATH`
> - Folders for previously released versions are deleted
>
> If you need to run PowerShell 7.1 side-by-side with other versions, use the [ZIP install](#zip)
> If you need to run PowerShell 7.2 side-by-side with other versions, use the [ZIP install](#zip)
> method to install the other version to a different folder.

### Administrative install from the command line
Expand Down Expand Up @@ -146,7 +146,7 @@ winget install --id Microsoft.Powershell.Preview --source winget

## <a id="msstore" />Installing from the Microsoft Store

PowerShell 7.1 has been published to the Microsoft Store. You can find the PowerShell release in the
PowerShell 7.2 has been published to the Microsoft Store. You can find the PowerShell release in the
[Microsoft Store][store-app] site or in the Store application in Windows.

Benefits of the Microsoft Store package:
Expand Down
22 changes: 19 additions & 3 deletions reference/docs-conceptual/learn/security-features.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: PowerShell has several features designed to improve the security of your scripting environment.
ms.date: 10/27/2021
ms.date: 11/10/2021
title: PowerShell security features
---
# PowerShell security features
Expand Down Expand Up @@ -34,8 +34,8 @@ For more information, see the following articles:

## Constrained language mode

**ConstrainedLanguage** mode protects your system by limiting the cmdlets and .NET types that can be used
in a PowerShell session. For a full description, see [about_Language_Modes][lang-modes].
**ConstrainedLanguage** mode protects your system by limiting the cmdlets and .NET types that can be
used in a PowerShell session. For a full description, see [about_Language_Modes][lang-modes].

## Application Control

Expand Down Expand Up @@ -89,6 +89,21 @@ The table below outlines the features that meet the servicing criteria and those
- PowerShell 7.2 now disallows scripts from using COM objects in AppLocker system lock down
conditions. Cmdlet that use COM or DCOM internally are not affected.

## Software Bill of Materials (SBOM)

Beginning with PowerShell 7.2, all install packages contain a Software Bill of Materials (SBOM). The
SBOM is found at `$PSHOME/_manifest/spdx_2.2/manifest.spdx.json`. The creation and publishing of the
SBOM is the first step to modernize Federal Government cybersecurity and enhance software supply
chain security.

The PowerShell team is also producing SBOMs for modules that they own but ship separately from
PowerShell. SBOMs will be added in the next release of the module. For modules, the SBOM is
installed in the module's folder under
`_manifest/spdx_2.2/manifest.spdx.json`.

For more information about this initiative, see the blog post
[Generating Software Bills of Materials (SBOMs) with SPDX at Microsoft][sbomblog].

<!-- link references -->
[applocker]: /windows/security/threat-protection/windows-defender-application-control/applocker/what-is-applocker
[availability]: /windows/security/threat-protection/windows-defender-application-control/feature-availability
Expand All @@ -100,3 +115,4 @@ The table below outlines the features that meet the servicing criteria and those
[logging]: /powershell/module/microsoft.powershell.core/about/about_group_policy_settings#turn-on-module-logging
[mssec]: https://www.microsoft.com/msrc/windows-security-servicing-criteria
[WDAC]: /windows/security/threat-protection/windows-defender-application-control/windows-defender-application-control
[sbomblog]: https://devblogs.microsoft.com/engineering-at-microsoft/generating-software-bills-of-materials-sboms-with-spdx-at-microsoft/