Skip to content

Daily Publishing 8/18 3PM #9143

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
5 commits merged into from
Aug 18, 2022
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
22 changes: 21 additions & 1 deletion reference/5.1/Microsoft.PowerShell.Core/About/about_Parsing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how PowerShell parses commands.
Locale: en-US
ms.date: 05/17/2022
ms.date: 08/18/2022
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_parsing?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Parsing
Expand Down Expand Up @@ -240,6 +240,26 @@ variable the token is passed through as-is.
You cannot use stream redirection (like `>file.txt`) because they are passed
verbatim as arguments to the target command.

Using the stop-parsing token is also the best way to ensure that quoted strings
that are passed as parameters to `cmd.exe` or Windows batch (`.cmd` or `.bat`)
files are handled properly.

In the following example, the first step runs a command without using the
stop-parsing token. PowerShell evaluates the quoted string and passes the value
(without quotes) to `cmd.exe`, which results in an error.

```powershell
PS> cmd /c echo "a|b"
'b' is not recognized as an internal or external command,
operable program or batch file.
PS> cmd /c --% echo "a|b"
"a|b"
```

> [!NOTE]
> Some commands on Windows systems are implemented as a Windows batch file. For
> example, that `az` command for Azure CLI is a Windows batch file.

### Passing arguments that contain quote characters

Some native commands expect arguments that contain quote characters. Normally,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Prevents a script from running without the required elements.
Locale: en-US
ms.date: 05/24/2022
ms.date: 08/18/2022
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_requires?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Requires
Expand Down Expand Up @@ -114,17 +114,17 @@ and an optional version number.
If the required modules aren't in the current session, PowerShell imports them.
If the modules can't be imported, PowerShell throws a terminating error.

For each module, type the module name (\<String\>) or a hash table. The value
can be a combination of strings and hash tables. The hash table has the
For each module, type the module name (\<String\>) or a hashtable. The value
can be a combination of strings and hashtables. The hashtable has the
following keys.

- `ModuleName` - **Required** Specifies the module name.
- `GUID` - **Optional** Specifies the GUID of the module.
- It's also **Required** to specify one of the three below keys. These keys
can't be used together.
- It's also **Required** to specify at least one of the three below keys.
- `ModuleVersion` - Specifies a minimum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module.
- `MaximumVersion` - Specifies the maximum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module.
This can't be used with the other Version keys.

> [!NOTE]
> `RequiredVersion` was added in Windows PowerShell 5.0.
Expand Down
10 changes: 5 additions & 5 deletions reference/5.1/Microsoft.PowerShell.Core/About/about_Using.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Allows you to indicate which namespaces are used in the session.
Locale: en-US
ms.date: 01/19/2021
ms.date: 08/18/2022
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_using?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Using
Expand Down Expand Up @@ -54,15 +54,15 @@ statement.
When `<module-name>` is a name or module specification, PowerShell searches the
**PSModulePath** for the specified module.

A module specification is a hash table that has the following keys.
A module specification is a hashtable that has the following keys.

- `ModuleName` - **Required** Specifies the module name.
- `GUID` - **Optional** Specifies the GUID of the module.
- It's also **Required** to specify one of the three below keys. These keys
can't be used together.
- It's also **Required** to specify at least one of the three below keys.
- `ModuleVersion` - Specifies a minimum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module.
- `MaximumVersion` - Specifies the maximum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module.
This can't be used with the other Version keys.

The `using module` statement imports classes from the root module
(`ModuleToProcess`) of a script module or binary module. It does not
Expand Down
24 changes: 16 additions & 8 deletions reference/5.1/Microsoft.PowerShell.Core/Get-Command.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 04/05/2021
ms.date: 08/18/2022
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/get-command?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Get-Command
Expand Down Expand Up @@ -376,15 +376,23 @@ Accept wildcard characters: False

### -FullyQualifiedModule

