From d1379aa329920c04a63e63125de5fef0b7196386 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Thu, 18 Aug 2022 13:55:59 -0500 Subject: [PATCH 1/5] Add note about passing quoted strings to cmd (#9137) --- .../About/about_Parsing.md | 22 ++++++++++++++++++- .../About/about_Parsing.md | 22 ++++++++++++++++++- .../About/about_Parsing.md | 22 ++++++++++++++++++- .../About/about_Parsing.md | 22 ++++++++++++++++++- 4 files changed, 84 insertions(+), 4 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Parsing.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Parsing.md index 0e8c79ef2b4f..60da81153345 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Parsing.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Parsing.md @@ -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 @@ -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, diff --git a/reference/7.0/Microsoft.PowerShell.Core/About/about_Parsing.md b/reference/7.0/Microsoft.PowerShell.Core/About/about_Parsing.md index 33f63d8e2581..8ff267811158 100644 --- a/reference/7.0/Microsoft.PowerShell.Core/About/about_Parsing.md +++ b/reference/7.0/Microsoft.PowerShell.Core/About/about_Parsing.md @@ -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-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Parsing @@ -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, diff --git a/reference/7.2/Microsoft.PowerShell.Core/About/about_Parsing.md b/reference/7.2/Microsoft.PowerShell.Core/About/about_Parsing.md index eb31d8591c6e..b3f8fd514205 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/About/about_Parsing.md +++ b/reference/7.2/Microsoft.PowerShell.Core/About/about_Parsing.md @@ -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-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Parsing @@ -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, diff --git a/reference/7.3/Microsoft.PowerShell.Core/About/about_Parsing.md b/reference/7.3/Microsoft.PowerShell.Core/About/about_Parsing.md index be1b4ec1981e..6920d8b96c02 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/About/about_Parsing.md +++ b/reference/7.3/Microsoft.PowerShell.Core/About/about_Parsing.md @@ -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-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Parsing @@ -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, From b27e4e65c729d96a5a3e2b9fce3f536c9c37b7cd Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Thu, 18 Aug 2022 14:22:20 -0500 Subject: [PATCH 2/5] Add CrescendoBuilt tag to list of preferred tags (#9139) --- .../concepts/package-manifest-affecting-ui.md | 103 +++++++++--------- reference/docs-conceptual/gallery/toc.yml | 95 ++++++++++++++++ reference/docs-conceptual/toc.yml | 94 ---------------- 3 files changed, 147 insertions(+), 145 deletions(-) create mode 100644 reference/docs-conceptual/gallery/toc.yml diff --git a/reference/docs-conceptual/gallery/concepts/package-manifest-affecting-ui.md b/reference/docs-conceptual/gallery/concepts/package-manifest-affecting-ui.md index e9fa10a85faf..06415694fe9e 100644 --- a/reference/docs-conceptual/gallery/concepts/package-manifest-affecting-ui.md +++ b/reference/docs-conceptual/gallery/concepts/package-manifest-affecting-ui.md @@ -1,6 +1,6 @@ --- description: This article documents the package metadata values that are used by the PowerShell Gallery. -ms.date: 08/11/2022 +ms.date: 08/18/2022 title: Package metadata values that impact the PowerShell Gallery UI --- # Package metadata values that impact the PowerShell Gallery UI @@ -207,68 +207,69 @@ best search results. | Preferred tag | Alternatives and notes | | ----------------- | ----------------------------------------------------------------------------------------------- | -| Azure | | -| DSC | DesiredStateConfiguration is less desirable, it's too long | -| ResourceManager | "Arm" is used to describe group of processors, and shouldn't be used for Azure Resource Manager | -| DSCResourceKit | | -| SQL | | -| AWS | | -| DSCResource | | -| Automation | | -| REST | | | ActiveDirectory | AD isn't currently used by itself | -| SQLServer | | -| DBA | | -| Security | Defense is less precise | -| Database | Databases (plural) is less desirable | -| DevOps | | -| Windows | | +| Appveyor | | +| Automation | | +| AWS | | +| Azure | | +| AzureAD | | +| AzureAutomation | | +| AzureRm | Used primarily for the AzureRM modules | +| Backup | | | Build | | -| Deployment | Deploy is used somewhat less often | +| ChatOps | | | Cloud | | +| Color | | +| Configuration | | +| CrescendoBuilt | This tag is added automatically by Crescendo when you export the module | +| Database | Databases (plural) is less desirable | +| DBA | | +| Deployment | Deploy is used somewhat less often | +| DevOps | | +| DNS | | +| Docker | | +| DSC | DesiredStateConfiguration is less desirable, it's too long | +| DSCResource | | +| DSCResourceKit | | +| Excel | | +| Exchange | | +| Firewall | | | GIT | | -| Test | Testing is less desirable | -| VersionControl | Version is less precise, although used more frequently | -| Logging | Preferred use of logging as an action | -| Log | Preferred use of Log as a thing | -| Backup | | +| GitHub | | +| Gitlab | | +| Google | | +| HTML | | +| Hyper-V | HyperV is less common as a tag | | IaaS | | -| Linux | | | IIS | | -| AzureAutomation | | -| Storage | | -| GitHub | | | Json | | -| Exchange | | -| Network | Networking is similar, less often used | -| SharePoint | | -| Reporting | Reporting is an action, report is a thing | -| Report | Report is a thing | -| WinRM | | +| Linux | | +| Log | Preferred use of Log as a thing | +| Logging | Preferred use of logging as an action | +| MacOS | | | Monitoring | | -| VSTS | | -| Excel | | -| Google | | -| Color | | -| DNS | | +| MSI | | +| Network | Networking is similar, less often used | | Office365 | Spelling out Office is preferable. O365 is less commonly used, although shorter | -| Gitlab | | -| Pester | | -| AzureAD | | -| HTML | | -| Hyper-V | HyperV is less common as a tag | -| Configuration | | -| ChatOps | | | PackageManagement | | +| Pester | | +| PoshBot | | +| Report | Report is a thing | +| Reporting | Reporting is an action, report is a thing | +| ResourceManager | "Arm" is used to describe group of processors, and shouldn't be used for Azure Resource Manager | +| REST | | +| Security | Defense is less precise | +| SharePoint | | +| SQL | | +| SQLServer | | +| Storage | | +| Test | Testing is less desirable | +| VersionControl | Version is less precise, although used more frequently | +| VSTS | | +| Windows | | +| WinRM | | | WMI | | -| Firewall | | -| Docker | | -| Appveyor | | -| AzureRm | Used primarily for the AzureRM modules | | Zip | | -| MSI | | -| MacOS | | -| PoshBot | | [1]: xref:Microsoft.PowerShell.Core.New-ModuleManifest diff --git a/reference/docs-conceptual/gallery/toc.yml b/reference/docs-conceptual/gallery/toc.yml new file mode 100644 index 000000000000..a2af16308fe2 --- /dev/null +++ b/reference/docs-conceptual/gallery/toc.yml @@ -0,0 +1,95 @@ +items: + - name: PowerShell Gallery + items: + - name: Overview + href: overview.md + - name: Installing PowerShellGet + href: installing-psget.md + - name: Installing PowerShellGet on older systems + href: install-on-older-systems.md + - name: Getting Started + href: getting-started.md + - name: How-To + items: + - name: Finding Packages in the Gallery + items: + - name: Searching For Packages + href: how-to/finding-packages/search-syntax.md + - name: Searching by Compatibility + href: how-to/finding-packages/searching-by-compatibility.md + - name: Filtering Search Results + href: how-to/finding-packages/filtering-packages.md + - name: Publishing to the Gallery + items: + - name: Creating and publishing Packages + href: how-to/publishing-packages/publishing-a-package.md + - name: Creating a PowerShellGallery Account + href: how-to/publishing-packages/creating-an-account.md + - name: Unlisting Packages + href: how-to/publishing-packages/unlisting-packages.md + - name: Deleting Packages + href: how-to/publishing-packages/deleting-packages.md + - name: Managing Packages owners + href: how-to/publishing-packages/managing-package-owners.md + - name: Working with Packages + items: + - name: FileList view + href: how-to/working-with-packages/filelist-view.md + - name: Deploy to Azure Automation + href: how-to/working-with-packages/deploy-to-azure-automation.md + - name: Manual Package Download + href: how-to/working-with-packages/manual-download.md + - name: Packages that Require License Acceptance + href: how-to/working-with-packages/packages-that-require-license-acceptance.md + - name: Contacting Packages owners + href: how-to/working-with-packages/contacting-package-owners.md + - name: Managing Account Profile + items: + - name: PowerShell Gallery Account Settings + href: how-to/managing-profile/managing-account.md + - name: Managing API Keys + href: how-to/managing-profile/creating-apikeys.md + - name: Working with Private PowerShellGet Repositories + href: how-to/working-with-local-psrepositories.md + - name: Concepts + items: + - name: Publishing guidelines and best practices + href: concepts/publishing-guidelines.md + - name: Package manifests and Gallery UI + href: concepts/package-manifest-affecting-ui.md + - name: Requiring Specific PSEditions + items: + - name: Writing Scripts with PSEditions Support + href: concepts/script-psedition-support.md + - name: Writing Modules with PSEdition support + href: concepts/module-psedition-support.md + - name: Requiring License Acceptance + items: + - name: Requiring License Acceptance for Scripts + href: concepts/script-license-acceptance.md + - name: Requiring License Acceptance for Modules + href: concepts/module-license-acceptance.md + - name: Defining Packages as PreRelease + items: + - name: Defining a Module as PreRelease + href: concepts/module-prerelease-support.md + - name: Defining a Script as PreRelease + href: concepts/script-prerelease-support.md + - name: PSScriptAnalyzer Rule Profile + href: concepts/scriptanalyzer-rule-profile.md + - name: Getting Support + items: + - name: Report Abuse + href: how-to/getting-support/report-abuse.md + - name: Dispute resolution + href: how-to/getting-support/dispute-resolution.md + - name: Contacting administrators + href: how-to/getting-support/contacting-administrators.md + - name: Troubleshooting + href: how-to/getting-support/troubleshooting-cmdlets.md + - name: Bootstrapping NuGet provider and NuGet.exe + href: how-to/getting-support/bootstrapping-nuget.md + - name: GDPR Compliance + href: how-to/getting-support/gdpr-dsr-policy.md + - name: Gallery FAQs + href: faqs.yml diff --git a/reference/docs-conceptual/toc.yml b/reference/docs-conceptual/toc.yml index e9763445960e..202e0b8c25b9 100644 --- a/reference/docs-conceptual/toc.yml +++ b/reference/docs-conceptual/toc.yml @@ -408,100 +408,6 @@ items: href: community/2020-updates.md - name: Digital art href: community/digital-art.md - - name: PowerShell Gallery - items: - - name: Overview - href: gallery/overview.md - - name: Installing PowerShellGet - href: gallery/installing-psget.md - - name: Installing PowerShellGet on older systems - href: gallery/install-on-older-systems.md - - name: Getting Started - href: gallery/getting-started.md - - name: How-To - items: - - name: Finding Packages in the Gallery - items: - - name: Searching For Packages - href: gallery/how-to/finding-packages/search-syntax.md - - name: Searching by Compatibility - href: gallery/how-to/finding-packages/searching-by-compatibility.md - - name: Filtering Search Results - href: gallery/how-to/finding-packages/filtering-packages.md - - name: Publishing to the Gallery - items: - - name: Creating and publishing Packages - href: gallery/how-to/publishing-packages/publishing-a-package.md - - name: Creating a PowerShellGallery Account - href: gallery/how-to/publishing-packages/creating-an-account.md - - name: Unlisting Packages - href: gallery/how-to/publishing-packages/unlisting-packages.md - - name: Deleting Packages - href: gallery/how-to/publishing-packages/deleting-packages.md - - name: Managing Packages owners - href: gallery/how-to/publishing-packages/managing-package-owners.md - - name: Working with Packages - items: - - name: FileList view - href: gallery/how-to/working-with-packages/filelist-view.md - - name: Deploy to Azure Automation - href: gallery/how-to/working-with-packages/deploy-to-azure-automation.md - - name: Manual Package Download - href: gallery/how-to/working-with-packages/manual-download.md - - name: Packages that Require License Acceptance - href: gallery/how-to/working-with-packages/packages-that-require-license-acceptance.md - - name: Contacting Packages owners - href: gallery/how-to/working-with-packages/contacting-package-owners.md - - name: Managing Account Profile - items: - - name: PowerShell Gallery Account Settings - href: gallery/how-to/managing-profile/managing-account.md - - name: Managing API Keys - href: gallery/how-to/managing-profile/creating-apikeys.md - - name: Working with Private PowerShellGet Repositories - href: gallery/how-to/working-with-local-psrepositories.md - - name: Concepts - items: - - name: Publishing guidelines and best practices - href: gallery/concepts/publishing-guidelines.md - - name: Packages manifest and Gallery UI - href: gallery/concepts/package-manifest-affecting-ui.md - - name: Requiring Specific PSEditions - items: - - name: Writing Scripts with PSEditions Support - href: gallery/concepts/script-psedition-support.md - - name: Writing Modules with PSEdition support - href: gallery/concepts/module-psedition-support.md - - name: Requiring License Acceptance - items: - - name: Requiring License Acceptance for Scripts - href: gallery/concepts/script-license-acceptance.md - - name: Requiring License Acceptance for Modules - href: gallery/concepts/module-license-acceptance.md - - name: Defining Packages as PreRelease - items: - - name: Defining a Module as PreRelease - href: gallery/concepts/module-prerelease-support.md - - name: Defining a Script as PreRelease - href: gallery/concepts/script-prerelease-support.md - - name: PSScriptAnalyzer Rule Profile - href: gallery/concepts/scriptanalyzer-rule-profile.md - - name: Getting Support - items: - - name: Report Abuse - href: gallery/how-to/getting-support/report-abuse.md - - name: Dispute resolution - href: gallery/how-to/getting-support/dispute-resolution.md - - name: Contacting administrators - href: gallery/how-to/getting-support/contacting-administrators.md - - name: Troubleshooting - href: gallery/how-to/getting-support/troubleshooting-cmdlets.md - - name: Bootstrapping NuGet provider and NuGet.exe - href: gallery/how-to/getting-support/bootstrapping-nuget.md - - name: GDPR Compliance - href: gallery/how-to/getting-support/gdpr-dsr-policy.md - - name: Gallery FAQs - href: gallery/faqs.yml - name: Scripting and development items: - name: Visual Studio Code From 1ea1024ed523444e8b08b2ce08ba6325e294ddd0 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Thu, 18 Aug 2022 15:03:02 -0500 Subject: [PATCH 3/5] Fixes #9136 - Fix module specification hashtable docs (#9138) * Fix module specification hashtable docs * (GH-9138) Update ModuleSpecification params This commit updates the parameter documentation for the cmdlets that have the ModuleSpecification type to use the updated and corrected language. Co-authored-by: Michael Lombardi --- .../About/about_Requires.md | 12 +++---- .../About/about_Using.md | 10 +++--- .../Microsoft.PowerShell.Core/Get-Command.md | 24 ++++++++----- .../Microsoft.PowerShell.Core/Get-Module.md | 34 ++++++------------- .../Import-Module.md | 19 +++++++---- .../Remove-Module.md | 20 +++++++++-- .../Microsoft.PowerShell.Core/Save-Help.md | 29 ++++++++++------ .../Microsoft.PowerShell.Core/Update-Help.md | 25 ++++++++------ .../Export-PSSession.md | 29 ++++++++++------ .../Import-PSSession.md | 27 +++++++++------ .../About/about_Requires.md | 12 +++---- .../About/about_Using.md | 10 +++--- .../Microsoft.PowerShell.Core/Get-Command.md | 24 ++++++++----- .../Microsoft.PowerShell.Core/Get-Module.md | 34 ++++++------------- .../Import-Module.md | 19 +++++++---- .../Remove-Module.md | 20 +++++++++-- .../Microsoft.PowerShell.Core/Save-Help.md | 29 ++++++++++------ .../Microsoft.PowerShell.Core/Update-Help.md | 25 ++++++++------ .../Export-PSSession.md | 29 ++++++++++------ .../Import-PSSession.md | 27 +++++++++------ .../About/about_Requires.md | 12 +++---- .../About/about_Using.md | 10 +++--- .../Microsoft.PowerShell.Core/Get-Command.md | 24 ++++++++----- .../Microsoft.PowerShell.Core/Get-Module.md | 34 ++++++------------- .../Import-Module.md | 19 +++++++---- .../Remove-Module.md | 20 +++++++++-- .../Microsoft.PowerShell.Core/Save-Help.md | 29 ++++++++++------ .../Microsoft.PowerShell.Core/Update-Help.md | 25 ++++++++------ .../Export-PSSession.md | 29 ++++++++++------ .../Import-PSSession.md | 27 +++++++++------ .../About/about_Requires.md | 12 +++---- .../About/about_Using.md | 10 +++--- .../Microsoft.PowerShell.Core/Get-Command.md | 24 ++++++++----- .../Microsoft.PowerShell.Core/Get-Module.md | 34 ++++++------------- .../Import-Module.md | 19 +++++++---- .../Remove-Module.md | 20 +++++++++-- .../Microsoft.PowerShell.Core/Save-Help.md | 29 ++++++++++------ .../Microsoft.PowerShell.Core/Update-Help.md | 25 ++++++++------ .../Export-PSSession.md | 29 ++++++++++------ .../Import-PSSession.md | 27 +++++++++------ 40 files changed, 544 insertions(+), 372 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Requires.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Requires.md index 3ec0f356d60f..e6b795dba9c8 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Requires.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Requires.md @@ -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 @@ -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 (\) 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 (\) 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. diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Using.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Using.md index 2d9d17a5cf83..26b7cb94e232 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Using.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Using.md @@ -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 @@ -54,15 +54,15 @@ statement. When `` 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 diff --git a/reference/5.1/Microsoft.PowerShell.Core/Get-Command.md b/reference/5.1/Microsoft.PowerShell.Core/Get-Command.md index 058dd2b264b8..7229137f6400 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/Get-Command.md +++ b/reference/5.1/Microsoft.PowerShell.Core/Get-Command.md @@ -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 @@ -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. diff --git a/reference/5.1/Microsoft.PowerShell.Core/Get-Module.md b/reference/5.1/Microsoft.PowerShell.Core/Get-Module.md index b95d5a7f7864..98bef81da452 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/Get-Module.md +++ b/reference/5.1/Microsoft.PowerShell.Core/Get-Module.md @@ -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 @@ -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[] diff --git a/reference/5.1/Microsoft.PowerShell.Core/Import-Module.md b/reference/5.1/Microsoft.PowerShell.Core/Import-Module.md index 3daf2a3f87d6..911bc0560d1e 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/Import-Module.md +++ b/reference/5.1/Microsoft.PowerShell.Core/Import-Module.md @@ -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 @@ -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[] diff --git a/reference/5.1/Microsoft.PowerShell.Core/Remove-Module.md b/reference/5.1/Microsoft.PowerShell.Core/Remove-Module.md index f91419ef9767..0b12435282c3 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/Remove-Module.md +++ b/reference/5.1/Microsoft.PowerShell.Core/Remove-Module.md @@ -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 @@ -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[] diff --git a/reference/5.1/Microsoft.PowerShell.Core/Save-Help.md b/reference/5.1/Microsoft.PowerShell.Core/Save-Help.md index c629ed983e30..1e6067313ca3 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/Save-Help.md +++ b/reference/5.1/Microsoft.PowerShell.Core/Save-Help.md @@ -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 @@ -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[] diff --git a/reference/5.1/Microsoft.PowerShell.Core/Update-Help.md b/reference/5.1/Microsoft.PowerShell.Core/Update-Help.md index 8aaab9160db8..339c5350c0e7 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/Update-Help.md +++ b/reference/5.1/Microsoft.PowerShell.Core/Update-Help.md @@ -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 @@ -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. diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Export-PSSession.md b/reference/5.1/Microsoft.PowerShell.Utility/Export-PSSession.md index 2ce3e9db2945..647d1469bf74 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Export-PSSession.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Export-PSSession.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 04/05/2021 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/export-pssession?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: Export-PSSession @@ -357,19 +357,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[] diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Import-PSSession.md b/reference/5.1/Microsoft.PowerShell.Utility/Import-PSSession.md index 198418fcf14b..b718aaa78b62 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Import-PSSession.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Import-PSSession.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 04/05/2021 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/import-pssession?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: Import-PSSession @@ -486,18 +486,25 @@ 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#Microsoft_PowerShell_Commands_ModuleSpecification__ctor_System_Collections_Hashtable_) -in the PowerShell SDK. For example, the **FullyQualifiedModule** parameter accepts a module name -that is specified in the format: +The value can be a module name, a full module specification, or a path to a module file. -- `@{ModuleName = "modulename"; ModuleVersion = "version_number"}` or -- `@{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. -You cannot specify the **FullyQualifiedModule** parameter in the same command as a **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 can't specify the **FullyQualifiedModule** parameter in the same command as a **Module** parameter. The two parameters are mutually exclusive. ```yaml diff --git a/reference/7.0/Microsoft.PowerShell.Core/About/about_Requires.md b/reference/7.0/Microsoft.PowerShell.Core/About/about_Requires.md index 0aaba9fc520d..4a36611f7240 100644 --- a/reference/7.0/Microsoft.PowerShell.Core/About/about_Requires.md +++ b/reference/7.0/Microsoft.PowerShell.Core/About/about_Requires.md @@ -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-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Requires @@ -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 (\) 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 (\) 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. diff --git a/reference/7.0/Microsoft.PowerShell.Core/About/about_Using.md b/reference/7.0/Microsoft.PowerShell.Core/About/about_Using.md index ba3e772f1f47..2cf4c5e77aac 100644 --- a/reference/7.0/Microsoft.PowerShell.Core/About/about_Using.md +++ b/reference/7.0/Microsoft.PowerShell.Core/About/about_Using.md @@ -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-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Using @@ -59,15 +59,15 @@ statement. When `` 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 diff --git a/reference/7.0/Microsoft.PowerShell.Core/Get-Command.md b/reference/7.0/Microsoft.PowerShell.Core/Get-Command.md index 1859015fcf58..b68a63c5951f 100644 --- a/reference/7.0/Microsoft.PowerShell.Core/Get-Command.md +++ b/reference/7.0/Microsoft.PowerShell.Core/Get-Command.md @@ -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-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: Get-Command @@ -394,15 +394,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. diff --git a/reference/7.0/Microsoft.PowerShell.Core/Get-Module.md b/reference/7.0/Microsoft.PowerShell.Core/Get-Module.md index f14f4c4f6b88..3eda2625fa7d 100644 --- a/reference/7.0/Microsoft.PowerShell.Core/Get-Module.md +++ b/reference/7.0/Microsoft.PowerShell.Core/Get-Module.md @@ -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-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: Get-Module @@ -462,37 +462,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[] diff --git a/reference/7.0/Microsoft.PowerShell.Core/Import-Module.md b/reference/7.0/Microsoft.PowerShell.Core/Import-Module.md index e1f12bc944a6..c7e48989eccf 100644 --- a/reference/7.0/Microsoft.PowerShell.Core/Import-Module.md +++ b/reference/7.0/Microsoft.PowerShell.Core/Import-Module.md @@ -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-7&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -795,16 +795,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[] diff --git a/reference/7.0/Microsoft.PowerShell.Core/Remove-Module.md b/reference/7.0/Microsoft.PowerShell.Core/Remove-Module.md index d9b172eb2188..c64cd03b96c3 100644 --- a/reference/7.0/Microsoft.PowerShell.Core/Remove-Module.md +++ b/reference/7.0/Microsoft.PowerShell.Core/Remove-Module.md @@ -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-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: Remove-Module @@ -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[] diff --git a/reference/7.0/Microsoft.PowerShell.Core/Save-Help.md b/reference/7.0/Microsoft.PowerShell.Core/Save-Help.md index 33685df5e88e..758446de72b0 100644 --- a/reference/7.0/Microsoft.PowerShell.Core/Save-Help.md +++ b/reference/7.0/Microsoft.PowerShell.Core/Save-Help.md @@ -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-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: Save-Help @@ -287,19 +287,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[] diff --git a/reference/7.0/Microsoft.PowerShell.Core/Update-Help.md b/reference/7.0/Microsoft.PowerShell.Core/Update-Help.md index b43e3eb24b84..fdfd8f93d17b 100644 --- a/reference/7.0/Microsoft.PowerShell.Core/Update-Help.md +++ b/reference/7.0/Microsoft.PowerShell.Core/Update-Help.md @@ -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-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: Update-Help @@ -303,20 +303,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. diff --git a/reference/7.0/Microsoft.PowerShell.Utility/Export-PSSession.md b/reference/7.0/Microsoft.PowerShell.Utility/Export-PSSession.md index 9cfdf34d6201..caf2e811d02e 100644 --- a/reference/7.0/Microsoft.PowerShell.Utility/Export-PSSession.md +++ b/reference/7.0/Microsoft.PowerShell.Utility/Export-PSSession.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 04/05/2021 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/export-pssession?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: Export-PSSession @@ -365,19 +365,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[] diff --git a/reference/7.0/Microsoft.PowerShell.Utility/Import-PSSession.md b/reference/7.0/Microsoft.PowerShell.Utility/Import-PSSession.md index 085e6474b806..e319e61efdf3 100644 --- a/reference/7.0/Microsoft.PowerShell.Utility/Import-PSSession.md +++ b/reference/7.0/Microsoft.PowerShell.Utility/Import-PSSession.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 04/05/2021 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/import-pssession?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: Import-PSSession @@ -486,18 +486,25 @@ 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#Microsoft_PowerShell_Commands_ModuleSpecification__ctor_System_Collections_Hashtable_) -in the PowerShell SDK. For example, the **FullyQualifiedModule** parameter accepts a module name -that is specified in the format: +The value can be a module name, a full module specification, or a path to a module file. -- `@{ModuleName = "modulename"; ModuleVersion = "version_number"}` or -- `@{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. -You cannot specify the **FullyQualifiedModule** parameter in the same command as a **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 can't specify the **FullyQualifiedModule** parameter in the same command as a **Module** parameter. The two parameters are mutually exclusive. ```yaml diff --git a/reference/7.2/Microsoft.PowerShell.Core/About/about_Requires.md b/reference/7.2/Microsoft.PowerShell.Core/About/about_Requires.md index d1e33c67672b..de459984ccae 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/About/about_Requires.md +++ b/reference/7.2/Microsoft.PowerShell.Core/About/about_Requires.md @@ -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-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Requires @@ -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 (\) 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 (\) 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. diff --git a/reference/7.2/Microsoft.PowerShell.Core/About/about_Using.md b/reference/7.2/Microsoft.PowerShell.Core/About/about_Using.md index 2e8bf0c2fa25..eae7eff9c3a0 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/About/about_Using.md +++ b/reference/7.2/Microsoft.PowerShell.Core/About/about_Using.md @@ -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-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Using @@ -54,15 +54,15 @@ statement. When `` 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 diff --git a/reference/7.2/Microsoft.PowerShell.Core/Get-Command.md b/reference/7.2/Microsoft.PowerShell.Core/Get-Command.md index f733269c0f8f..25e4e0cd8470 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/Get-Command.md +++ b/reference/7.2/Microsoft.PowerShell.Core/Get-Command.md @@ -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-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: Get-Command @@ -412,15 +412,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. diff --git a/reference/7.2/Microsoft.PowerShell.Core/Get-Module.md b/reference/7.2/Microsoft.PowerShell.Core/Get-Module.md index 055426da1500..528c1141b872 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/Get-Module.md +++ b/reference/7.2/Microsoft.PowerShell.Core/Get-Module.md @@ -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-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: Get-Module @@ -462,37 +462,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[] diff --git a/reference/7.2/Microsoft.PowerShell.Core/Import-Module.md b/reference/7.2/Microsoft.PowerShell.Core/Import-Module.md index a835eb2ca46c..d0784d58b57e 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/Import-Module.md +++ b/reference/7.2/Microsoft.PowerShell.Core/Import-Module.md @@ -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-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -795,16 +795,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[] diff --git a/reference/7.2/Microsoft.PowerShell.Core/Remove-Module.md b/reference/7.2/Microsoft.PowerShell.Core/Remove-Module.md index 4f852bb4ef1c..e18b334e7cdc 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/Remove-Module.md +++ b/reference/7.2/Microsoft.PowerShell.Core/Remove-Module.md @@ -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-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: Remove-Module @@ -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[] diff --git a/reference/7.2/Microsoft.PowerShell.Core/Save-Help.md b/reference/7.2/Microsoft.PowerShell.Core/Save-Help.md index bf6bfc72fa81..49bdfa96e7bc 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/Save-Help.md +++ b/reference/7.2/Microsoft.PowerShell.Core/Save-Help.md @@ -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-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: Save-Help @@ -287,19 +287,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[] diff --git a/reference/7.2/Microsoft.PowerShell.Core/Update-Help.md b/reference/7.2/Microsoft.PowerShell.Core/Update-Help.md index 8a1a016be9fa..fdba4e0a3a4e 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/Update-Help.md +++ b/reference/7.2/Microsoft.PowerShell.Core/Update-Help.md @@ -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-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: Update-Help @@ -303,20 +303,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. diff --git a/reference/7.2/Microsoft.PowerShell.Utility/Export-PSSession.md b/reference/7.2/Microsoft.PowerShell.Utility/Export-PSSession.md index cc788f6549f5..27a2034c1bc6 100644 --- a/reference/7.2/Microsoft.PowerShell.Utility/Export-PSSession.md +++ b/reference/7.2/Microsoft.PowerShell.Utility/Export-PSSession.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 04/05/2021 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/export-pssession?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: Export-PSSession @@ -366,19 +366,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[] diff --git a/reference/7.2/Microsoft.PowerShell.Utility/Import-PSSession.md b/reference/7.2/Microsoft.PowerShell.Utility/Import-PSSession.md index 8b30b1636603..1b26692ce0f2 100644 --- a/reference/7.2/Microsoft.PowerShell.Utility/Import-PSSession.md +++ b/reference/7.2/Microsoft.PowerShell.Utility/Import-PSSession.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 04/05/2021 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/import-pssession?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: Import-PSSession @@ -486,18 +486,25 @@ 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#Microsoft_PowerShell_Commands_ModuleSpecification__ctor_System_Collections_Hashtable_) -in the PowerShell SDK. For example, the **FullyQualifiedModule** parameter accepts a module name -that is specified in the format: +The value can be a module name, a full module specification, or a path to a module file. -- `@{ModuleName = "modulename"; ModuleVersion = "version_number"}` or -- `@{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. -You cannot specify the **FullyQualifiedModule** parameter in the same command as a **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 can't specify the **FullyQualifiedModule** parameter in the same command as a **Module** parameter. The two parameters are mutually exclusive. ```yaml diff --git a/reference/7.3/Microsoft.PowerShell.Core/About/about_Requires.md b/reference/7.3/Microsoft.PowerShell.Core/About/about_Requires.md index 088f6bdb99ff..e517f4c4c906 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/About/about_Requires.md +++ b/reference/7.3/Microsoft.PowerShell.Core/About/about_Requires.md @@ -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-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Requires @@ -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 (\) 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 (\) 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. diff --git a/reference/7.3/Microsoft.PowerShell.Core/About/about_Using.md b/reference/7.3/Microsoft.PowerShell.Core/About/about_Using.md index 89b974c70d32..d848d39b2f61 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/About/about_Using.md +++ b/reference/7.3/Microsoft.PowerShell.Core/About/about_Using.md @@ -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-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Using @@ -54,15 +54,15 @@ statement. When `` 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 diff --git a/reference/7.3/Microsoft.PowerShell.Core/Get-Command.md b/reference/7.3/Microsoft.PowerShell.Core/Get-Command.md index 327787ca7635..7ac034bb831b 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/Get-Command.md +++ b/reference/7.3/Microsoft.PowerShell.Core/Get-Command.md @@ -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-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: Get-Command @@ -412,15 +412,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. diff --git a/reference/7.3/Microsoft.PowerShell.Core/Get-Module.md b/reference/7.3/Microsoft.PowerShell.Core/Get-Module.md index b6cbc56ed1a2..4050d3f66977 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/Get-Module.md +++ b/reference/7.3/Microsoft.PowerShell.Core/Get-Module.md @@ -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-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: Get-Module @@ -462,37 +462,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[] diff --git a/reference/7.3/Microsoft.PowerShell.Core/Import-Module.md b/reference/7.3/Microsoft.PowerShell.Core/Import-Module.md index f424741ee9de..aeb2ef5caf7a 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/Import-Module.md +++ b/reference/7.3/Microsoft.PowerShell.Core/Import-Module.md @@ -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-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -795,16 +795,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[] diff --git a/reference/7.3/Microsoft.PowerShell.Core/Remove-Module.md b/reference/7.3/Microsoft.PowerShell.Core/Remove-Module.md index b8606807ff62..5dda8845c302 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/Remove-Module.md +++ b/reference/7.3/Microsoft.PowerShell.Core/Remove-Module.md @@ -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-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: Remove-Module @@ -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[] diff --git a/reference/7.3/Microsoft.PowerShell.Core/Save-Help.md b/reference/7.3/Microsoft.PowerShell.Core/Save-Help.md index 60bb99de56db..2d34a0748d1f 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/Save-Help.md +++ b/reference/7.3/Microsoft.PowerShell.Core/Save-Help.md @@ -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-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: Save-Help @@ -287,19 +287,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[] diff --git a/reference/7.3/Microsoft.PowerShell.Core/Update-Help.md b/reference/7.3/Microsoft.PowerShell.Core/Update-Help.md index ea69b7d4c6a3..7b97a4160fa6 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/Update-Help.md +++ b/reference/7.3/Microsoft.PowerShell.Core/Update-Help.md @@ -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-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: Update-Help @@ -298,20 +298,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. diff --git a/reference/7.3/Microsoft.PowerShell.Utility/Export-PSSession.md b/reference/7.3/Microsoft.PowerShell.Utility/Export-PSSession.md index f1f83581ad77..44d45a088f79 100644 --- a/reference/7.3/Microsoft.PowerShell.Utility/Export-PSSession.md +++ b/reference/7.3/Microsoft.PowerShell.Utility/Export-PSSession.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 04/05/2021 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/export-pssession?view=powershell-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: Export-PSSession @@ -366,19 +366,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[] diff --git a/reference/7.3/Microsoft.PowerShell.Utility/Import-PSSession.md b/reference/7.3/Microsoft.PowerShell.Utility/Import-PSSession.md index c7b0a2ed8cfd..2cb980c25c5b 100644 --- a/reference/7.3/Microsoft.PowerShell.Utility/Import-PSSession.md +++ b/reference/7.3/Microsoft.PowerShell.Utility/Import-PSSession.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 04/05/2021 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/import-pssession?view=powershell-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: Import-PSSession @@ -486,18 +486,25 @@ 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#Microsoft_PowerShell_Commands_ModuleSpecification__ctor_System_Collections_Hashtable_) -in the PowerShell SDK. For example, the **FullyQualifiedModule** parameter accepts a module name -that is specified in the format: +The value can be a module name, a full module specification, or a path to a module file. -- `@{ModuleName = "modulename"; ModuleVersion = "version_number"}` or -- `@{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. -You cannot specify the **FullyQualifiedModule** parameter in the same command as a **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 can't specify the **FullyQualifiedModule** parameter in the same command as a **Module** parameter. The two parameters are mutually exclusive. ```yaml From 3311fc36c535898d4f0ba2e296fd81085241e309 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Thu, 18 Aug 2022 15:54:09 -0500 Subject: [PATCH 4/5] Add example of searching by tag (#9140) --- reference/5.1/PowershellGet/Find-Module.md | 28 +++++++++++++++++++- reference/7.0/PowerShellGet/Find-Module.md | 30 ++++++++++++++++++++-- reference/7.2/PowerShellGet/Find-Module.md | 30 ++++++++++++++++++++-- reference/7.3/PowerShellGet/Find-Module.md | 30 ++++++++++++++++++++-- 4 files changed, 111 insertions(+), 7 deletions(-) diff --git a/reference/5.1/PowershellGet/Find-Module.md b/reference/5.1/PowershellGet/Find-Module.md index de05d038e9e6..e7e7744b73ae 100644 --- a/reference/5.1/PowershellGet/Find-Module.md +++ b/reference/5.1/PowershellGet/Find-Module.md @@ -2,7 +2,7 @@ external help file: PSModule-help.xml Locale: en-US Module Name: PowerShellGet -ms.date: 03/11/2019 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/powershellget/find-module?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: Find-Module @@ -215,6 +215,32 @@ Version Name Repository Description The `Find-Module` cmdlet uses the **Filter** parameter to search the repository for **AppDomain**. +### Example 9: Find a module by tag + +This example shows how to find modules by a tag. The `CrescendoBuilt` value is a tag that is +automatically added to modules created using the **Microsoft.PowerShell.Crescendo** module. + +```powershell +Find-Module -Tag CrescendoBuilt +``` + +```Output +Version Name Repository Description +------- ---- ---------- ----------- +0.1.0 Foil PSGallery A PowerShell Crescendo wrapper for Chocolatey +0.3.1 Cobalt PSGallery A PowerShell Crescendo wrapper for WinGet +1.1.0 SysInternals PSGallery PowerShell cmdlets for SysInternal tools +0.0.4 Croze PSGallery A PowerShell Crescendo wrapper for Homebrew +0.0.2 AptPackage PSGallery PowerShell Crescendo-generated Module to query APT-Package Information +1.0.1 RoboCopy PSGallery PowerShell cmdlet for the official RoboCopy.exe +1.0.2 TShark PSGallery PowerShell cmdlet for tshark.exe +1.0.0 SpeedTestCLI PSGallery PowerShell cmdlets speedtest-cli +1.0.0 SpeedTest-CLI PSGallery PowerShell cmdlets for Internet Speed Test +1.0.2 Image2Text PSGallery PowerShell Images into ASCII art +0.1.1 Quser.Crescendo PSGallery This module displays session information of users logged onto a local or remote m... +1.0.2 Takeown PSGallery Crescendo Powershell wrapper of takeown.exe +``` + ## PARAMETERS ### -AllowPrerelease diff --git a/reference/7.0/PowerShellGet/Find-Module.md b/reference/7.0/PowerShellGet/Find-Module.md index bd99217d2500..17680dd581d9 100644 --- a/reference/7.0/PowerShellGet/Find-Module.md +++ b/reference/7.0/PowerShellGet/Find-Module.md @@ -2,7 +2,7 @@ external help file: PSModule-help.xml Locale: en-US Module Name: PowerShellGet -ms.date: 03/11/2019 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/powershellget/find-module?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: Find-Module @@ -214,6 +214,32 @@ Version Name Repository Description The `Find-Module` cmdlet uses the **Filter** parameter to search the repository for **AppDomain**. +### Example 9: Find a module by tag + +This example shows how to find modules by a tag. The `CrescendoBuilt` value is a tag that is +automatically added to modules created using the **Microsoft.PowerShell.Crescendo** module. + +```powershell +Find-Module -Tag CrescendoBuilt +``` + +```Output +Version Name Repository Description +------- ---- ---------- ----------- +0.1.0 Foil PSGallery A PowerShell Crescendo wrapper for Chocolatey +0.3.1 Cobalt PSGallery A PowerShell Crescendo wrapper for WinGet +1.1.0 SysInternals PSGallery PowerShell cmdlets for SysInternal tools +0.0.4 Croze PSGallery A PowerShell Crescendo wrapper for Homebrew +0.0.2 AptPackage PSGallery PowerShell Crescendo-generated Module to query APT-Package Information +1.0.1 RoboCopy PSGallery PowerShell cmdlet for the official RoboCopy.exe +1.0.2 TShark PSGallery PowerShell cmdlet for tshark.exe +1.0.0 SpeedTestCLI PSGallery PowerShell cmdlets speedtest-cli +1.0.0 SpeedTest-CLI PSGallery PowerShell cmdlets for Internet Speed Test +1.0.2 Image2Text PSGallery PowerShell Images into ASCII art +0.1.1 Quser.Crescendo PSGallery This module displays session information of users logged onto a local or remote m... +1.0.2 Takeown PSGallery Crescendo Powershell wrapper of takeown.exe +``` + ## PARAMETERS ### -AllowPrerelease @@ -221,7 +247,7 @@ The `Find-Module` cmdlet uses the **Filter** parameter to search the repository Includes in the results modules marked as a pre-release. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: diff --git a/reference/7.2/PowerShellGet/Find-Module.md b/reference/7.2/PowerShellGet/Find-Module.md index 9d27da90a1a5..5edfa7c2d8d4 100644 --- a/reference/7.2/PowerShellGet/Find-Module.md +++ b/reference/7.2/PowerShellGet/Find-Module.md @@ -2,7 +2,7 @@ external help file: PSModule-help.xml Locale: en-US Module Name: PowerShellGet -ms.date: 03/11/2019 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/powershellget/find-module?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: Find-Module @@ -214,6 +214,32 @@ Version Name Repository Description The `Find-Module` cmdlet uses the **Filter** parameter to search the repository for **AppDomain**. +### Example 9: Find a module by tag + +This example shows how to find modules by a tag. The `CrescendoBuilt` value is a tag that is +automatically added to modules created using the **Microsoft.PowerShell.Crescendo** module. + +```powershell +Find-Module -Tag CrescendoBuilt +``` + +```Output +Version Name Repository Description +------- ---- ---------- ----------- +0.1.0 Foil PSGallery A PowerShell Crescendo wrapper for Chocolatey +0.3.1 Cobalt PSGallery A PowerShell Crescendo wrapper for WinGet +1.1.0 SysInternals PSGallery PowerShell cmdlets for SysInternal tools +0.0.4 Croze PSGallery A PowerShell Crescendo wrapper for Homebrew +0.0.2 AptPackage PSGallery PowerShell Crescendo-generated Module to query APT-Package Information +1.0.1 RoboCopy PSGallery PowerShell cmdlet for the official RoboCopy.exe +1.0.2 TShark PSGallery PowerShell cmdlet for tshark.exe +1.0.0 SpeedTestCLI PSGallery PowerShell cmdlets speedtest-cli +1.0.0 SpeedTest-CLI PSGallery PowerShell cmdlets for Internet Speed Test +1.0.2 Image2Text PSGallery PowerShell Images into ASCII art +0.1.1 Quser.Crescendo PSGallery This module displays session information of users logged onto a local or remote m... +1.0.2 Takeown PSGallery Crescendo Powershell wrapper of takeown.exe +``` + ## PARAMETERS ### -AllowPrerelease @@ -406,7 +432,7 @@ Required: False Position: 0 Default value: None Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False +Accept wildcard characters: True ``` ### -Proxy diff --git a/reference/7.3/PowerShellGet/Find-Module.md b/reference/7.3/PowerShellGet/Find-Module.md index a38c9ecefce0..fdf81bfaf625 100644 --- a/reference/7.3/PowerShellGet/Find-Module.md +++ b/reference/7.3/PowerShellGet/Find-Module.md @@ -2,7 +2,7 @@ external help file: PSModule-help.xml Locale: en-US Module Name: PowerShellGet -ms.date: 03/11/2019 +ms.date: 08/18/2022 online version: https://docs.microsoft.com/powershell/module/powershellget/find-module?view=powershell-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: Find-Module @@ -214,6 +214,32 @@ Version Name Repository Description The `Find-Module` cmdlet uses the **Filter** parameter to search the repository for **AppDomain**. +### Example 9: Find a module by tag + +This example shows how to find modules by a tag. The `CrescendoBuilt` value is a tag that is +automatically added to modules created using the **Microsoft.PowerShell.Crescendo** module. + +```powershell +Find-Module -Tag CrescendoBuilt +``` + +```Output +Version Name Repository Description +------- ---- ---------- ----------- +0.1.0 Foil PSGallery A PowerShell Crescendo wrapper for Chocolatey +0.3.1 Cobalt PSGallery A PowerShell Crescendo wrapper for WinGet +1.1.0 SysInternals PSGallery PowerShell cmdlets for SysInternal tools +0.0.4 Croze PSGallery A PowerShell Crescendo wrapper for Homebrew +0.0.2 AptPackage PSGallery PowerShell Crescendo-generated Module to query APT-Package Information +1.0.1 RoboCopy PSGallery PowerShell cmdlet for the official RoboCopy.exe +1.0.2 TShark PSGallery PowerShell cmdlet for tshark.exe +1.0.0 SpeedTestCLI PSGallery PowerShell cmdlets speedtest-cli +1.0.0 SpeedTest-CLI PSGallery PowerShell cmdlets for Internet Speed Test +1.0.2 Image2Text PSGallery PowerShell Images into ASCII art +0.1.1 Quser.Crescendo PSGallery This module displays session information of users logged onto a local or remote m... +1.0.2 Takeown PSGallery Crescendo Powershell wrapper of takeown.exe +``` + ## PARAMETERS ### -AllowPrerelease @@ -406,7 +432,7 @@ Required: False Position: 0 Default value: None Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False +Accept wildcard characters: True ``` ### -Proxy From 8281d35ccbe61b119e3816f3a98ebbb2b0cc8f4b Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Thu, 18 Aug 2022 16:36:46 -0500 Subject: [PATCH 5/5] Add mainstream release NOTE blocks (#9142) --- .../learn/experimental-features.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/reference/docs-conceptual/learn/experimental-features.md b/reference/docs-conceptual/learn/experimental-features.md index 51b9bd0815ab..966b433238ea 100644 --- a/reference/docs-conceptual/learn/experimental-features.md +++ b/reference/docs-conceptual/learn/experimental-features.md @@ -1,6 +1,6 @@ --- description: Lists the currently available experimental features and how to use them. -ms.date: 08/12/2022 +ms.date: 08/18/2022 title: Using Experimental Features in PowerShell --- # Using Experimental Features in PowerShell @@ -35,14 +35,14 @@ Legend | Name | 7.0 | 7.1 | 7.2 | 7.3 | | ---------------------------------------------------------- | :--------------: | :--------------: | :--------------: | :--------------: | | PSNullConditionalOperators | ✔️ | ✅ | | | -| PSUnixFileStat (non-Windows only) | ✔️ | ✔️ | ✅ | | +| PSUnixFileStat (non-Windows only) | ✔️ | ✅ | | | | Microsoft.PowerShell.Utility.PSManageBreakpointsInRunspace | ✔️ | ✔️ | ✅ | | | PSCultureInvariantReplaceOperator | | ✔️ | ✅ | | | PSNotApplyErrorActionToStderr | | ✔️ | ✅ | | | PSImplicitRemotingBatching | ✔️ | ✔️ | ❌ | | | PSCommandNotFoundSuggestion | ✔️ | ✔️ | ✔️ | ✔️ | | PSDesiredStateConfiguration.InvokeDscResource | ✔️ | ✔️ | ✔️ | ✔️ | -| PSNativePSPathResolution | | ✔️ | ✔️ | ❌ | +| PSNativePSPathResolution | | ✔️ | ✔️ | ❌ | | PSSubsystemPluginModel | | ✔️ | ✔️ | ✔️ | | PSNativeCommandArgumentPassing | | | ✔️ | ✔️ | | PSAnsiRenderingFileInfo | | | ✔️ | ✔️ | @@ -162,6 +162,9 @@ gcs. ## PSCultureInvariantReplaceOperator +> [!NOTE] +> This feature became mainstream in PowerShell 7.2. + When the left-hand operand in a `-replace` operator statement is not a string, that operand is converted to a string. @@ -414,6 +417,9 @@ operating system. ## PSNotApplyErrorActionToStderr +> [!NOTE] +> This feature became mainstream in PowerShell 7.2. + When this experimental feature is enabled, error records redirected from native commands, like when using redirection operators (`2>&1`), are not written to the `$Error` variable and the preference variable `$ErrorActionPreference` does not affect the redirected output. @@ -427,6 +433,9 @@ When a native command has a non-zero exit code, `$?` is set to `$false`. If the ## PSNullConditionalOperators +> [!NOTE] +> This feature became mainstream in PowerShell 7.1. + Introduces new operators for Null conditional member access operators - `?.` and `?[]`. Null member access operators can be used on scalar types and array types. Return the value of the accessed member if the variable is not null. If the value of the variable is null, then return null.