Specifies modules with names that are specified in the form of **ModuleSpecification** objects,
described in the **Remarks** section of [ModuleSpecification Constructor (Hashtable)](/dotnet/api/microsoft.powershell.commands.modulespecification.-ctor?view=powershellsdk-1.1.0#Microsoft_PowerShell_Commands_ModuleSpecification__ctor_System_Collections_Hashtable_).
For example, the **FullyQualifiedModule** parameter accepts a module name that is specified in one
of the following formats:
The value can be a module name, a full module specification, or a path to a module file.

- `@{ModuleName = "modulename"; ModuleVersion = "version_number"}`
- `@{ModuleName = "modulename"; ModuleVersion = "version_number"; Guid = "GUID"}`
When the value is a path, the path can be fully qualified or relative. A relative path is resolved
relative to the script that contains the using statement.

**ModuleName** and **ModuleVersion** are required, but **Guid** is optional.
When the value is a name or module specification, PowerShell searches the **PSModulePath** for the
specified module.

A module specification is a hashtable that has the following keys.

- `ModuleName` - **Required** Specifies the module name.
- `GUID` - **Optional** Specifies the GUID of the module.
- It's also **Required** to specify at least one of the three below keys.
- `ModuleVersion` - Specifies a minimum acceptable version of the module.
- `MaximumVersion` - Specifies the maximum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module. This can't be used with
the other Version keys.

You cannot specify the **FullyQualifiedModule** parameter in the same command as a **Module**
parameter. The two parameters are mutually exclusive.
Expand Down
34 changes: 11 additions & 23 deletions reference/5.1/Microsoft.PowerShell.Core/Get-Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 06/02/2022
ms.date: 08/18/2022
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/get-module?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Get-Module
Expand Down Expand Up @@ -461,37 +461,25 @@ Accept wildcard characters: False

### -FullyQualifiedName

Specifies modules with names that are specified in the form of **ModuleSpecification** objects.
See the Remarks section of
[ModuleSpecification Constructor (Hashtable)](/dotnet/api/microsoft.powershell.commands.modulespecification.-ctor#microsoft-powershell-commands-modulespecification-ctor(system-collections-hashtable)).
The value can be a module name, a full module specification, or a path to a module file.

For example, the **FullyQualifiedModule** parameter accepts a module name that is specified in
either of these formats:
When the value is a path, the path can be fully qualified or relative. A relative path is resolved
relative to the script that contains the using statement.

- `@{ModuleName = "modulename"; ModuleVersion = "version_number"}`
- `@{ModuleName = "modulename"; ModuleVersion = "version_number"; Guid = "GUID"}`
When the value is a name or module specification, PowerShell searches the **PSModulePath** for the
specified module.

**ModuleName** and **ModuleVersion** are required, but **Guid** is optional. You cannot specify the
**FullyQualifiedModule** parameter in the same command as a **Module** parameter. The two
parameters are mutually exclusive.

The value can be a combination of strings and hash tables. The hash table has the following keys.
A module specification is a hashtable that has the following keys.

- `ModuleName` - **Required** Specifies the module name.
- `GUID` - **Optional** Specifies the GUID of the module.
- It's also **Required** to specify one of the three below keys. These keys
can't be used together.
- It's also **Required** to specify at least one of the three below keys.
- `ModuleVersion` - Specifies a minimum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module.
- `MaximumVersion` - Specifies the maximum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module. This can't be used with
the other Version keys.

> [!NOTE]
> This parameter also accepts simpler forms of input:
>
> - A module name
> - A fully-qualified path to the module
> - A relative path to the module. When used in a script, the relative path is resolved to a
> fully-qualified path relative to the location of the script file.
You cannot specify the **FullyQualifiedName** parameter in the same command as a **Name** parameter.

```yaml
Type: Microsoft.PowerShell.Commands.ModuleSpecification[]
Expand Down
19 changes: 13 additions & 6 deletions reference/5.1/Microsoft.PowerShell.Core/Import-Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 05/05/2022
ms.date: 08/18/2022
no-loc: [Import-Module, -Scope]
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/import-module?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -776,16 +776,23 @@ Accept wildcard characters: False

### -FullyQualifiedName

Specifies the fully qualified name of the module as a hash table. The value can be a combination of
strings and hash tables. The hash table has the following keys.
The value can be a module name, a full module specification, or a path to a module file.

When the value is a path, the path can be fully qualified or relative. A relative path is resolved
relative to the script that contains the using statement.

When the value is a name or module specification, PowerShell searches the **PSModulePath** for the
specified module.

A module specification is a hashtable that has the following keys.

- `ModuleName` - **Required** Specifies the module name.
- `GUID` - **Optional** Specifies the GUID of the module.
- It's also **Required** to specify one of the three below keys. These keys
can't be used together.
- It's also **Required** to specify at least one of the three below keys.
- `ModuleVersion` - Specifies a minimum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module.
- `MaximumVersion` - Specifies the maximum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module. This can't be used with
the other Version keys.

```yaml
Type: Microsoft.PowerShell.Commands.ModuleSpecification[]
Expand Down
20 changes: 18 additions & 2 deletions reference/5.1/Microsoft.PowerShell.Core/Remove-Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 09/28/2021
ms.date: 08/18/2022
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/remove-module?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Remove-Module
Expand Down Expand Up @@ -126,7 +126,23 @@ Accept wildcard characters: False

### -FullyQualifiedName

Specifies the fully qualified names of modules to remove.
The value can be a module name, a full module specification, or a path to a module file.

When the value is a path, the path can be fully qualified or relative. A relative path is resolved
relative to the script that contains the using statement.

When the value is a name or module specification, PowerShell searches the **PSModulePath** for the
specified module.

A module specification is a hashtable that has the following keys.

- `ModuleName` - **Required** Specifies the module name.
- `GUID` - **Optional** Specifies the GUID of the module.
- It's also **Required** to specify at least one of the three below keys.
- `ModuleVersion` - Specifies a minimum acceptable version of the module.
- `MaximumVersion` - Specifies the maximum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module. This can't be used with
the other Version keys.

```yaml
Type: Microsoft.PowerShell.Commands.ModuleSpecification[]
Expand Down
29 changes: 18 additions & 11 deletions reference/5.1/Microsoft.PowerShell.Core/Save-Help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 10/22/2021
ms.date: 08/18/2022
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/save-help?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Save-Help
Expand Down Expand Up @@ -285,19 +285,26 @@ Accept wildcard characters: False

### -FullyQualifiedModule

Specifies modules with names that are specified in the form of **ModuleSpecification** objects. See
the Remarks section of
[ModuleSpecification Constructor (Hashtable)](/dotnet/api/microsoft.powershell.commands.modulespecification.-ctor#Microsoft_PowerShell_Commands_ModuleSpecification__ctor_System_Collections_Hashtable_).
The value can be a module name, a full module specification, or a path to a module file.

For example, the **FullyQualifiedModule** parameter accepts a module name that is specified in
either of these formats:
When the value is a path, the path can be fully qualified or relative. A relative path is resolved
relative to the script that contains the using statement.

- `@{ModuleName = "modulename"; ModuleVersion = "version_number"}`
- `@{ModuleName = "modulename"; ModuleVersion = "version_number"; Guid = "GUID"}`
When the value is a name or module specification, PowerShell searches the **PSModulePath** for the
specified module.

**ModuleName** and **ModuleVersion** are required, but **Guid** is optional. You cannot specify the
**FullyQualifiedModule** parameter in the same command as a **Module** parameter. the two
parameters are mutually exclusive.
A module specification is a hashtable that has the following keys.

- `ModuleName` - **Required** Specifies the module name.
- `GUID` - **Optional** Specifies the GUID of the module.
- It's also **Required** to specify at least one of the three below keys.
- `ModuleVersion` - Specifies a minimum acceptable version of the module.
- `MaximumVersion` - Specifies the maximum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module. This can't be used with
the other Version keys.

You can't specify the **FullyQualifiedModule** parameter in the same command as a **Module**
parameter. the two parameters are mutually exclusive.

```yaml
Type: Microsoft.PowerShell.Commands.ModuleSpecification[]
Expand Down
25 changes: 14 additions & 11 deletions reference/5.1/Microsoft.PowerShell.Core/Update-Help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 08/10/2022
ms.date: 08/18/2022
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/update-help?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Update-Help
Expand Down Expand Up @@ -344,20 +344,23 @@ Accept wildcard characters: False

### -FullyQualifiedModule

Specifies modules with names that are specified in the form of **ModuleSpecification** objects.
These modules are described in the Remarks section of
[ModuleSpecification Constructor (Hashtable)](/dotnet/api/microsoft.powershell.commands.modulespecification.-ctor#Microsoft_PowerShell_Commands_ModuleSpecification__ctor_System_Collections_Hashtable_).
The value can be a module name, a full module specification, or a path to a module file.

For example, the **FullyQualifiedModule** parameter accepts a module name that's specified in the
format:
When the value is a path, the path can be fully qualified or relative. A relative path is resolved
relative to the script that contains the using statement.

`@{ModuleName = "modulename"; ModuleVersion = "version_number"}`
When the value is a name or module specification, PowerShell searches the **PSModulePath** for the
specified module.

or
A module specification is a hashtable that has the following keys.

`@{ModuleName = "modulename"; ModuleVersion = "version_number"; Guid = "GUID"}.`

**ModuleName** and **ModuleVersion** are required, but **Guid** is optional.
- `ModuleName` - **Required** Specifies the module name.
- `GUID` - **Optional** Specifies the GUID of the module.
- It's also **Required** to specify at least one of the three below keys.
- `ModuleVersion` - Specifies a minimum acceptable version of the module.
- `MaximumVersion` - Specifies the maximum acceptable version of the module.
- `RequiredVersion` - Specifies an exact, required version of the module. This can't be used with
the other Version keys.

You can't specify the **FullyQualifiedModule** parameter in the same command as a **Module**
parameter.
Expand Down
Loading