diff --git a/help/en-US/PowerShellGet.dll-Help.xml b/help/en-US/PowerShellGet.dll-Help.xml
index 0afb8205c..56257ebcd 100644
--- a/help/en-US/PowerShellGet.dll-Help.xml
+++ b/help/en-US/PowerShellGet.dll-Help.xml
@@ -6,19 +6,19 @@
Find
PSResource
- Searches for packages from a repository (local or remote), based on `-Name` and other package properties.
+ Searches for packages from a repository (local or remote), based on a name or other package properties.
- The `Find-PSResource` cmdlet searches for a package from a repository (local or remote) based on `-Name` or other package properties.
+ The `Find-PSResource` cmdlet searches for a package from a repository (local or remote) based on a name or other package properties.
Find-PSResource
-
- Name
+
+ CommandName
- Name of a resource or resources to find. Accepts wild card character '*'.
+ The name of the command to search for.
System.String[]
@@ -42,7 +42,7 @@
IncludeDependencies
- When specified, search will return all matched resources along with any resources the matched resources depends on. Dependencies are deduplicated.
+ When specified, search returns all matching resources their dependencies. Dependencies are deduplicated.
System.Management.Automation.SwitchParameter
@@ -53,11 +53,12 @@
ModuleName
- Specifies a module resource package name type to search for. Wildcards are supported. Not yet implemented.
+ Specifies a module resource package name type to search for. Wildcards are supported.
+ Not yet implemented.
- System.String
+ System.String[]
- System.String
+ System.String[]
None
@@ -76,7 +77,9 @@
Repository
- Specifies one or more repository names to search, which can include wildcard. If not specified, search will include all currently registered repositories, in order of highest priority, until a repository is found that contains the package.
+ Specifies one or more repository names to search. Wildcards are supported.
+ If not specified, search includes all registered repositories, in priority order (highest first), until a repository is found that contains the package.
+ Lower Priority values have a higher precedence.
System.String[]
@@ -97,20 +100,104 @@
None
+
+ Version
+
+ Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
+ Wildcards are supported but NuGet only accepts wildcard character `*`. For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
+
+ System.String
+
+ System.String
+
+
+ None
+
+
+
+ Find-PSResource
- Type
+ Credential
- Specifies one or more resource types to find. Resource types supported are: Module, Script, Command, DscResource.
+ Optional credentials to be used when accessing a repository.
-
- Module
- Script
- DscResource
- Command
-
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ResourceType[]
+ System.Management.Automation.PSCredential
+
+ System.Management.Automation.PSCredential
+
+
+ None
+
+
+ DscResourceName
+
+ The name of the DSC Resource to search for.
+
+ System.String[]
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ResourceType[]
+ System.String[]
+
+
+ None
+
+
+ IncludeDependencies
+
+ When specified, search returns all matching resources their dependencies. Dependencies are deduplicated.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ ModuleName
+
+ Specifies a module resource package name type to search for. Wildcards are supported.
+ Not yet implemented.
+
+ System.String[]
+
+ System.String[]
+
+
+ None
+
+
+ Prerelease
+
+ When specified, includes prerelease versions in search results returned.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Repository
+
+ Specifies one or more repository names to search. Wildcards are supported.
+ If not specified, search includes all registered repositories, in priority order (highest first), until a repository is found that contains the package.
+ Lower Priority values have a higher precedence.
+
+ System.String[]
+
+ System.String[]
+
+
+ None
+
+
+ Tag
+
+ Filters search results for resources that include one or more of the specified tags.
+
+ System.String[]
+
+ System.String[]
None
@@ -119,7 +206,8 @@
Version
Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
- For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges)PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. So inputting "1.0.0.0" as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the values is considered as the required version and yields version 1.0.0.0 only (required version). To use the minimum inclusive range, provide `[1.0.0.0, ]` as the version range.
+ Wildcards are supported but NuGet only accepts wildcard character `*`. For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
System.String
@@ -128,10 +216,37 @@
None
-
- Confirm
+
+
+ Find-PSResource
+
+ Name
- Prompts you for confirmation before running the cmdlet.
+ Name of a resource to find. Wildcards are supported but NuGet only accepts the `*` character. NuGet does not support wildcard searches of local (file-based) repositories.
+
+ System.String[]
+
+ System.String[]
+
+
+ None
+
+
+ Credential
+
+ Optional credentials to be used when accessing a repository.
+
+ System.Management.Automation.PSCredential
+
+ System.Management.Automation.PSCredential
+
+
+ None
+
+
+ IncludeDependencies
+
+ When specified, search returns all matching resources their dependencies. Dependencies are deduplicated.
System.Management.Automation.SwitchParameter
@@ -139,10 +254,10 @@
False
-
- WhatIf
+
+ Prerelease
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ When specified, includes prerelease versions in search results returned.
System.Management.Automation.SwitchParameter
@@ -150,9 +265,83 @@
False
+
+ Repository
+
+ Specifies one or more repository names to search. Wildcards are supported.
+ If not specified, search includes all registered repositories, in priority order (highest first), until a repository is found that contains the package.
+ Lower Priority values have a higher precedence.
+
+ System.String[]
+
+ System.String[]
+
+
+ None
+
+
+ Tag
+
+ Filters search results for resources that include one or more of the specified tags.
+
+ System.String[]
+
+ System.String[]
+
+
+ None
+
+
+ Type
+
+ Specifies one or more resource types to find. Resource types supported are:
+ - `Module`
+ - `Script`
+ - `Command`
+ - `DscResource`
+
+
+ Module
+ Script
+ DscResource
+ Command
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ResourceType
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ResourceType
+
+
+ None
+
+
+ Version
+
+ Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
+ Wildcards are supported but NuGet only accepts wildcard character `*`. For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
+
+ System.String
+
+ System.String
+
+
+ None
+
+
+ CommandName
+
+ The name of the command to search for.
+
+ System.String[]
+
+ System.String[]
+
+
+ None
+
Credential
@@ -165,10 +354,22 @@
None
+
+ DscResourceName
+
+ The name of the DSC Resource to search for.
+
+ System.String[]
+
+ System.String[]
+
+
+ None
+
IncludeDependencies
- When specified, search will return all matched resources along with any resources the matched resources depends on. Dependencies are deduplicated.
+ When specified, search returns all matching resources their dependencies. Dependencies are deduplicated.
System.Management.Automation.SwitchParameter
@@ -180,19 +381,20 @@
ModuleName
- Specifies a module resource package name type to search for. Wildcards are supported. Not yet implemented.
+ Specifies a module resource package name type to search for. Wildcards are supported.
+ Not yet implemented.
- System.String
+ System.String[]
- System.String
+ System.String[]
None
-
+
Name
- Name of a resource or resources to find. Accepts wild card character '*'.
+ Name of a resource to find. Wildcards are supported but NuGet only accepts the `*` character. NuGet does not support wildcard searches of local (file-based) repositories.
System.String[]
@@ -216,7 +418,9 @@
Repository
- Specifies one or more repository names to search, which can include wildcard. If not specified, search will include all currently registered repositories, in order of highest priority, until a repository is found that contains the package.
+ Specifies one or more repository names to search. Wildcards are supported.
+ If not specified, search includes all registered repositories, in priority order (highest first), until a repository is found that contains the package.
+ Lower Priority values have a higher precedence.
System.String[]
@@ -240,11 +444,15 @@
Type
- Specifies one or more resource types to find. Resource types supported are: Module, Script, Command, DscResource.
+ Specifies one or more resource types to find. Resource types supported are:
+ - `Module`
+ - `Script`
+ - `Command`
+ - `DscResource`
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ResourceType[]
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ResourceType
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ResourceType[]
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ResourceType
None
@@ -253,7 +461,8 @@
Version
Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
- For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges)PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. So inputting "1.0.0.0" as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the values is considered as the required version and yields version 1.0.0.0 only (required version). To use the minimum inclusive range, provide `[1.0.0.0, ]` as the version range.
+ Wildcards are supported but NuGet only accepts wildcard character `*`. For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
System.String
@@ -262,30 +471,6 @@
None
-
- Confirm
-
- Prompts you for confirmation before running the cmdlet.
-
- System.Management.Automation.SwitchParameter
-
- System.Management.Automation.SwitchParameter
-
-
- False
-
-
- WhatIf
-
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
-
- System.Management.Automation.SwitchParameter
-
- System.Management.Automation.SwitchParameter
-
-
- False
-
@@ -315,88 +500,129 @@
-------------------------- Example 1 --------------------------
- PS C:\> Find-PSResource -Name "Microsoft.PowerShell.SecretManagement" -Repository PSGallery
- Name Version Prerelease Description
- ---- ------- ---------- -----------
- Microsoft.PowerShell.SecretManagement 1.0.0.0 This module ...
+ Find-PSResource -Name PowerShellGet -Repository PSGallery
+
+Name Version Prerelease Repository Description
+---- ------- ---------- ---------- -----------
+PowerShellGet 2.2.5.0 PSGallery PowerShell module with commands for discovering, installing, updating and …
- This examples searches for the package with `-Name` "Microsoft.PowerShell.SecretManagement". It returns the highest non-prerelease version for the package found by searching through the `-Repository` "PSGallery", which at the time of writing this example is version "1.0.0.0".
+
-------------------------- Example 2 --------------------------
- PS C:\> Find-PSResource -Name "Microsoft.PowerShell.SecretManagement" -Repository PSGallery -Prerelease
- Name Version Prerelease Description
- ---- ------- ---------- -----------
- Microsoft.PowerShell.SecretManagement 1.1.0.0 preview2 This module ...
+ Find-PSResource -Name PowerShellGet -Repository PSGallery -Prerelease
+
+Name Version Prerelease Repository Description
+---- ------- ---------- ---------- -----------
+PowerShellGet 3.0.14.0 beta14 PSGallery PowerShell module with commands for discovering, installing, updating and…
- This examples searches for the package with `-Name` "Microsoft.PowerShell.SecretManagement". It returns the highest version (including considering prerelease versions) for the package found by searching through the specified `-Repository` "PSGallery", which at the time of writing this example is version "1.1.0-preview2".
+
-------------------------- Example 3 --------------------------
- PS C:\> Find-PSResource -Name "Microsoft.PowerShell.SecretManagement" -Version "(0.9.0.0, 1.0.0.0]" -Repository PSGallery -Prerelease
- Name Version Prerelease Description
- ---- ------- ---------- -----------
- Microsoft.PowerShell.SecretManagement 0.9.1.0 This module ...
- Microsoft.PowerShell.SecretManagement 1.0.0.0 This module ...
+ Find-PSResource -Name "Microsoft.PowerShell.SecretManagement" -Version "(0.9.0.0, 1.2.0.0]" -Repository PSGallery -Prerelease
+
+Name Version Prerelease Repository Description
+---- ------- ---------- ---------- -----------
+Microsoft.PowerShell.SecretManagement 1.1.2.0 PSGallery …
+Microsoft.PowerShell.SecretManagement 1.1.1.0 PSGallery …
+Microsoft.PowerShell.SecretManagement 1.1.0.0 PSGallery …
+Microsoft.PowerShell.SecretManagement 1.0.0.0 PSGallery …
+Microsoft.PowerShell.SecretManagement 0.9.1.0 PSGallery …
- This examples searches for the package with `-Name` "Microsoft.PowerShell.SecretManagement". It returns all versions which satisfy the specified `-Version` range by looking through the specified `-Repository` "PSGallery". At the time of writing this example those satisfying versions are: "0.9.1.0" and "1.0.0.0".
+
-------------------------- Example 4 --------------------------
- PS C:\> Find-PSResource -CommandName "Get-TargetResource" -Repository PSGallery
- Name Version Prerelease ModuleName Repository
- ---- ------- ---------- ---------- ----------
- Get-TargetResource 3.1.0.0 xPowerShellExecutionPolicy PSGallery
- Get-TargetResource 1.0.0.4 WindowsDefender PSGallery
- Get-TargetResource 1.2.0.0 SystemLocaleDsc PSGallery
- Get-TargetResource 1.0.0.0 xInternetExplorerHomePage PSGallery
- Get-TargetResource 4.0.1055.0 OctopusDSC PSGallery
- Get-TargetResource 1.2.0.0 cRegFile PSGallery
- Get-TargetResource 1.1.0.0 cWindowsErrorReporting PSGallery
- Get-TargetResource 1.0.0.0 cVNIC PSGallery
- Get-TargetResource 1.1.17.0 supVsts PSGallery
+ Find-PSResource -CommandName Get-TargetResource -Repository PSGallery |
+ Select-Object -ExpandProperty ParentResource
+
+Name Version Prerelease Repository Description
+---- ------- ---------- ---------- -----------
+xPowerShellExecutionPolicy 3.1.0.0 PSGallery This DSC resource can change the user preference for the W…
+WindowsDefender 1.0.0.4 PSGallery Windows Defender module allows you to configure Windows De…
+SystemLocaleDsc 1.2.0.0 PSGallery This DSC Resource allows configuration of the Windows Syst…
+xInternetExplorerHomePage 1.0.0.0 PSGallery This DSC Resources can easily set an URL for the home page…
+OctopusDSC 4.0.1127.0 PSGallery Module with DSC resource to install and configure an Octop…
+cRegFile 1.2.0.0 PSGallery DSC resource which is designed to manage large numbers of …
+cWindowsErrorReporting 1.1.0.0 PSGallery DSC Resource to enable or disable Windows Error Reporting
+cVNIC 1.0.0.0 PSGallery DSC Module to create and configuring virutal network adapt…
+supVsts 1.1.17.0 PSGallery Dsc module for interfacing with VSTS.
- This examples searches for all module resources with `-CommandName` "Get-TargetResource" from the `-Repository` PSGallery. It returns all the module resources which include a command named "Get-TargetResource" and also lists the following information for each module resource: version, name (displayed under ModuleName) and repository. To access the rest of the properties of the parent module resource, you can access the `$_.ParentResource` of the PSIncludedResourceInfo object returned from the CommandName parameter set.
+
-------------------------- Example 5 --------------------------
- PS C:\> Find-PSResource -CommandName "Get-TargetResource" -ModuleName "SystemLocaleDsc" -Repository PSGallery
- Name Version Prerelease ModuleName Repository
- ---- ------- ---------- ---------- ----------
- Get-TargetResource 1.2.0.0 SystemLocaleDsc PSGallery
+ Find-PSResource -CommandName Get-TargetResource -ModuleName SystemLocaleDsc -Repository PSGallery |
+ Select-Object -ExpandProperty ParentResource
+
+Name Version Prerelease Repository Description
+---- ------- ---------- ---------- -----------
+SystemLocaleDsc 1.2.0.0 PSGallery This DSC Resource allows configuration of the Windows System Locale.
- This examples searches for a module resource with a command named "Get-TargetResource" (via the `-CommandName` parameter), specifically from the module resource "SystemLocaleDsc" (via the `-ModuleName` parameter) from the `-Repository` PSGallery. The "SystemLocaleDsc" resource does indeed include a command named Get-TargetResource so this resource will be returned. The returned object lists the name of the command (displayed under Name) and the following information for the parent module resource: version, name (displayed under ModuleName) and repository. To access the rest of the properties of the parent module resource, you can access the `$_.ParentResource` of the PSIncludedResourceInfo object returned from the CommandName parameter set.
+
-------------------------- Example 6 --------------------------
- PS C:\> Find-PSResource -DscResourceName "SystemLocale" -Repository PSGallery
- Name Version Prerelease ModuleName Repository
- ---- ------- ---------- ---------- ----------
- Get-TargetResource 8.5.0.0 ComputerManagementDsc PSGallery
- Get-TargetResource 1.2.0.0 SystemLocaleDsc PSGallery
+ Find-PSResource -DscResourceName SystemLocale -Repository PSGallery |
+ Select-Object -ExpandProperty ParentResource
+
+Name Version Prerelease Repository Description
+---- ------- ---------- ---------- -----------
+ComputerManagementDsc 8.5.0.0 PSGallery DSC resources for configuration of a Windows computer. These DSC r…
+SystemLocaleDsc 1.2.0.0 PSGallery This DSC Resource allows configuration of the Windows System Local…
- This examples searches for all module resources with `-DscResourceName` "SystemLocale" from the `-Repository` PSGallery. It returns all the module resources which include a DSC resource named "SystemLocale" and also lists the following information for each module resource: version, name (displayed under ModuleName) and repository. To access the rest of the properties of the parent module resource, you can access the `$_.ParentResource` of the PSIncludedResourceInfo object returned from the DSCResourceName parameter set.
+
-------------------------- Example 7 --------------------------
- PS C:\> Find-PSResource -Name *
+ Find-PSResource -Name Computer*
+
+Name Version Prerelease Repository Description
+---- ------- ---------- ---------- -----------
+ComputerManagementDsc 8.5.0.0 PSGallery DSC resources for configuration …
+ComputerManagement 1.1.2.3 PSGallery A PowerShell module for working …
+Computer_JoinDomain_Config 1.0.0.0 PSGalleryScripts This configuration sets the mach…
+Computer_UnjoinDomainAndJoinWorkgroup_Config 1.0.0.0 PSGalleryScripts This example switches the comput…
+Computer_SetComputerDescriptionInWorkgroup_Config 1.0.0.0 PSGalleryScripts This example will set the comput…
+Computer_JoinDomainSpecifyingDC_Config 1.0.0.0 PSGalleryScripts This configuration sets the mach…
+Computer_RenameComputerAndSetWorkgroup_Config 1.0.0.0 PSGalleryScripts This configuration will set the …
+Computer_RenameComputerInDomain_Config 1.0.0.0 PSGalleryScripts This example will change the mac…
+Computer_RenameComputerInWorkgroup_Config 1.0.0.0 PSGalleryScripts This example will set the machin…
+
+
+
+
+
+ -------------------------- Example 8 --------------------------
+ Find-PSResource -Tag CrescendoBuilt
+
+Name Version Prerelease Repository Description
+---- ------- ---------- ---------- -----------
+Foil 0.1.0.0 PSGallery A PowerShell Crescendo wrapper for Chocolatey
+Cobalt 0.3.1.0 PSGallery A PowerShell Crescendo wrapper for WinGet
+SysInternals 1.1.0.0 PSGallery PowerShell cmdlets for SysInternal tools
+Croze 0.0.4.0 PSGallery A PowerShell Crescendo wrapper for Homebrew
+AptPackage 0.0.2.0 PSGallery PowerShell Crescendo-generated Module to query APT-Package Information
+RoboCopy 1.0.1.0 PSGallery PowerShell cmdlet for the official RoboCopy.exe
+TShark 1.0.2.0 PSGallery PowerShell cmdlet for tshark.exe
+Image2Text 1.0.2.0 PSGallery PowerShell Images into ASCII art
+SpeedTestCLI 1.0.0.0 PSGallery PowerShell cmdlets speedtest-cli
+SpeedTest-CLI 1.0.0.0 PSGallery PowerShell cmdlets for Internet Speed Test
+Quser.Crescendo 0.1.1.0 PSGallery This module displays session information of users logged onto a local or…
+Takeown 1.0.2.0 PSGallery Crescendo Powershell wrapper of takeown.exe
- This will search all PSResources from registered PSResourceRepositories.
+
-
-
- <add>
-
-
-
+
@@ -404,19 +630,19 @@
Get
PSResource
- Returns resources (modules and scripts) installed on the machine via PowerShellGet.
+ Returns modules and scripts installed on the machine via PowerShellGet .
- The Get-PSResource cmdlet combines the Get-InstalledModule, Get-InstalledScript cmdlets from V2. It performs a search within module or script installation paths based on the -Name parameter argument. It returns PSResourceInfo objects which describes each resource item found. Other parameters allow the returned results to be filtered by version and path.
+ This cmdlet searches the module and script installation paths and returns PSResourceInfo objects that describes each resource item found. This is equivalent to the combined output of the `Get-InstalledModule` and `Get-InstalledScript` cmdlets from PowerShellGet v2.
Get-PSResource
-
+
Name
- Name of a resource or resources to find. Accepts wild card characters or a null value.
+ Name of a resource to find. Wildcards are supported but NuGet only accepts the `*` character. NuGet does not support wildcard searches of local (file-based) repositories.
System.String[]
@@ -437,19 +663,6 @@
None
-
- Version
-
- Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
- For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges)PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. So inputting "1.0.0.0" as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the values is considered as the required version and yields version 1.0.0.0 only (required version). To use the minimum inclusive range, provide `[1.0.0.0, ]` as the version range.
-
- System.String
-
- System.String
-
-
- None
-
Scope
@@ -466,13 +679,27 @@
None
+
+ Version
+
+ Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
+ For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
+
+ System.String
+
+ System.String
+
+
+ None
+
-
+
Name
- Name of a resource or resources to find. Accepts wild card characters or a null value.
+ Name of a resource to find. Wildcards are supported but NuGet only accepts the `*` character. NuGet does not support wildcard searches of local (file-based) repositories.
System.String[]
@@ -494,26 +721,27 @@
None
- Version
+ Scope
- Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
- For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges)PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. So inputting "1.0.0.0" as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the values is considered as the required version and yields version 1.0.0.0 only (required version). To use the minimum inclusive range, provide `[1.0.0.0, ]` as the version range.
+ Specifies the scope of the resource.
- System.String
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- System.String
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
None
- Scope
+ Version
- Specifies the scope of the resource.
+ Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
+ For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+ System.String
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+ System.String
None
@@ -529,58 +757,77 @@
-------------------------- Example 1 --------------------------
- PS C:\> Get-PSResource Az
+ Get-PSResource
- This will return versions (stable and prerelease) of the Az module installed via PowerShellGet.
+
-------------------------- Example 2 --------------------------
- PS C:\> Get-PSResource Az -version "1.0.0"
+ Get-PSResource Az
- This will return version 1.0.0 of the Az module.
+
-------------------------- Example 3 --------------------------
- PS C:\> Get-PSResource Az -version "(1.0.0, 3.0.0)"
+ Get-PSResource Az -Path .
- This will return all versions of the Az module within the specified range.
+
-------------------------- Example 4 --------------------------
- PS C:\> Get-PSResource Az -version "4.0.1-preview"
+ Get-PSResource Az -Version 1.0.0
- Assume that the package Az version 4.0.1-preview is already installed. This will return version 4.0.1-preview of the Az module.
+
-------------------------- Example 5 --------------------------
- PS C:\> Get-PSResource Az -version "4.0.1"
+ Get-PSResource Az -Version "(1.0.0, 3.0.0)"
- Assume that the package Az version 4.0.1-preview is already installed. This will not return Az version 4.0.1-preview as the full version (including prerelease label, i.e "4.0.1-preview") was not specified.
+
-------------------------- Example 6 --------------------------
- PS C:\> Get-PSResource Az -Version "[4.0.1, 4.0.2-preview]
+ Get-PSResource PowerShellGet -Version 3.0.14-beta14
+
+Name Version Prerelease Repository Description
+---- ------- ---------- ---------- -----------
+PowerShellGet 3.0.14 beta14 PSGallery PowerShell module with commands for discovering, installing, updating and …
- Assume that the following versions are already installed for package Az: 4.0.1-preview and 4.0.2-preview. This will only return version 4.0.2-preview as it is the only one which falls within the specified version range. Per NuGetVersion rules, a prerelease version is less than a stable version, so 4.0.1-preview is less than the 4.0.1 specified version so 4.0.1-preview does not fall within the specified version range and won't be returned.
+
-------------------------- Example 6 --------------------------
- PS C:\> Get-PSResource Az -Path .
+ Get-PSResource PowerShellGet -Version 3.0.14
- This will return all versions of the Az module that have been installed in the current directory.
+ There is no output from this command.
-------------------------- Example 7 --------------------------
- PS C:\> Get-PSResource
+ Get-PSResource PSReadLine
+
+Name Version Prerelease Repository Description
+---- ------- ---------- ---------- -----------
+PSReadLine 2.2.6 PSGallery Great command line editing in the PowerShell console host
+PSReadLine 2.2.5 PSGallery Great command line editing in the PowerShell console host
+PSReadLine 2.2.2 PSGallery Great command line editing in the PowerShell console host
+PSReadLine 2.2.0 beta4 PSGallery Great command line editing in the PowerShell console host
+
+Get-PSResource PSReadLine -Version '[2.2.0, 2.3.0]'
+
+Name Version Prerelease Repository Description
+---- ------- ---------- ---------- -----------
+PSReadLine 2.2.6 PSGallery Great command line editing in the PowerShell console host
+PSReadLine 2.2.5 PSGallery Great command line editing in the PowerShell console host
+PSReadLine 2.2.2 PSGallery Great command line editing in the PowerShell console host
- This will return all versions and scripts installed on the machine.
+ According to NuGet version rules a prerelease version is less than a stable version, so `2.2.0-beta4` is less than the `2.2.0` version in the specified version range.
@@ -596,7 +843,7 @@
- The Get-PSResourceRepository cmdlet searches for the PowerShell resource repositories that are registered on the machine. By default it will return all registered repositories, or if the `-Name` parameter argument is specified then it will return the repository which matches that name. It returns PSRepositoryInfo objects which contain information for each repository item found.
+ This cmdlet searches for PowerShell resource repositories that are registered on the machine. By default, it returns all registered repositories.
@@ -604,11 +851,11 @@
Name
- This parameter takes a String argument, including wildcard characters, or an array of such String arguments. It is used to search for repository names from the repository store which match the provided name pattern. Tab completion is provided on this argument and will display registered repository names.
+ The name of the repository to search for. Wildcards are supported. Tab completion for this parameter cycles through the registered repository names.
- String[]
+ System.String[]
- String[]
+ System.String[]
None
@@ -619,11 +866,11 @@
Name
- This parameter takes a String argument, including wildcard characters, or an array of such String arguments. It is used to search for repository names from the repository store which match the provided name pattern. Tab completion is provided on this argument and will display registered repository names.
+ The name of the repository to search for. Wildcards are supported. Tab completion for this parameter cycles through the registered repository names.
- String[]
+ System.String[]
- String[]
+ System.String[]
None
@@ -651,52 +898,56 @@
- If no value for Name is provided, Get-PSResourceRepository will return information for all registered repositories.
+
-------------------------- Example 1 --------------------------
- PS C:\> Get-PSResourceRepository -Name "PSGallery"
- Name Uri Trusted Priority
- ---- --- ------- --------
- PSGallery https://www.powershellgallery.com/api/v2 False 50
+ Get-PSResourceRepository
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
+PSGallery https://www.powershellgallery.com/api/v2 False 50
+psgettestlocal file:///c:/code/testdir True 50
- This example runs the command with the 'Name' parameter being set to "PSGallery". This repository is registered on this machine so the command returns information on this repository.
+
-------------------------- Example 2 --------------------------
- PS C:\> Get-PSResourceRepository -Name "*Gallery"
- Name Uri Trusted Priority
- ---- --- ------- --------
- PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
- PSGallery https://www.powershellgallery.com/api/v2 False 50
+ Get-PSResourceRepository -Name PSGallery
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PSGallery https://www.powershellgallery.com/api/v2 False 50
- This example runs the command with the 'Name' parameter being set to "*Gallery" which includes a wildcard. The following repositories are registered on this machine and match the name pattern, so the command returns information on these repositories.
+
-------------------------- Example 3 --------------------------
- PS C:\> Get-PSResourceRepository -Name "PSGallery","PoshTestGallery"
- Name Uri Trusted Priority
- ---- --- ------- --------
- PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
- PSGallery https://www.powershellgallery.com/api/v2 False 50
+ Get-PSResourceRepository -Name "*Gallery"
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
+PSGallery https://www.powershellgallery.com/api/v2 False 50
- This example runs the command with the 'Name' parameter being set to an array of Strings. Both of the specified repositories are registered on this machine and match the name pattern, so the command returns information on these repositories.
+
-------------------------- Example 4 --------------------------
- PS C:\> Get-PSResourceRepository -Name "*"
- Name Uri Trusted Priority
- ---- --- ------- --------
- PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
- PSGallery https://www.powershellgallery.com/api/v2 False 50
- psgettestlocal file:///c:/code/testdir True 50
+ Get-PSResourceRepository -Name "PSGallery","PoshTestGallery"
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
+PSGallery https://www.powershellgallery.com/api/v2 False 50
- This example runs the command with the 'Name' parameter being set to a single wildcard character. So all the repositories registered on this machine are returned.
+
@@ -708,44 +959,158 @@
Install
PSResource
- Installs resources (modules and scripts) from a registered repository onto the machine.
+ Installs resources from a registered repository.
- The Install-PSResource cmdlet combines the Install-Module and Install-Script cmdlets from V2. It installs a resource from a registered repository to an installation path on a machine based on the -Name parameter argument. It does not return any object. Other parameters allow the resource to be specified by repository and version, and allow the user to suppress prompts or specify the scope of installation.
+ This cmdlet installs resources from a registered repository to an installation path on a machine. By default, the cmdlet doesn't return any object. Other parameters allow you to specify the repository, scope, and version for a resource, and suppress license prompts.
+ This cmdlet combines the functions of the `Install-Module` and `Install-Script` cmdlets from PowerShellGet v2.
Install-PSResource
-
- Name
+
+ AcceptLicense
+
+ Specifies that the resource should accept any request to accept the license agreement. This suppresses prompting if the module mandates that a user accept the license agreement.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ AuthenticodeCheck
+
+ Validates Authenticode signatures and catalog files on Windows.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Credential
+
+ Optional credentials used when accessing a repository.
+
+ System.Management.Automation.PSCredential
+
+ System.Management.Automation.PSCredential
+
+
+ None
+
+
+ InputObject
+
+ Used for pipeline input.
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+
+
+ None
+
+
+ NoClobber
+
+ Prevents installing a package that contains cmdlets that already exist on the machine.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ PassThru
+
+ When specified, outputs a PSResourceInfo object for the saved resource.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ TemporaryPath
+
+ Specifies the path to temporarily install the resource before actual installation. If no temporary path is provided, the resource is temporarily installed in the current user's temporary folder.
+
+ System.String
+
+ System.String
+
+
+ None
+
+
+ Quiet
+
+ Suppresses installation progress bar.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Reinstall
+
+ Installs the latest version of a module even if the latest version is already installed. The installed version is overwritten. This allows you to repair a damaged installation of the module.
+ If an older version of the module is installed, the new version is installed side-by-side in a new version-specific folder.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Scope
- Name of a resource or resources to install. Does not accept wildcard characters or a null value.
+ Specifies the installation scope. Accepted values are:
+ - `CurrentUser`
+ - `AllUsers`
+
+ The default scope is `CurrentUser`, which doesn't require elevation for install.
+ The `AllUsers` scope installs modules in a location accessible to all users of the computer. For example:
+ - `$env:ProgramFiles\PowerShell\Modules`
+ The `CurrentUser` installs modules in a location accessible only to the current user of the computer. For example:
+ - `$home\Documents\PowerShell\Modules`
- System.String[]
+
+ CurrentUser
+ AllUsers
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- System.String[]
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
None
- Version
+ SkipDependencyCheck
- Specifies the version of the resource to be installed. The value can be an exact version or a version range using the NuGet versioning syntax.
- For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges)PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. So inputting "1.0.0.0" as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the values is considered as the required version and yields version 1.0.0.0 only (required version). To use the minimum inclusive range, provide `[1.0.0.0, ]` as the version range.
+ Skips the check for resource dependencies. Only found resources are installed. No resources of the found resource are installed.
- System.String
- System.String
+ System.Management.Automation.SwitchParameter
- None
+ False
- Prerelease
+ TrustRepository
- When specified, includes prerelease versions in search results returned.
+ Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository isn't configured as trusted.
System.Management.Automation.SwitchParameter
@@ -753,10 +1118,35 @@
False
-
- Repository
+
+ Confirm
+
+ Prompts you for confirmation before running the cmdlet.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ WhatIf
+
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+
+ Install-PSResource
+
+ Name
- Specifies one or more repository names to search. If not specified, search will include all currently registered repositories, in order of highest priority, until first repository package is found in.
+ The name of one or more resources to install.
System.String[]
@@ -765,10 +1155,32 @@
None
+
+ AcceptLicense
+
+ Specifies that the resource should accept any request to accept the license agreement. This suppresses prompting if the module mandates that a user accept the license agreement.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ AuthenticodeCheck
+
+ Validates Authenticode signatures and catalog files on Windows.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
Credential
- Optional credentials to be used when accessing a repository.
+ Optional credentials used when accessing a repository.
System.Management.Automation.PSCredential
@@ -778,25 +1190,20 @@
None
- Scope
+ NoClobber
- Specifies the scope under which a user has access.
+ Prevents installing a package that contains cmdlets that already exist on the machine.
-
- CurrentUser
- AllUsers
-
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+ System.Management.Automation.SwitchParameter
- None
+ False
- TrustRepository
+ PassThru
- Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository is not already set to a trusted level.
+ When specified, outputs a PSResourceInfo object for the saved resource.
System.Management.Automation.SwitchParameter
@@ -805,9 +1212,21 @@
False
- Reinstall
+ TemporaryPath
+
+ Specifies the path to temporarily install the resource before actual installation. If no temporary path is provided, the resource is temporarily installed in the current user's temporary folder.
+
+ System.String
+
+ System.String
+
+
+ None
+
+
+ Prerelease
- Writes over any previously installed resource version that already exists on the machine.
+ When specified, includes prerelease versions in search results returned.
System.Management.Automation.SwitchParameter
@@ -818,7 +1237,7 @@
Quiet
- Supresses installation progress bar.
+ Suppresses installation progress bar.
System.Management.Automation.SwitchParameter
@@ -827,9 +1246,10 @@
False
- AcceptLicense
+ Reinstall
- Specifies that the resource should accept any request to accept license. This will suppress prompting if the module mandates that a user accept their license.
+ Installs the latest version of a module even if the latest version is already installed. The installed version is overwritten. This allows you to repair a damaged installation of the module.
+ If an older version of the module is installed, the new version is installed side-by-side in a new version-specific folder.
System.Management.Automation.SwitchParameter
@@ -838,31 +1258,47 @@
False
- NoClobber
+ Repository
- Prevents installing a package that contains cmdlets that already exist on the machine.
+ Specifies one or more repository names to search. Wildcards are supported.
+ If not specified, search includes all registered repositories, in priority order (highest first), until a repository is found that contains the package.
+ Lower Priority values have a higher precedence.
+ System.String[]
- System.Management.Automation.SwitchParameter
+ System.String[]
- False
+ None
- SkipDependencyCheck
+ Scope
- Skips the check for resource dependencies, so that only found resources are installed, and not any resources the found resource depends on.
+ Specifies the installation scope. Accepted values are:
+ - `CurrentUser`
+ - `AllUsers`
+
+ The default scope is `CurrentUser`, which doesn't require elevation for install.
+ The `AllUsers` scope installs modules in a location accessible to all users of the computer. For example:
+ - `$env:ProgramFiles\PowerShell\Modules`
+ The `CurrentUser` installs modules in a location accessible only to the current user of the computer. For example:
+ - `$home\Documents\PowerShell\Modules`
+
+ CurrentUser
+ AllUsers
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- System.Management.Automation.SwitchParameter
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- False
+ None
- AuthenticodeCheck
+ SkipDependencyCheck
- Does a check to to validate signed files and catalog files on Windows.
+ Skips the check for resource dependencies. Only found resources are installed. No resources of the found resource are installed.
System.Management.Automation.SwitchParameter
@@ -871,9 +1307,9 @@
False
- PassThru
+ TrustRepository
- Passes the resource installed to the console.
+ Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository isn't configured as trusted.
System.Management.Automation.SwitchParameter
@@ -881,14 +1317,16 @@
False
-
- InputObject
+
+ Version
- Used for pipeline input.
+ Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
+ For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.String
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.String
None
@@ -907,7 +1345,7 @@
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -918,92 +1356,56 @@
Install-PSResource
-
+
RequiredResource
- A hashtable or json string which specifies resources to install. Does not accept wildcard characters or a null value.
- The hashtable will take a format with the module attributes like the following example
-
- @{
- TestModule = @{
- version = "[0.0.1,1.3.0]"
- repository = "PSGallery"
- }
-
- TestModulePrerelease = @{
- version = "[0.0.0,0.0.5]"
- repository = "PSGallery"
- prerelease = "true"
- }
-
- TestModule99 = @{}
- }
-
- A json string will take the following example format
-
- {
- "TestModule": {
- "version": "[0.0.1,1.3.0)",
- "repository": "PSGallery"
- },
- "TestModulePrerelease": {
- "version": "[0.0.0,0.0.5]",
- "repository": "PSGallery",
- "prerelease": "true"
- },
- "TestModule99": {}
- }
+ A hashtable or JSON string that specifies resources to install. Wildcard characters aren't allowed. See the NOTES (#notes)section for a description of the file formats.
- RequiredResource
+ System.Object
- RequiredResource
+ System.Object
None
- Credential
+ AcceptLicense
- Optional credentials to be used when accessing a repository.
+ Specifies that the resource should accept any request to accept the license agreement. This suppresses prompting if the module mandates that a user accept the license agreement.
- System.Management.Automation.PSCredential
- System.Management.Automation.PSCredential
+ System.Management.Automation.SwitchParameter
- None
+ False
- Scope
+ AuthenticodeCheck
- Specifies the scope under which a user has access.
+ Validates Authenticode signatures and catalog files on Windows.
-
- CurrentUser
- AllUsers
-
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+ System.Management.Automation.SwitchParameter
- None
+ False
- TrustRepository
+ Credential
- Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository is not already set to a trusted level.
+ Optional credentials used when accessing a repository.
+ System.Management.Automation.PSCredential
- System.Management.Automation.SwitchParameter
+ System.Management.Automation.PSCredential
- False
+ None
- Reinstall
+ NoClobber
- Writes over any previously installed resource version that already exists on the machine.
+ Prevents installing a package that contains cmdlets that already exist on the machine.
System.Management.Automation.SwitchParameter
@@ -1012,9 +1414,9 @@
False
- Quiet
+ PassThru
- Supresses installation progress bar.
+ When specified, outputs a PSResourceInfo object for the saved resource.
System.Management.Automation.SwitchParameter
@@ -1023,20 +1425,21 @@
False
- AcceptLicense
+ TemporaryPath
- Specifies that the resource should accept any request to accept license. This will suppress prompting if the module mandates that a user accept their license.
+ Specifies the path to temporarily install the resource before actual installation. If no temporary path is provided, the resource is temporarily installed in the current user's temporary folder.
+ System.String
- System.Management.Automation.SwitchParameter
+ System.String
- False
+ None
- NoClobber
+ Quiet
- Prevents installing a package that contains cmdlets that already exist on the machine.
+ Suppresses installation progress bar.
System.Management.Automation.SwitchParameter
@@ -1045,9 +1448,10 @@
False
- SkipDependencyCheck
+ Reinstall
- Skips the check for resource dependencies, so that only found resources are installed, and not any resources the found resource depends on.
+ Installs the latest version of a module even if the latest version is already installed. The installed version is overwritten. This allows you to repair a damaged installation of the module.
+ If an older version of the module is installed, the new version is installed side-by-side in a new version-specific folder.
System.Management.Automation.SwitchParameter
@@ -1056,20 +1460,33 @@
False
- AuthenticodeCheck
+ Scope
- Does a check to to validate signed files and catalog files on Windows.
+ Specifies the installation scope. Accepted values are:
+ - `CurrentUser`
+ - `AllUsers`
+
+ The default scope is `CurrentUser`, which doesn't require elevation for install.
+ The `AllUsers` scope installs modules in a location accessible to all users of the computer. For example:
+ - `$env:ProgramFiles\PowerShell\Modules`
+ The `CurrentUser` installs modules in a location accessible only to the current user of the computer. For example:
+ - `$home\Documents\PowerShell\Modules`
+
+ CurrentUser
+ AllUsers
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- System.Management.Automation.SwitchParameter
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- False
+ None
- PassThru
+ SkipDependencyCheck
- Passes the resource installed to the console.
+ Skips the check for resource dependencies. Only found resources are installed. No resources of the found resource are installed.
System.Management.Automation.SwitchParameter
@@ -1077,17 +1494,16 @@
False
-
- InputObject
+
+ TrustRepository
- Used for pipeline input.
+ Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository isn't configured as trusted.
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.Management.Automation.SwitchParameter
- None
+ False
Confirm
@@ -1103,7 +1519,7 @@
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -1114,92 +1530,56 @@
Install-PSResource
-
+
RequiredResourceFile
- Path to a psd1 or json which specifies resources to install. Does not accept wildcard characters or a null value.
- The psd1 will take a hashtable format with the module attributes like the following example
-
- @{
- TestModule = @{
- version = "[0.0.1,1.3.0]"
- repository = "PSGallery"
- }
-
- TestModulePrerelease = @{
- version = "[0.0.0,0.0.5]"
- repository = "PSGallery"
- prerelease = "true"
- }
-
- TestModule99 = @{}
- }
-
- json files will take the following example format
-
- {
- "TestModule": {
- "version": "[0.0.1,1.3.0)",
- "repository": "PSGallery"
- },
- "TestModulePrerelease": {
- "version": "[0.0.0,0.0.5]",
- "repository": "PSGallery",
- "prerelease": "true"
- },
- "TestModule99": {}
- }
+ Path to a `.psd1` or `.json` that specifies resources to install. Wildcard characters aren't allowed. See the NOTES (#notes)section for a description of the file formats.
- System.String[]
+ System.String
- System.String[]
+ System.String
None
- Credential
+ AcceptLicense
- Optional credentials to be used when accessing a repository.
+ Specifies that the resource should accept any request to accept the license agreement. This suppresses prompting if the module mandates that a user accept the license agreement.
- System.Management.Automation.PSCredential
- System.Management.Automation.PSCredential
+ System.Management.Automation.SwitchParameter
- None
+ False
- Scope
+ AuthenticodeCheck
- Specifies the scope under which a user has access.
+ Validates Authenticode signatures and catalog files on Windows.
-
- CurrentUser
- AllUsers
-
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+ System.Management.Automation.SwitchParameter
- None
+ False
- TrustRepository
+ Credential
- Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository is not already set to a trusted level.
+ Optional credentials used when accessing a repository.
+ System.Management.Automation.PSCredential
- System.Management.Automation.SwitchParameter
+ System.Management.Automation.PSCredential
- False
+ None
- Reinstall
+ NoClobber
- Writes over any previously installed resource version that already exists on the machine.
+ Prevents installing a package that contains cmdlets that already exist on the machine.
System.Management.Automation.SwitchParameter
@@ -1208,9 +1588,9 @@
False
- Quiet
+ PassThru
- Supresses installation progress bar.
+ When specified, outputs a PSResourceInfo object for the saved resource.
System.Management.Automation.SwitchParameter
@@ -1219,20 +1599,21 @@
False
- AcceptLicense
+ TemporaryPath
- Specifies that the resource should accept any request to accept license. This will suppress prompting if the module mandates that a user accept their license.
+ Specifies the path to temporarily install the resource before actual installation. If no temporary path is provided, the resource is temporarily installed in the current user's temporary folder.
+ System.String
- System.Management.Automation.SwitchParameter
+ System.String
- False
+ None
- NoClobber
+ Quiet
- Prevents installing a package that contains cmdlets that already exist on the machine.
+ Suppresses installation progress bar.
System.Management.Automation.SwitchParameter
@@ -1241,9 +1622,10 @@
False
- SkipDependencyCheck
+ Reinstall
- Skips the check for resource dependencies, so that only found resources are installed, and not any resources the found resource depends on.
+ Installs the latest version of a module even if the latest version is already installed. The installed version is overwritten. This allows you to repair a damaged installation of the module.
+ If an older version of the module is installed, the new version is installed side-by-side in a new version-specific folder.
System.Management.Automation.SwitchParameter
@@ -1252,20 +1634,33 @@
False
- AuthenticodeCheck
+ Scope
- Does a check to to validate signed files and catalog files on Windows.
+ Specifies the installation scope. Accepted values are:
+ - `CurrentUser`
+ - `AllUsers`
+
+ The default scope is `CurrentUser`, which doesn't require elevation for install.
+ The `AllUsers` scope installs modules in a location accessible to all users of the computer. For example:
+ - `$env:ProgramFiles\PowerShell\Modules`
+ The `CurrentUser` installs modules in a location accessible only to the current user of the computer. For example:
+ - `$home\Documents\PowerShell\Modules`
+
+ CurrentUser
+ AllUsers
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- System.Management.Automation.SwitchParameter
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- False
+ None
- PassThru
+ SkipDependencyCheck
- Passes the resource installed to the console.
+ Skips the check for resource dependencies. Only found resources are installed. No resources of the found resource are installed.
System.Management.Automation.SwitchParameter
@@ -1273,17 +1668,16 @@
False
-
- InputObject
+
+ TrustRepository
- Used for pipeline input.
+ Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository isn't configured as trusted.
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.Management.Automation.SwitchParameter
- None
+ False
Confirm
@@ -1299,7 +1693,7 @@
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -1310,35 +1704,22 @@
-
- Name
-
- Name of a resource or resources to install. Does not accept wildcard characters or a null value.
-
- System.String[]
-
- System.String[]
-
-
- None
-
- Version
+ AcceptLicense
- Specifies the version of the resource to be installed. The value can be an exact version or a version range using the NuGet versioning syntax.
- For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges)PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. So inputting "1.0.0.0" as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the values is considered as the required version and yields version 1.0.0.0 only (required version). To use the minimum inclusive range, provide `[1.0.0.0, ]` as the version range.
+ Specifies that the resource should accept any request to accept the license agreement. This suppresses prompting if the module mandates that a user accept the license agreement.
- System.String
+ System.Management.Automation.SwitchParameter
- System.String
+ System.Management.Automation.SwitchParameter
- None
+ False
- Prerelease
+ AuthenticodeCheck
- When specified, includes prerelease versions in search results returned.
+ Validates Authenticode signatures and catalog files on Windows.
System.Management.Automation.SwitchParameter
@@ -1348,95 +1729,33 @@
False
- Repository
+ Credential
- Specifies one or more repository names to search. If not specified, search will include all currently registered repositories, in order of highest priority, until first repository package is found in.
+ Optional credentials used when accessing a repository.
- System.String[]
+ System.Management.Automation.PSCredential
- System.String[]
+ System.Management.Automation.PSCredential
None
-
- RequiredResource
+
+ InputObject
- A hashtable or json string which specifies resources to install. Does not accept wildcard characters or a null value.
- The hashtable will take a format with the module attributes like the following example
-
- @{
- TestModule = @{
- version = "[0.0.1,1.3.0]"
- repository = "PSGallery"
- }
-
- TestModulePrerelease = @{
- version = "[0.0.0,0.0.5]"
- repository = "PSGallery"
- prerelease = "true"
- }
-
- TestModule99 = @{}
- }
-
- A json string will take the following example format
-
- {
- "TestModule": {
- "version": "[0.0.1,1.3.0)",
- "repository": "PSGallery"
- },
- "TestModulePrerelease": {
- "version": "[0.0.0,0.0.5]",
- "repository": "PSGallery",
- "prerelease": "true"
- },
- "TestModule99": {}
- }
-
- RequiredResource
+ Used for pipeline input.
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
- RequiredResource
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
None
- RequiredResourceFile
+ Name
- Path to a psd1 or json which specifies resources to install. Does not accept wildcard characters or a null value.
- The psd1 will take a hashtable format with the module attributes like the following example
-
- @{
- TestModule = @{
- version = "[0.0.1,1.3.0]"
- repository = "PSGallery"
- }
-
- TestModulePrerelease = @{
- version = "[0.0.0,0.0.5]"
- repository = "PSGallery"
- prerelease = "true"
- }
-
- TestModule99 = @{}
- }
-
- json files will take the following example format
-
- {
- "TestModule": {
- "version": "[0.0.1,1.3.0)",
- "repository": "PSGallery"
- },
- "TestModulePrerelease": {
- "version": "[0.0.0,0.0.5]",
- "repository": "PSGallery",
- "prerelease": "true"
- },
- "TestModule99": {}
- }
+ The name of one or more resources to install.
System.String[]
@@ -1446,45 +1765,45 @@
None
- Credential
+ NoClobber
- Optional credentials to be used when accessing a repository.
+ Prevents installing a package that contains cmdlets that already exist on the machine.
- System.Management.Automation.PSCredential
+ System.Management.Automation.SwitchParameter
- System.Management.Automation.PSCredential
+ System.Management.Automation.SwitchParameter
- None
+ False
- Scope
+ PassThru
- Specifies the scope under which a user has access.
+ When specified, outputs a PSResourceInfo object for the saved resource.
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+ System.Management.Automation.SwitchParameter
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+ System.Management.Automation.SwitchParameter
- None
+ False
- TrustRepository
+ TemporaryPath
- Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository is not already set to a trusted level.
+ Specifies the path to temporarily install the resource before actual installation. If no temporary path is provided, the resource is temporarily installed in the current user's temporary folder.
- System.Management.Automation.SwitchParameter
+ System.String
- System.Management.Automation.SwitchParameter
+ System.String
- False
+ None
- Reinstall
+ Prerelease
- Writes over any previously installed resource version that already exists on the machine.
+ When specified, includes prerelease versions in search results returned.
System.Management.Automation.SwitchParameter
@@ -1496,7 +1815,7 @@
Quiet
- Supresses installation progress bar.
+ Suppresses installation progress bar.
System.Management.Automation.SwitchParameter
@@ -1506,9 +1825,10 @@
False
- AcceptLicense
+ Reinstall
- Specifies that the resource should accept any request to accept license. This will suppress prompting if the module mandates that a user accept their license.
+ Installs the latest version of a module even if the latest version is already installed. The installed version is overwritten. This allows you to repair a damaged installation of the module.
+ If an older version of the module is installed, the new version is installed side-by-side in a new version-specific folder.
System.Management.Automation.SwitchParameter
@@ -1518,33 +1838,67 @@
False
- NoClobber
+ Repository
- Prevents installing a package that contains cmdlets that already exist on the machine.
+ Specifies one or more repository names to search. Wildcards are supported.
+ If not specified, search includes all registered repositories, in priority order (highest first), until a repository is found that contains the package.
+ Lower Priority values have a higher precedence.
- System.Management.Automation.SwitchParameter
+ System.String[]
- System.Management.Automation.SwitchParameter
+ System.String[]
- False
+ None
+
+
+ RequiredResource
+
+ A hashtable or JSON string that specifies resources to install. Wildcard characters aren't allowed. See the NOTES (#notes)section for a description of the file formats.
+
+ System.Object
+
+ System.Object
+
+
+ None
+
+
+ RequiredResourceFile
+
+ Path to a `.psd1` or `.json` that specifies resources to install. Wildcard characters aren't allowed. See the NOTES (#notes)section for a description of the file formats.
+
+ System.String
+
+ System.String
+
+
+ None
- SkipDependencyCheck
+ Scope
- Skips the check for resource dependencies, so that only found resources are installed, and not any resources the found resource depends on.
+ Specifies the installation scope. Accepted values are:
+ - `CurrentUser`
+ - `AllUsers`
+
+ The default scope is `CurrentUser`, which doesn't require elevation for install.
+ The `AllUsers` scope installs modules in a location accessible to all users of the computer. For example:
+ - `$env:ProgramFiles\PowerShell\Modules`
+ The `CurrentUser` installs modules in a location accessible only to the current user of the computer. For example:
+ - `$home\Documents\PowerShell\Modules`
- System.Management.Automation.SwitchParameter
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- System.Management.Automation.SwitchParameter
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- False
+ None
- AuthenticodeCheck
+ SkipDependencyCheck
- Does a check to to validate signed files and catalog files on Windows.
+ Skips the check for resource dependencies. Only found resources are installed. No resources of the found resource are installed.
System.Management.Automation.SwitchParameter
@@ -1554,9 +1908,9 @@
False
- PassThru
+ TrustRepository
- Passes the resource installed to the console.
+ Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository isn't configured as trusted.
System.Management.Automation.SwitchParameter
@@ -1565,14 +1919,16 @@
False
-
- InputObject
+
+ Version
- Used for pipeline input.
+ Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
+ For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.String
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.String
None
@@ -1592,7 +1948,7 @@
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -1603,52 +1959,80 @@
-
+
+
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+
+
+ By default, the cmdlet doesn't return any objects. When the PassThru parameter is used, the cmdlet outputs a PSResourceInfo object for the saved resource.
+
+
+
+ The RequiredResource and RequiredResourceFile parameters are used to match PSResources matching specific criteria. You can specify the criteria using a hashtable or a JSON object. For the RequiredResourceFile parameter, the hashtable is stored in a `.psd1` file and the JSON object is stored in a `.json` file.
+ The hashtable can contain attributes for multiple modules. The following example show the structure of the module specification:
+
+ This example contains specifications for three modules. As you can, the module attributes are optional.
-------------------------- Example 1 --------------------------
- PS C:\> Install-PSResource Az
+ Install-PSResource Az
- Installs the Az module.
+
-------------------------- Example 2 --------------------------
- PS C:\> Install-PSResource Az -Version "[2.0.0, 3.0.0]"
+ Install-PSResource Az -Version '[7.3.0, 8.3.0]'
- Installs the latest stable Az module that is within the range 2.0.0 and 3.0.0.
+
-------------------------- Example 3 --------------------------
- PS C:\> Install-PSResource Az -Repository PSGallery
+ Install-PSResource Az -Reinstall
- Installs the latest stable Az module from the PowerShellGallery.
+
- -------------------------- Example 3 --------------------------
- PS C:\> Install-PSResource Az -Reinstall
+ -------------------------- Example 4 --------------------------
+ Install-PSResource -RequiredResourceFile myRequiredModules.psd1
- Installs the Az module and will write over any previously installed version if it is already installed.
+
- -------------------------- Example 4 --------------------------
- PS C:\> Install-PSResource -RequiredResourceFile myRequiredModules.psd1
+ -------------------------- Example 5 --------------------------
+ Install-PSResource -RequiredResource @{
+ TestModule = @{
+ version = "[0.0.1,1.3.0]"
+ repository = "PSGallery"
+ }
+ TestModulePrerelease = @{
+ version = "[0.0.0,0.0.5]"
+ repository = "PSGallery"
+ prerelease = "true"
+ }
+ TestModule99 = @{}
+}
- Installs the PSResources specified in the psd1 file.
+
- Online Version:
+ Package versioning
+
+
+
+ Uninstall-PSResource
@@ -1663,7 +2047,7 @@
- The Publish-PSResource cmdlet combines the Publish-Module and Publish-Script cmdlets from V2. It publishes a specified resource from the local computer to an online Nuget-based gallery by using an API key, stored as part of a user's profile in the gallery or to a local repository. You can specify the resource to publish either by the resource's name, or by the path to the folder containing the module or script resource.
+ This cmdlet combines the functions of the `Publish-Module` and `Publish-Script` cmdlets from PowerShellGet v2. `Publish-PSResource` publishes a resource from the local computer to an online Nuget-based repository. You can specify the resource by the resource's name or by the path containing the module or script resource.
@@ -1671,7 +2055,7 @@
Path
- When specified, includes prerelease versions in search.
+ The path to the module or script file or the path to a folder containing the module or script file to be published.
System.String
@@ -1681,7 +2065,7 @@
None
- APIKey
+ ApiKey
Specifies the API key that you want to use to publish a resource to the online gallery.
@@ -1693,21 +2077,21 @@
None
- Repository
+ Credential
- Specifies the repository to publish to.
+ Specifies a user account that has rights to a specific repository.
- System.String
+ System.Management.Automation.PSCredential
- System.String
+ System.Management.Automation.PSCredential
None
-
+
DestinationPath
- Specifies the path to where the resource (as a nupkg) should be saved to. This parameter can be used in conjunction with the -Repository parameter to publish to a repository and also save the exact same package to the local file system.
+ Specifies the path where the NuGet package `.nupkg` file should be saved. This parameter can be used in conjunction with the Repository parameter to publish to a repository and also save the exact same package to the local file system.
System.String
@@ -1717,9 +2101,21 @@
None
- Credential
+ Proxy
+
+ The URL to a proxy server used to access repositories outside of your network.
+
+ System.Uri
+
+ System.Uri
+
+
+ None
+
+
+ ProxyCredential
- Specifies a user account that has rights to a specific repository (used for finding dependencies).
+ The credentials required to use the proxy server.
System.Management.Automation.PSCredential
@@ -1728,10 +2124,22 @@
None
+
+ Repository
+
+ Specifies the repository to publish to.
+
+ System.String
+
+ System.String
+
+
+ None
+
SkipDependenciesCheck
- Bypasses the default check that all dependencies are present on the repository which the resource is being published to.
+ Bypasses the default check that all dependencies are present in the target repository.
System.Management.Automation.SwitchParameter
@@ -1753,7 +2161,7 @@
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -1765,7 +2173,7 @@
- APIKey
+ ApiKey
Specifies the API key that you want to use to publish a resource to the online gallery.
@@ -1777,9 +2185,21 @@
None
- Repository
+ Credential
- Specifies the repository to publish to.
+ Specifies a user account that has rights to a specific repository.
+
+ System.Management.Automation.PSCredential
+
+ System.Management.Automation.PSCredential
+
+
+ None
+
+
+ DestinationPath
+
+ Specifies the path where the NuGet package `.nupkg` file should be saved. This parameter can be used in conjunction with the Repository parameter to publish to a repository and also save the exact same package to the local file system.
System.String
@@ -1791,7 +2211,7 @@
Path
- When specified, includes prerelease versions in search.
+ The path to the module or script file or the path to a folder containing the module or script file to be published.
System.String
@@ -1800,22 +2220,22 @@
None
-
- DestinationPath
+
+ Proxy
- Specifies the path to where the resource (as a nupkg) should be saved to. This parameter can be used in conjunction with the -Repository parameter to publish to a repository and also save the exact same package to the local file system.
+ The URL to a proxy server used to access repositories outside of your network.
- System.String
+ System.Uri
- System.String
+ System.Uri
None
- Credential
+ ProxyCredential
- Specifies a user account that has rights to a specific repository (used for finding dependencies).
+ The credentials required to use the proxy server.
System.Management.Automation.PSCredential
@@ -1824,10 +2244,22 @@
None
+
+ Repository
+
+ Specifies the repository to publish to.
+
+ System.String
+
+ System.String
+
+
+ None
+
SkipDependenciesCheck
- Bypasses the default check that all dependencies are present on the repository which the resource is being published to.
+ Bypasses the default check that all dependencies are present in the target repository.
System.Management.Automation.SwitchParameter
@@ -1851,7 +2283,7 @@
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -1865,31 +2297,26 @@
-
+ Fileshare-based repository have no metadata about the resources. Therefore, there is no way to check for dependencies.
-------------------------- Example 1 --------------------------
- PS C:\> Publish-PSResource -Path c:\Test-Module
+ Publish-PSResource -Path c:\TestModule
- This will publish the module 'Test-Module' to the highest priority repository
+
-------------------------- Example 2 --------------------------
- PS C:\> Publish-PSResource -Path c:\Test-Module -Repository PSGallery -APIKey '1234567'
+ Publish-PSResource -Path c:\TestModule -Repository PSGallery -APIKey '1234567'
- This will publish the module 'Test-Module' to the PowerShellGallery. Note that the API key is a secret that is generated for a user from the website itself.
+
-
-
- Online Version:
-
-
-
+
@@ -1901,7 +2328,7 @@
- The Register-PSResourceRepository cmdlet registers a repository for PowerShell resources.
+ The cmdlet registers a NuGet repository containing PowerShell resources.
@@ -1909,70 +2336,109 @@
Name
- Name of the repository to be registered. Cannot be "PSGallery".
+ Name of the repository to be registered. Can't be `PSGallery`.
+
+ System.String
+
+ System.String
+
+
+ None
+
+
+ Uri
+
+ Specifies the location of the repository to be registered. The value must use one of the following URI schemas:
+ - `https://`
+ - `http://`
+ - `ftp://`
+ - `file://`
- String
+ System.String
- String
+ System.String
None
-
- Uri
+
+ CredentialInfo
- Specifies the location of the repository to be registered. Uri can be of the following Uri schemas: HTTPS, HTTP, FTP, file share based.
+ A PSCredentialInfo object that includes the name of a vault and a secret that is stored in a Microsoft.PowerShell.SecretManagement store.
- String
+ PSCredentialInfo
- String
+ PSCredentialInfo
None
+
+ PassThru
+
+ When specified, displays the successfully registered repository and its information.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
Priority
- Specifies the priority ranking of the repository. Repositories with higher ranking priority are searched before a lower ranking priority one, when searching for a repository item across multiple registered repositories. Valid priority values range from 0 to 100, such that a lower numeric value (i.e 10) corresponds to a higher priority ranking than a higher numeric value (i.e 40). Has default value of 50.
+ Specifies the priority ranking of the repository. Valid priority values range from 0 to 100. Lower values have a higher priority ranking. The default value is `100`.
+ Repositories are searched in priority order (highest first).
- Int32
+ System.Int32
- Int32
+ System.Int32
50
- Trusted
+ Proxy
- Specifies whether the repository should be trusted.
+ The URL to a proxy server used to access repositories outside of your network.
+ System.Uri
- SwitchParameter
+ System.Uri
- False
+ None
- CredentialInfo
+ ProxyCredential
- Specifies where a credential is stored to access the PSResourceRepository for Find/Install/Update commands. Takes a PSCredentialInfo Objects which takes in a vault name and secret name. This parameter utilizes the Microsoft.PowerShell.SecretManagement module for interfacing with the stored credential.
- `New-Object Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo ("VaultName", "SecretName")`
+ The credentials required to use the proxy server.
- PSCredentialInfo
+ System.Management.Automation.PSCredential
- PSCredentialInfo
+ System.Management.Automation.PSCredential
None
+
+ Trusted
+
+ Specifies whether the repository should be trusted.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
Confirm
Prompts you for confirmation before running the cmdlet.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -1980,47 +2446,72 @@
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
+
+
+ Register-PSResourceRepository
PassThru
- When specified, displays the succcessfully registered repository and its information.
+ When specified, displays the successfully registered repository and its information.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
-
-
- Register-PSResourceRepository
Priority
- Specifies the priority ranking of the repository. Repositories with higher ranking priority are searched before a lower ranking priority one, when searching for a repository item across multiple registered repositories. Valid priority values range from 0 to 50, such that a lower numeric value (i.e 10) corresponds to a higher priority ranking than a higher numeric value (i.e 40). Has default value of 50.
+ Specifies the priority ranking of the repository. Valid priority values range from 0 to 100. Lower values have a higher priority ranking. The default value is `100`.
+ Repositories are searched in priority order (highest first).
- Int32
+ System.Int32
- Int32
+ System.Int32
50
+
+ Proxy
+
+ The URL to a proxy server used to access repositories outside of your network.
+
+ System.Uri
+
+ System.Uri
+
+
+ None
+
+
+ ProxyCredential
+
+ The credentials required to use the proxy server.
+
+ System.Management.Automation.PSCredential
+
+ System.Management.Automation.PSCredential
+
+
+ None
+
PSGallery
When specified, registers PSGallery repository.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -2031,7 +2522,7 @@
Specifies whether the repository should be trusted.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -2042,7 +2533,7 @@
Prompts you for confirmation before running the cmdlet.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -2050,80 +2541,82 @@
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
+
+
+ Register-PSResourceRepository
PassThru
- When specified, displays the succcessfully registered repository and its information.
+ When specified, displays the successfully registered repository and its information.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
-
-
- Register-PSResourceRepository
-
- Repository
+
+ Proxy
- Specifies an array of hashtables which contains repository information and is used to register multiple repositories at once.
+ The URL to a proxy server used to access repositories outside of your network.
- Hashtable[]
+ System.Uri
- Hashtable[]
+ System.Uri
None
- Trusted
+ ProxyCredential
- Specifies whether the repository should be trusted.
+ The credentials required to use the proxy server.
+ System.Management.Automation.PSCredential
- SwitchParameter
+ System.Management.Automation.PSCredential
- False
+ None
-
- Confirm
+
+ Repository
- Prompts you for confirmation before running the cmdlet.
+ Specifies an array of hashtables that contain repository information. Use this parameter to register multiple repositories at once. Each hashtable can only have keys associated with parameters for the NameParameterSet or the PSGalleryParameterSet .
+ System.Collections.Hashtable[]
- SwitchParameter
+ System.Collections.Hashtable[]
- False
+ None
-
- WhatIf
+
+ Confirm
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Prompts you for confirmation before running the cmdlet.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
-
- PassThru
+
+ WhatIf
- When specified, displays the succcessfully registered repository and its information.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -2131,50 +2624,99 @@
+
+ CredentialInfo
+
+ A PSCredentialInfo object that includes the name of a vault and a secret that is stored in a Microsoft.PowerShell.SecretManagement store.
+
+ PSCredentialInfo
+
+ PSCredentialInfo
+
+
+ None
+
Name
- Name of the repository to be registered. Cannot be "PSGallery".
+ Name of the repository to be registered. Can't be `PSGallery`.
- String
+ System.String
- String
+ System.String
None
+
+ PassThru
+
+ When specified, displays the successfully registered repository and its information.
+
+ System.Management.Automation.SwitchParameter
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
Priority
- Specifies the priority ranking of the repository. Repositories with higher ranking priority are searched before a lower ranking priority one, when searching for a repository item across multiple registered repositories. Valid priority values range from 0 to 50, such that a lower numeric value (i.e 10) corresponds to a higher priority ranking than a higher numeric value (i.e 40). Has default value of 50.
+ Specifies the priority ranking of the repository. Valid priority values range from 0 to 100. Lower values have a higher priority ranking. The default value is `100`.
+ Repositories are searched in priority order (highest first).
- Int32
+ System.Int32
- Int32
+ System.Int32
50
+
+ Proxy
+
+ The URL to a proxy server used to access repositories outside of your network.
+
+ System.Uri
+
+ System.Uri
+
+
+ None
+
+
+ ProxyCredential
+
+ The credentials required to use the proxy server.
+
+ System.Management.Automation.PSCredential
+
+ System.Management.Automation.PSCredential
+
+
+ None
+
PSGallery
When specified, registers PSGallery repository.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
-
+
Repository
- Specifies an array of hashtables which contains repository information and is used to register multiple repositories at once.
+ Specifies an array of hashtables that contain repository information. Use this parameter to register multiple repositories at once. Each hashtable can only have keys associated with parameters for the NameParameterSet or the PSGalleryParameterSet .
- Hashtable[]
+ System.Collections.Hashtable[]
- Hashtable[]
+ System.Collections.Hashtable[]
None
@@ -2184,9 +2726,9 @@
Specifies whether the repository should be trusted.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -2194,24 +2736,15 @@
Uri
- Specifies the location of the repository to be registered. Uri can be of the following Uri schemas: HTTPS, HTTP, FTP, file share based.
-
- String
-
- String
-
-
- None
-
-
- CredentialInfo
-
- Specifies where a credential is stored to access the PSResourceRepository for Find/Install/Update commands. Takes a PSCredentialInfo Objects which takes in a vault name and secret name. This parameter utilizes the Microsoft.PowerShell.SecretManagement module for interfacing with the stored credential.
- `New-Object Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo ("VaultName", "SecretName")`
+ Specifies the location of the repository to be registered. The value must use one of the following URI schemas:
+ - `https://`
+ - `http://`
+ - `ftp://`
+ - `file://`
- PSCredentialInfo
+ System.String
- PSCredentialInfo
+ System.String
None
@@ -2221,9 +2754,9 @@
Prompts you for confirmation before running the cmdlet.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -2231,23 +2764,11 @@
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
-
- SwitchParameter
-
- SwitchParameter
-
-
- False
-
-
- PassThru
-
- When specified, displays the succcessfully registered repository and its information.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -2266,58 +2787,90 @@
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSRepositoryInfo (if 'PassThru' parameter is used)
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSRepositoryInfo
-
+ By default, the cmdlet produces no output. When you use the PassThru parameter, the cmdlet returns a PSRepositoryInfo object.
- Repositories are unique by 'Name'. Attempting to register a repository with same 'Name' as an already registered repository will not successfully register.
- Registering the PSGallery repository must be done via the PSGalleryParameterSet (i.e by using the 'PSGallery' parameter instead of 'Name' and 'Uri' parameters).
- Uri string input must be of one of the following Uri schemes: HTTP, HTTPS, FTP, File
+ Repositories are unique by Name . Attempting to register a repository with same name results in an error.
-------------------------- Example 1 --------------------------
- PS C:\> Register-PSResourceRepository -Name "PoshTestGallery" -Uri "https://www.powershellgallery.com/api/v2"
-PS C:\> Get-PSResourceRepository -Name "PoshTestGallery"
- Name Uri Trusted Priority
- ---- --- ------- --------
- PoshTestGallery https://www.poshtestgallery.com/api/v2 False 50
+ Register-PSResourceRepository -Name PoshTestGallery -Uri "https://www.powershellgallery.com/api/v2"
+Get-PSResourceRepository -Name PoshTestGallery
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PoshTestGallery https://www.poshtestgallery.com/api/v2 False 50
- This example registers the repository with the `-Name` of "PoshTestGallery" along with the associated `Uri` value for it.
+
-------------------------- Example 2 --------------------------
- PS C:\> Register-PSResourceRepository -PSGallery
-PS C:\> Get-PSResourceRepository -Name "PSGallery"
- Name Uri Trusted Priority
- ---- --- ------- --------
- PSGallery https://www.powershellgallery.com/api/v2 False 50
+ Register-PSResourceRepository -PSGallery
+Get-PSResourceRepository -Name "PSGallery"
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PSGallery https://www.powershellgallery.com/api/v2 False 50
- This example registers the "PSGallery" repository, with the 'PSGallery' parameter. Unlike the previous example, we cannot use the `-Name` or `-Uri` parameters to register the "PSGallery" repository as it is considered Powershell's default repository store and has its own value for Uri.
+
-------------------------- Example 3 --------------------------
- PS C:\> $arrayOfHashtables = @{Name = "psgettestlocal"; Uri = "c:/code/testdir"}, @{PSGallery = $True}
-PS C:\> Register-PSResourceRepository -Repository $arrayOfHashtables
-PS C:\> Get-PSResourceRepository
- Name Uri Trusted Priority
- ---- --- ------- --------
- PSGallery https://www.powershellgallery.com/api/v2 False 50
- psgettestlocal file:///c:/code/testdir False 50
+ $arrayOfHashtables = @{Name = "Local"; Uri = "D:/PSRepoLocal/"; Trusted = $true; Priority = 20 },
+ @{Name = "PSGv3"; Uri = "https://www.powershellgallery.com/api/v3"; Trusted = $true; Priority = 50 },
+ @{PSGallery = $true; Trusted = $true; Priority = 10 }
+Register-PSResourceRepository -Repository $arrayOfHashtables
+Get-PSResourceRepository
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PSGallery https://www.powershellgallery.com/api/v2 False 50
+psgettestlocal file:///c:/code/testdir False 50
+
+
+
+
+
+ -------------------------- Example 4 --------------------------
+ $parameters = @{
+ Name = "PSGv3"
+ Uri = "https://www.powershellgallery.com/api/v3"
+ Trusted = $true
+ Priority = 50
+ CredentialInfo = New-Object Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo ('SecretStore', 'TestSecret')
+}
+Register-PSResourceRepository @parameters
+Get-PSResourceRepository | Select-Object * -ExpandProperty CredentialInfo
+
+Name : PSGv3
+Uri : https://www.powershellgallery.com/api/v3
+Trusted : True
+Priority : 50
+CredentialInfo : Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo
+VaultName : SecretStore
+SecretName : TestSecret
+Credential :
- This example registers multiple repositories at once. To do so, we use the `-Repository` parameter and provide an array of hashtables. Each hashtable can only have keys associated with parameters for the NameParameterSet or the PSGalleryParameterSet. Upon running the command we can see that the "psgettestlocal" and "PSGallery" repositories have been succesfully registered.
+
-
+
+
+ Microsoft.PowerShell.SecretManagement
+
+
+
@@ -2329,28 +2882,95 @@ PS C:\> Get-PSResourceRepository
- The Save-PSResource cmdlet combines the Save-Module and Save-Script cmdlets from V2. It saves a resource from a registered repository to a specific path on a machine based on the -Name parameter argument. It does not return any object. Other parameters allow the resource to be specified by repository and version, and allow the user to save the resource as a .nupkg or with the PowerShellGet XML metadata.
+ This cmdlet combines the functionality of the `Save-Module` and `Save-Script` cmdlets from PowerShellGet v2. `Save-PSResource` downloads a resource from a registered repository to a specific path on the local machine. By default, the resource is saved in the unpacked or installed format. The scripts or modules could be run from the saved location. There is also an option to download the resource in `.nupkg` format.
Save-PSResource
-
- Name
+
+ AsNupkg
+
+ Saves the resource as a `.nupkg` file.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ AuthenticodeCheck
+
+ Validates the resource's signed files and catalog files on Windows.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Credential
+
+ Optional credentials used when accessing a repository.
+
+ System.Management.Automation.PSCredential
+
+ System.Management.Automation.PSCredential
+
+
+ None
+
+
+ IncludeXML
+
+ Includes the PowerShellGet metadata XML used to verify that PowerShellGet has installed a module.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ InputObject
+
+ Used for pipeline input.
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+
+
+ None
+
+
+ PassThru
- Name of a resource or resources to save. Does not accept wildcard characters or a null value.
+ When specified, outputs a PSResourceInfo object for the saved resource.
- System.String[]
- System.String[]
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Path
+
+ Specifies the path to save the resource to.
+
+ System.String
+
+ System.String
None
- Version
+ TemporaryPath
- Specifies the version of the resource to be saved. The value can be an exact version or a version range using the NuGet versioning syntax.
- For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges)PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. So inputting "1.0.0.0" as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the values is considered as the required version and yields version 1.0.0.0 only (required version). To use the minimum inclusive range, provide `[1.0.0.0, ]` as the version range.
+ Specifies the path to temporarily install the resource before saving. If no temporary path is provided, the resource is temporarily installed in the current user's temporary folder.
System.String
@@ -2360,9 +2980,9 @@ PS C:\> Get-PSResourceRepository
None
- Prerelease
+ Quiet
- Specifies to include prerelease versions.
+ Supresses progress information.
System.Management.Automation.SwitchParameter
@@ -2371,9 +2991,56 @@ PS C:\> Get-PSResourceRepository
False
- Repository
+ SkipDependencyCheck
+
+ Skips the check for resource dependencies. Only found resources are installed. No resources of the found resource are installed.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ TrustRepository
+
+ Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository isn't configured as trusted.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Confirm
+
+ Prompts you for confirmation before running the cmdlet.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ WhatIf
+
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+
+ Save-PSResource
+
+ Name
- Specifies one or more repository names to search. If not specified, search will include all currently registered repositories, in order of highest priority, until first repository package is found in.
+ The name of one or more resources to install.
System.String[]
@@ -2382,10 +3049,32 @@ PS C:\> Get-PSResourceRepository
None
+
+ AsNupkg
+
+ Saves the resource as a `.nupkg` file.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ AuthenticodeCheck
+
+ Validates the resource's signed files and catalog files on Windows.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
Credential
- Optional credentials to be used when accessing a repository.
+ Optional credentials used when accessing a repository.
System.Management.Automation.PSCredential
@@ -2395,9 +3084,9 @@ PS C:\> Get-PSResourceRepository
None
- AsNupkg
+ IncludeXML
- Saves the resource as a zipped .nupkg file.
+ Includes the PowerShellGet metadata XML used to verify that PowerShellGet has installed a module.
System.Management.Automation.SwitchParameter
@@ -2406,9 +3095,9 @@ PS C:\> Get-PSResourceRepository
False
- IncludeXml
+ PassThru
- Includes the PowerShellGet metadata XML (used to verify that PowerShellGet has installed a module).
+ When specified, outputs a PSResourceInfo object for the saved resource.
System.Management.Automation.SwitchParameter
@@ -2416,7 +3105,7 @@ PS C:\> Get-PSResourceRepository
False
-
+
Path
Specifies the path to save the resource to.
@@ -2429,20 +3118,21 @@ PS C:\> Get-PSResourceRepository
None
- TrustRepository
+ TemporaryPath
- Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository is not already set to a trusted level.
+ Specifies the path to temporarily install the resource before saving. If no temporary path is provided, the resource is temporarily installed in the current user's temporary folder.
+ System.String
- System.Management.Automation.SwitchParameter
+ System.String
- False
+ None
- AuthenticodeCheck
+ Prerelease
- Does a check to to validate signed files and catalog files on Windows.
+ When specified, includes prerelease versions in search results returned.
System.Management.Automation.SwitchParameter
@@ -2451,9 +3141,9 @@ PS C:\> Get-PSResourceRepository
False
- PassThru
+ Quiet
- Passes the resource saved to the console.
+ Supresses progress information.
System.Management.Automation.SwitchParameter
@@ -2461,10 +3151,24 @@ PS C:\> Get-PSResourceRepository
False
+
+ Repository
+
+ Specifies one or more repository names to search. Wildcards are supported.
+ If not specified, search includes all registered repositories, in priority order (highest first), until a repository is found that contains the package.
+ Lower Priority values have a higher precedence.
+
+ System.String[]
+
+ System.String[]
+
+
+ None
+
SkipDependencyCheck
- Skips the check for resource dependencies, so that only found resources are saved, and not any resources the found resource depends on.
+ Skips the check for resource dependencies. Only found resources are installed. No resources of the found resource are installed.
System.Management.Automation.SwitchParameter
@@ -2473,9 +3177,9 @@ PS C:\> Get-PSResourceRepository
False
- Quiet
+ TrustRepository
- Supresses progress information.
+ Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository isn't configured as trusted.
System.Management.Automation.SwitchParameter
@@ -2483,14 +3187,16 @@ PS C:\> Get-PSResourceRepository
False
-
- InputObject
+
+ Version
- Used for pipeline input.
+ Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
+ For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.String
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.String
None
@@ -2509,7 +3215,7 @@ PS C:\> Get-PSResourceRepository
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -2520,35 +3226,46 @@ PS C:\> Get-PSResourceRepository
-
- Name
+
+ AsNupkg
- Name of a resource or resources to save. Does not accept wildcard characters or a null value.
+ Saves the resource as a `.nupkg` file.
- System.String[]
+ System.Management.Automation.SwitchParameter
- System.String[]
+ System.Management.Automation.SwitchParameter
- None
+ False
- Version
+ AuthenticodeCheck
- Specifies the version of the resource to be saved. The value can be an exact version or a version range using the NuGet versioning syntax.
- For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges)PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. So inputting "1.0.0.0" as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the values is considered as the required version and yields version 1.0.0.0 only (required version). To use the minimum inclusive range, provide `[1.0.0.0, ]` as the version range.
+ Validates the resource's signed files and catalog files on Windows.
- System.String
+ System.Management.Automation.SwitchParameter
- System.String
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Credential
+
+ Optional credentials used when accessing a repository.
+
+ System.Management.Automation.PSCredential
+
+ System.Management.Automation.PSCredential
None
- Prerelease
+ IncludeXML
- Specifies to include prerelease versions.
+ Includes the PowerShellGet metadata XML used to verify that PowerShellGet has installed a module.
System.Management.Automation.SwitchParameter
@@ -2557,34 +3274,34 @@ PS C:\> Get-PSResourceRepository
False
-
- Repository
+
+ InputObject
- Specifies one or more repository names to search. If not specified, search will include all currently registered repositories, in order of highest priority, until first repository package is found in.
+ Used for pipeline input.
- System.String[]
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
- System.String[]
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
None
-
- Credential
+
+ Name
- Optional credentials to be used when accessing a repository.
+ The name of one or more resources to install.
- System.Management.Automation.PSCredential
+ System.String[]
- System.Management.Automation.PSCredential
+ System.String[]
None
- AsNupkg
+ PassThru
- Saves the resource as a zipped .nupkg file.
+ When specified, outputs a PSResourceInfo object for the saved resource.
System.Management.Automation.SwitchParameter
@@ -2593,22 +3310,22 @@ PS C:\> Get-PSResourceRepository
False
-
- IncludeXml
+
+ Path
- Includes the PowerShellGet metadata XML (used to verify that PowerShellGet has installed a module).
+ Specifies the path to save the resource to.
- System.Management.Automation.SwitchParameter
+ System.String
- System.Management.Automation.SwitchParameter
+ System.String
- False
+ None
-
- Path
+
+ TemporaryPath
- Specifies the path to save the resource to.
+ Specifies the path to temporarily install the resource before saving. If no temporary path is provided, the resource is temporarily installed in the current user's temporary folder.
System.String
@@ -2618,9 +3335,9 @@ PS C:\> Get-PSResourceRepository
None
- TrustRepository
+ Prerelease
- Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository is not already set to a trusted level.
+ When specified, includes prerelease versions in search results returned.
System.Management.Automation.SwitchParameter
@@ -2630,9 +3347,9 @@ PS C:\> Get-PSResourceRepository
False
- AuthenticodeCheck
+ Quiet
- Does a check to to validate signed files and catalog files on Windows.
+ Supresses progress information.
System.Management.Automation.SwitchParameter
@@ -2641,22 +3358,24 @@ PS C:\> Get-PSResourceRepository
False
-
- PassThru
+
+ Repository
- Passes the resource saved to the console.
+ Specifies one or more repository names to search. Wildcards are supported.
+ If not specified, search includes all registered repositories, in priority order (highest first), until a repository is found that contains the package.
+ Lower Priority values have a higher precedence.
- System.Management.Automation.SwitchParameter
+ System.String[]
- System.Management.Automation.SwitchParameter
+ System.String[]
- False
+ None
SkipDependencyCheck
- Skips the check for resource dependencies, so that only found resources are saved, and not any resources the found resource depends on.
+ Skips the check for resource dependencies. Only found resources are installed. No resources of the found resource are installed.
System.Management.Automation.SwitchParameter
@@ -2666,9 +3385,9 @@ PS C:\> Get-PSResourceRepository
False
- Quiet
+ TrustRepository
- Supresses progress information.
+ Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository isn't configured as trusted.
System.Management.Automation.SwitchParameter
@@ -2677,14 +3396,16 @@ PS C:\> Get-PSResourceRepository
False
-
- InputObject
+
+ Version
- Used for pipeline input.
+ Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
+ For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.String
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.String
None
@@ -2704,7 +3425,7 @@ PS C:\> Get-PSResourceRepository
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -2715,7 +3436,16 @@ PS C:\> Get-PSResourceRepository
-
+
+
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+
+
+ By default, the cmdlet doesn't return any objects. When the PassThru parameter is used, the cmdlet outputs a PSResourceInfo object for the saved resource.
+
+
+
@@ -2724,39 +3454,34 @@ PS C:\> Get-PSResourceRepository
-------------------------- Example 1 --------------------------
- PS C:\> Save-PSResource -Name Az
+ Save-PSResource -Name Az
- Saves the Az module
+
-------------------------- Example 2 --------------------------
- PS C:\> Save-PSResource -Name Az -Repository PSGallery
+ Save-PSResource -Name Az -Repository PSGallery
- Saves the Az module found in the PowerShellGallery
+
-------------------------- Example 3 --------------------------
- PS C:\> Save-PSResource Az -AsNupkg
+ Save-PSResource Az -AsNupkg
- Saves the Az module as a .nupkg file
+
-------------------------- Example 4 --------------------------
- PS C:\> Save-PSResource Az -IncludeXml
+ Save-PSResource Az -IncludeXML
- Saves the Az module and includes the PowerShellGet XML metadata
+
-
-
- Online Version:
-
-
-
+
@@ -2773,22 +3498,47 @@ PS C:\> Get-PSResourceRepository
Set-PSResourceRepository
-
+
Name
- Specifies the name of the repository to be set.
+ Specifies the name of the repository to be modified.
+ > [!NOTE] > The Uri value of the default PSGallery repository can't be changed.
+
+ System.String
+
+ System.String
+
+
+ None
+
+
+ CredentialInfo
+
+ A PSCredentialInfo object that includes the name of a vault and a secret that is stored in a Microsoft.PowerShell.SecretManagement store.
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo
+
+
+ None
+
+
+ PassThru
+
+ When specified, displays the successfully registered repository and its information.
- System.String
- System.String
+ System.Management.Automation.SwitchParameter
- None
+ False
Priority
- Specifies the priority ranking of the repository, such that repositories with higher ranking priority are searched before a lower ranking priority one, when searching for a repository item across multiple registered repositories. Valid priority values range from 0 to 100, such that a lower numeric value (i.e 10) corresponds to a higher priority ranking than a higher numeric value (i.e 40).
+ Specifies the priority ranking of the repository. Valid priority values range from 0 to 50. Lower values have a higher priority ranking. The default value is `50`.
+ Repositories are searched in priority order (highest first).
System.Int32
@@ -2811,32 +3561,48 @@ PS C:\> Get-PSResourceRepository
Uri
- Specifies the location of the repository to be set.
+ Specifies the location of the repository to be registered. The value must use one of the following URI schemas:
+ - `https://`
+ - `http://`
+ - `ftp://`
+ - `file://`
- String
+ System.String
- String
+ System.String
None
-
- CredentialInfo
+
+ Confirm
- Specifies where a credential is stored to access the PSResourceRepository for Find/Install/Update commands. Takes a PSCredentialInfo Objects which takes in a vault name and secret name. This parameter utilizes the Microsoft.PowerShell.SecretManagement module for interfacing with the stored credential.
- `New-Object Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo ("VaultName", "SecretName")`
+ Prompts you for confirmation before running the cmdlet.
- PSCredentialInfo
- PSCredentialInfo
+ System.Management.Automation.SwitchParameter
- None
+ False
-
+
+ WhatIf
+
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+
+ Set-PSResourceRepository
+
PassThru
- When specified, displays the succcessfully registered repository and its information
+ When specified, displays the successfully registered repository and its information.
System.Management.Automation.SwitchParameter
@@ -2844,6 +3610,18 @@ PS C:\> Get-PSResourceRepository
False
+
+ Repository
+
+ Specifies an array of hashtables that contain repository information. Use this parameter to register multiple repositories at once. Each hashtable can only have keys associated with parameters for the NameParameterSet .
+
+ System.Collections.Hashtable[]
+
+ System.Collections.Hashtable[]
+
+
+ None
+
Confirm
@@ -2858,7 +3636,7 @@ PS C:\> Get-PSResourceRepository
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -2869,34 +3647,35 @@ PS C:\> Get-PSResourceRepository
-
- Name
+
+ CredentialInfo
- Specifies the name of the repository to be set.
+ A PSCredentialInfo object that includes the name of a vault and a secret that is stored in a Microsoft.PowerShell.SecretManagement store.
- System.String
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo
- System.String
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo
None
-
- Priority
+
+ Name
- Specifies the priority ranking of the repository, such that repositories with higher ranking priority are searched before a lower ranking priority one, when searching for a repository item across multiple registered repositories. Valid priority values range from 0 to 100, such that a lower numeric value (i.e 10) corresponds to a higher priority ranking than a higher numeric value (i.e 40).
+ Specifies the name of the repository to be modified.
+ > [!NOTE] > The Uri value of the default PSGallery repository can't be changed.
- System.Int32
+ System.String
- System.Int32
+ System.String
None
- Trusted
+ PassThru
- Specifies whether the repository should be trusted.
+ When specified, displays the successfully registered repository and its information.
System.Management.Automation.SwitchParameter
@@ -2906,34 +3685,34 @@ PS C:\> Get-PSResourceRepository
False
- Uri
+ Priority
- Specifies the location of the repository to be set.
+ Specifies the priority ranking of the repository. Valid priority values range from 0 to 50. Lower values have a higher priority ranking. The default value is `50`.
+ Repositories are searched in priority order (highest first).
- String
+ System.Int32
- String
+ System.Int32
None
-
- CredentialInfo
+
+ Repository
- Specifies where a credential is stored to access the PSResourceRepository for Find/Install/Update commands. Takes a PSCredentialInfo Objects which takes in a vault name and secret name. This parameter utilizes the Microsoft.PowerShell.SecretManagement module for interfacing with the stored credential.
- `New-Object Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo ("VaultName", "SecretName")`
+ Specifies an array of hashtables that contain repository information. Use this parameter to register multiple repositories at once. Each hashtable can only have keys associated with parameters for the NameParameterSet .
- PSCredentialInfo
+ System.Collections.Hashtable[]
- PSCredentialInfo
+ System.Collections.Hashtable[]
None
-
- PassThru
+
+ Trusted
- When specified, displays the succcessfully registered repository and its information
+ Specifies whether the repository should be trusted.
System.Management.Automation.SwitchParameter
@@ -2942,6 +3721,22 @@ PS C:\> Get-PSResourceRepository
False
+
+ Uri
+
+ Specifies the location of the repository to be registered. The value must use one of the following URI schemas:
+ - `https://`
+ - `http://`
+ - `ftp://`
+ - `file://`
+
+ System.String
+
+ System.String
+
+
+ None
+
Confirm
@@ -2957,7 +3752,7 @@ PS C:\> Get-PSResourceRepository
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -2988,10 +3783,10 @@ PS C:\> Get-PSResourceRepository
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSRepositoryInfo (if 'PassThru' parameter used)
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSRepositoryInfo
-
+ By default, the cmdlet produces no output. When you use the PassThru parameter, the cmdlet returns a PSRepositoryInfo object.
@@ -3003,53 +3798,87 @@ PS C:\> Get-PSResourceRepository
-------------------------- Example 1 --------------------------
- PS C:\> Get-PSResourceRepository -Name "PoshTestGallery"
- Name Uri Trusted Priority
- ---- --- ------- --------
- PoshTestGallery https://www.poshtestgallery.com/api/v2 False 50
-PS C:\> Set-PSResourceRepository -Name "PoshTestGallery" -Uri "c:/code/testdir" -PassThru
- Name Uri Trusted Priority
- ---- --- ------- --------
- PoshTestGallery file:///c:/code/testdir False 50
+ Get-PSResourceRepository -Name "PoshTestGallery"
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PoshTestGallery https://www.poshtestgallery.com/api/v2 False 50
+
+Set-PSResourceRepository -Name "PoshTestGallery" -Uri "c:/code/testdir" -PassThru
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PoshTestGallery file:///c:/code/testdir False 50
- This example first checks if the PoshTestGallery repository has been registered. We wish to set the `-Uri` value of this repository by running the Set-PSResourceRepository cmdlet with the `-Uri` parameter and a valid Uri scheme Uri. We run the Get-PSResourceRepository cmdlet again to ensure that the `-Uri` of the repository was changed. We also use the `-PassThru` parameter to see the changed repository.
+
-------------------------- Example 2 --------------------------
- PS C:\> Get-PSResourceRepository -Name "PSGallery"
- Name Uri Trusted Priority
- ---- --- ------- --------
- PSGallery https://www.powershellgallery.com/api/v2 False 50
-PS C:\> Set-PSResourceRepository -Name "PSGallery" -Priority 25 -Trusted -PassThru
- Name Uri Trusted Priority
- ---- --- ------- --------
- PSGallery https://www.powershellgallery.com/api/v2 True 25
+ Get-PSResourceRepository -Name "PSGallery"
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PSGallery https://www.powershellgallery.com/api/v2 False 50
+
+Set-PSResourceRepository -Name "PSGallery" -Priority 25 -Trusted -PassThru
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PSGallery https://www.powershellgallery.com/api/v2 True 25
- This example first checks if the PSGallery repository has been registered. We wish to set the `-Priority` and `-Trusted` values of this repository by running the Set-PSResourceRepository cmdlet with the `-Priority` parameter set to a value between 0 and 100 and by using the `-Trusted` parameter switch. We run the Get-PSResourceRepository cmdlet again to ensure that the `-Priority` and `-Trusted` values of the repository were changed. An important note here is that just for the default PSGallery repository, the `-Uri` value can't be changed/set. We also use the `-PassThru` parameter to see the changed repository.
+
-------------------------- Example 3 --------------------------
- PS C:\> Get-PSResourceRepository -Name "*"
- Name Uri Trusted Priority
- ---- --- ------- --------
- PSGallery https://www.powershellgallery.com/api/v2 False 50
- PoshTestGallery https://www.poshtestgallery.com/api/v2 False 50
+ Get-PSResourceRepository
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PSGallery https://www.powershellgallery.com/api/v2 False 50
+PoshTestGallery https://www.poshtestgallery.com/api/v2 False 50
-PS C:\> $arrayOfHashtables = @{Name = "PSGallery"; Trusted = $True}, @{Name = "PoshTestGallery"; Uri = "c:/code/testdir"}
+$arrayOfHashtables = @{Name = "PSGallery"; Trusted = $True},
+ @{Name = "PoshTestGallery"; Uri = "c:/code/testdir"}
+Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PSGallery https://www.powershellgallery.com/api/v2 True 50
+PoshTestGallery file:///c:/code/testdir False 50
+
+
+
+
+
+ -------------------------- Example 4 --------------------------
+ $parameters = @{
+ Name = "PoshTestGallery"
+ Uri = "c:/code/testdir"
+ CredentialInfo = New-Object Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo ('SecretStore', 'TestSecret')
+}
+Set-PSResourceRepository @parameters -PassThru | Select-Object * -ExpandProperty CredentialInfo
-PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
- Name Uri Trusted Priority
- ---- --- ------- --------
- PSGallery https://www.powershellgallery.com/api/v2 True 50
- PoshTestGallery file:///c:/code/testdir False 50
+Name : PoshTestGallery
+Uri : file:///c:/code/testdir
+Trusted : False
+Priority : 50
+CredentialInfo : Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo
+VaultName : SecretStore
+SecretName : TestSecret
+Credential :
- This example first checks for all registered repositories. We wish to set the properties for multiple repositories at once (i.e the PSGallery and PoshTestGallery repositories), so we run Set-PSResourceRepository with the `-Repository` parameter. This parameter takes an array of hashtables, where each hashtable contains information for a repository we wish to set information for. We also use the `-PassThru` parameter to see the changed repositories.
+
-
+
+
+ Microsoft.PowerShell.SecretManagement
+
+
+
@@ -3057,19 +3886,95 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
Uninstall
PSResource
- Uninstalls a resource (module or script) that has been installed on the machine via PowerShellGet.
+ Uninstalls a resource that was installed using PowerShellGet .
- The Uninstall-PSResource cmdlet combines the Uninstall-Module, Uninstall-Script cmdlets from V2. It uninstalls a package found in a module or script installation path based on the -Name parameter argument. It does not return an object. Other parameters allow the returned results to be further filtered.
+ This cmdlet combines the functionality of the `Uninstall-Module` and `Uninstall-Script` cmdlets from PowerShellGet v2. The cmdlet searches the package installation paths for resources that have the PowerShellGet XML metadata file. Matching resources are uninstalled from the system.
+ By default, the cmdlet checks to see whether the resource being removed is a dependency for another resource.
+
+ Uninstall-PSResource
+
+ InputObject
+
+ Used for pipeline input.
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+
+
+ None
+
+
+ Prerelease
+
+ Indicates that only prerelease version resources should be removed.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Scope
+
+ Specifies the scope of the resource to uninstall.
+
+
+ CurrentUser
+ AllUsers
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+
+
+ None
+
+
+ SkipDependencyCheck
+
+ By default, the cmdlet checks to see whether the resource being removed is a dependency for another resource. Using this parameter skips the dependency test.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Confirm
+
+ Prompts you for confirmation before running the cmdlet.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ WhatIf
+
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
Uninstall-PSResource
Name
- Name of a resource or resources that has been installed. Accepts wild card characters.
+ Name of a resource or resources to remove. Wildcards are supported but NuGet only accepts the `*` character.
System.String[]
@@ -3078,17 +3983,16 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
None
-
- Version
+
+ Prerelease
- Specifies the version of the resource to be uninstalled.
+ Indicates that only prerelease version resources should be removed.
- System.String
- System.String
+ System.Management.Automation.SwitchParameter
- None
+ False
Scope
@@ -3109,7 +4013,7 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
SkipDependencyCheck
- Skips check to see if other resources are dependent on the resource being uninstalled.
+ By default, the cmdlet checks to see whether the resource being removed is a dependency for another resource. Using this parameter skips the dependency test.
System.Management.Automation.SwitchParameter
@@ -3117,22 +4021,35 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
False
-
- InputObject
+
+ Version
- Used for pipeline input.
+ Specifies the version of the resource to be removed. The value can be an exact version or a version range using the NuGet versioning syntax.
+ For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.String
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+ System.String
None
+
+ Confirm
+
+ Prompts you for confirmation before running the cmdlet.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -3143,10 +4060,22 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
+
+ InputObject
+
+ Used for pipeline input.
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+
+
+ None
+
Name
- Name of a resource or resources that has been installed. Accepts wild card characters.
+ Name of a resource or resources to remove. Wildcards are supported but NuGet only accepts the `*` character.
System.String[]
@@ -3155,17 +4084,17 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
None
-
- Version
+
+ Prerelease
- Specifies the version of the resource to be uninstalled.
+ Indicates that only prerelease version resources should be removed.
- System.String
+ System.Management.Automation.SwitchParameter
- System.String
+ System.Management.Automation.SwitchParameter
- None
+ False
Scope
@@ -3179,10 +4108,36 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
None
-
- SkipDependencyCheck
+
+ SkipDependencyCheck
+
+ By default, the cmdlet checks to see whether the resource being removed is a dependency for another resource. Using this parameter skips the dependency test.
+
+ System.Management.Automation.SwitchParameter
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Version
+
+ Specifies the version of the resource to be removed. The value can be an exact version or a version range using the NuGet versioning syntax.
+ For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
+
+ System.String
+
+ System.String
+
+
+ None
+
+
+ Confirm
- Skips check to see if other resources are dependent on the resource being uninstalled.
+ Prompts you for confirmation before running the cmdlet.
System.Management.Automation.SwitchParameter
@@ -3191,22 +4146,10 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
False
-
- InputObject
-
- Used for pipeline input.
-
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
-
- Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
-
-
- None
-
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -3226,41 +4169,50 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
-------------------------- Example 1 --------------------------
- PS C:\> Uninstall-PSResource Az
+ Uninstall-PSResource Az
- Uninstalls the latest version of the Az module.
+
-------------------------- Example 2 --------------------------
- PS C:\> Uninstall-PSResource -name Az -version "1.0.0"
+ Uninstall-PSResource -name Az -version "5.0.0"
- Uninstalls version 1.0.0 of the Az module.
+
-------------------------- Example 3 --------------------------
- PS C:\> Uninstall-PSResource -name Az -version "(1.0.0, 3.0.0)"
+ Uninstall-PSResource -name Az -version "(5.0.0, 7.5.0)"
- Uninstalls all versions within the specified version range.
+
-------------------------- Example 4 --------------------------
- PS C:\> Uninstall-PSResource -name Az -version "[4.0.1, 4.1.0]"
+ Uninstall-PSResource -name Az -version "[4.0.1, 4.1.0]"
- Assume that the following versions are already installed for package Az: 4.0.1-preview, 4.1.0, 4.0.2-preview installed, this will uninstall all versions (stable and prerelease) which fall within the specified version range. Per NuGetVersion rules, a prerelease version is less than a stable version, so 4.0.1-preview is actually less than the 4.0.1 specified version so 4.0.1-preview does not fall within the specified version range and won't be removed. Versions 4.1.0 and 4.0.2-preview do fall in the range and will both be removed.
+
- -------------------------- Example 4 --------------------------
- PS C:\> Uninstall-PSResource -name Az -version "[4.0.1, 4.1.0]" -Prerelease
+ -------------------------- Example 5 --------------------------
+ Uninstall-PSResource -name Az -version "[4.0.1, 4.1.0]" -Prerelease
- Assume that the following versions are already installed for package Az: 4.0.1-preview, 4.1.0, 4.0.2-preview installed. This is the same example as above, except the added `-Prerelease` parameter means only prerelease versions which fall within this range will be removed. Again, per NuGetVersion rules, a prerelease version is less than a stable version, so 4.0.1-preview is actually less than the 4.0.1 specified version. Therefore 4.0.1-preview does not fall within the specified version range and won't be removed. Version 4.1.0 does fall in range however it is not a prerelease version so it will remain installed. Version 4.0.2-preview does fall in the range and is prerelease so it will be removed.
+
-
+
+
+ Package versioning
+
+
+
+ Install-PSResource
+
+
+
@@ -3268,11 +4220,11 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
Unregister
PSResourceRepository
- Un-registers a repository from the repository store.
+ Removes a registered repository from the local machine.
- The Unregister-PSResourceRepository cmdlet unregisters a repository.
+ The cmdlet removes a registered repository from the the local machine.
@@ -3280,11 +4232,11 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
Name
- This parameter takes a String argument, or an array of String arguments. It is the name of the repository to un-register.
+ The name of one or more repositories to remove.
- String[]
+ System.String[]
- String[]
+ System.String[]
None
@@ -3292,10 +4244,10 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
PassThru
- Passes the resource installed to the console.
+ When specified, outputs a PSRepositoryInfo object for each repository that is removed.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -3306,7 +4258,7 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
Prompts you for confirmation before running the cmdlet.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -3314,10 +4266,10 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -3328,11 +4280,11 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
Name
- This parameter takes a String argument, or an array of String arguments. It is the name of the repository to un-register.
+ The name of one or more repositories to remove.
- String[]
+ System.String[]
- String[]
+ System.String[]
None
@@ -3340,11 +4292,11 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
PassThru
- Passes the resource installed to the console.
+ When specified, outputs a PSRepositoryInfo object for each repository that is removed.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -3354,9 +4306,9 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
Prompts you for confirmation before running the cmdlet.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -3364,11 +4316,11 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
- SwitchParameter
+ System.Management.Automation.SwitchParameter
- SwitchParameter
+ System.Management.Automation.SwitchParameter
False
@@ -3384,7 +4336,16 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
-
+
+
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSRepositoryInfo
+
+
+ By default, the cmdlet doesn't return any objects. When the PassThru parameter is used, the cmdlet outputs a PSRepositoryInfo object for each repository that is removed.
+
+
+
@@ -3393,34 +4354,52 @@ PS C:\> Set-PSResourceRepository -Repository $arrayOfHashtables -PassThru
-------------------------- Example 1 --------------------------
- PS C:\> Get-PSResourceRepository -Name "PoshTestGallery"
-PS C:\> Unregister-PSResourceRepository -Name "PoshTestGallery"
-PS C:\> Get-PSResourceRepository -Name "PoshTestGallery"
-PS C:\>
+ Get-PSResourceRepository
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PSGallery https://www.powershellgallery.com/api/v2 True 10
+Local file:///D:/PSRepoLocal/ True 20
+PSGv3 https://www.powershellgallery.com/api/v3 True 50
+
+Unregister-PSResourceRepository -Name PSGv3
+Get-PSResourceRepository
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PSGallery https://www.powershellgallery.com/api/v2 True 10
+Local file:///D:/PSRepoLocal/ True 20
- In this example, we assume the repository "PoshTestGallery" has been previously registered. So when we first run the command to find "PoshTestGallery" it verifies that this repository can be found. Next, we run the command to unregister "PoshTestGallery". Finally, we again run the command to find "PoshTestGallery" but since it was successfully un-registered it cannot be found or retrieved.
+
-------------------------- Example 2 --------------------------
- PS C:\> Get-PSResourceRepository
- Name Uri Trusted Priority
- ---- --- ------- --------
- PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
- PSGallery https://www.powershellgallery.com/api/v2 False 50
- psgettestlocal file:///c:/code/testdir True 50
+ Get-PSResourceRepository
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
+PSGallery https://www.powershellgallery.com/api/v2 False 50
+psgettestlocal file:///c:/code/testdir True 50
-PS C:\> Unregister-PSResourceRepository -Name "PoshTestGallery","psgettestlocal"
-PS C:\> Get-PSResourceRepository
- Name Uri Trusted Priority
- ---- --- ------- --------
- PSGallery https://www.powershellgallery.com/api/v2 False 50
+Unregister-PSResourceRepository -Name PoshTestGallery, psgettestlocal
+Get-PSResourceRepository
+
+Name Uri Trusted Priority
+---- --- ------- --------
+PSGallery https://www.powershellgallery.com/api/v2 False 50
- In this example, the command to find all registered repositories is run and the repositories found are displayed. Next, the command to un-register is run with a list of names ("PoshTestGallery", "psgettestlocal") provided for the `-Name` parameter. Finally, the command to find all registered repositories is run again, but this time we can see that "PoshTestGallery" and "psgettestlocal" are not found and displayed as they have been successfully unregistered.
+
-
+
+
+ Register-PSResourceRepository
+
+
+
@@ -3432,56 +4411,68 @@ PS C:\> Get-PSResourceRepository
- The Update-ModuleManifest cmdlet replaces the Update-ModuleManifest cmdlet from V2. It updates a module manifest based on the `-Path` parameter argument. It does not return an object. Other parameters allow specific properties of the manifest to be updated.
+ This cmdlet updates the data stored in a module manifest file. The parameters allow you to specify which properties get updated. `Update-ModuleManifest` overwrites any existing values in the module manifest.
+ The cmdlet doesn't return an object.
Update-ModuleManifest
-
+
Path
- Specifies the path and file name of the module manifest. Enter a path and file name with a .psd1 file name extension, such as `"$PSHOME\Modules\MyModule\MyModule.psd1`.
+ Specifies the path and filename of the module manifest. Enter filename with a `.psd1` file extension.
- String
+ System.String
- String
+ System.String
None
-
- NestedModules
+
+ AliasesToExport
- Specifies script modules (.psm1) and binary modules (.dll) that are imported into the module's session state. The files in the NestedModules key run in the order in which they're listed in the value.
- Enter each module name as a string or as a hash table with ModuleName and ModuleVersion keys. The hash table can also have an optional GUID key. You can combine strings and hash tables in the parameter value.
+ Specifies the aliases that the module exports. Wildcards are permitted.
- Object[]
+ System.String[]
- Object[]
+ System.String[]
None
- Guid
+ Author
- Specifies a unique identifier for the module. The GUID can be used to distinguish among modules with the same name.
+ Specifies the module author.
- System.Guid
+ System.String
- System.Guid
+ System.String
None
- Author
+ ClrVersion
- Specifies the module author.
+ Specifies the minimum version of the Common Language Runtime (CLR) of the Microsoft .NET Framework required by the module.
+
+ System.Version
+
+ System.Version
+
+
+ None
+
+
+ CmdletsToExport
+
+ Specifies the cmdlets that the module exports. Wildcards are permitted.
- String
+ System.String[]
- String
+ System.String[]
None
@@ -3491,31 +4482,33 @@ PS C:\> Get-PSResourceRepository
Specifies the company or vendor who created the module.
- String
+ System.String
- String
+ System.String
None
- Copyright
+ CompatiblePSEditions
- Specifies a copyright statement for the module.
+ Specifies the compatible PSEditions of the module. For information about PSEdition , see Modules with compatible PowerShell Editions (/powershell/scripting/gallery/concepts/module-psedition-support).
- String
+
+ Desktop
+ Core
+
+ System.String[]
- String
+ System.String[]
None
- RootModule
+ Copyright
- Specifies the primary or root file of the module. Enter the file name of a script (.ps1), a script module (.psm1), a module manifest (.psd1), an assembly (.dll), a cmdlet definition XML file (.cdxml), or a workflow (.xaml). When the module is imported, the members that are exported from the root module file are imported into the caller's session state.
- If a module has a manifest file and no root file has been specified in the RootModule key, the manifest becomes the primary file for the module. And, the module becomes a manifest module (ModuleType = Manifest).
- To export members from .psm1 or .dll files in a module that has a manifest, the names of those files must be specified in the values of the RootModule or NestedModules keys in the manifest. Otherwise, their members aren't exported.
+ Specifies a copyright statement for the module.
System.String
@@ -3525,13 +4518,13 @@ PS C:\> Get-PSResourceRepository
None
- ModuleVersion
+ DefaultCommandPrefix
- Specifies the version of the module.
+ Specifies the default command prefix.
- System.Version
+ System.String
- System.Version
+ System.String
None
@@ -3549,33 +4542,22 @@ PS C:\> Get-PSResourceRepository
None
- ProcessorArchitecture
+ DotNetFrameworkVersion
- Specifies the processor architecture that the module requires.
- The acceptable values for this parameter are:
- * Amd64
- * Arm
- * IA64
- * MSIL
- * None (unknown or unspecified)
- * X86
+ Specifies the minimum version of the Microsoft .NET Framework required by the module.
- System.Reflection.ProcessorArchitecture
+ System.Version
- System.Reflection.ProcessorArchitecture
+ System.Version
None
-
- CompatiblePSEditions
+
+ DscResourcesToExport
- Specifies the compatible PSEditions of the module. For information about PSEdition, see: https://docs.microsoft.com/en-us/powershell/scripting/gallery/concepts/module-psedition-support
+ Specifies the Desired State Configuration (DSC) resources that the module exports. Wildcards are permitted.
-
- Desktop
- Core
-
System.String[]
System.String[]
@@ -3584,216 +4566,198 @@ PS C:\> Get-PSResourceRepository
None
- PowerShellVersion
+ ExternalModuleDependencies
- Specifies the minimum version of PowerShell that will work with this module. For example, you can specify 3.0, 4.0, or 5.0 as the value of this parameter.
+ Specifies an array of external module dependencies.
- System.Version
+ System.String[]
- System.Version
+ System.String[]
None
- ClrVersion
+ FileList
- Specifies the minimum version of the Common Language Runtime (CLR) of the Microsoft .NET Framework that the module requires.
+ Specifies all items that are included in the module.
- System.Version
+ System.String[]
- System.Version
+ System.String[]
None
- DotNetFrameworkVersion
+ FormatsToProcess
- Specifies the minimum version of the Microsoft .NET Framework that the module requires.
+ Specifies the formatting files (`.ps1xml`) that are processed when the module is imported.
+ When you import a module, PowerShell runs the `Update-FormatData` cmdlet with the specified files. Because formatting files aren't scoped, they affect all session states in the session.
- System.Version
+ System.String[]
- System.Version
+ System.String[]
None
-
- PowerShellHostName
+
+ FunctionsToExport
- Specifies the name of the PowerShell host program that the module requires. Enter the name of the host program, such as PowerShell ISE Host or ConsoleHost. Wildcards aren't permitted.
- To find the name of a host program, in the program, type $Host.Name.
+ Specifies the functions that the module exports. Wildcards are permitted.
- System.String
+ System.String[]
- System.String
+ System.String[]
None
- PowerShellHostVersion
+ Guid
- Specifies the minimum version of the PowerShell host program that works with the module. Enter a version number, such as 1.1.
+ Specifies a unique identifier for the module. The GUID is used to distinguish between modules with the same name.
- System.Version
+ System.Guid
- System.Version
+ System.Guid
None
- RequiredModules
+ HelpInfoUri
- Specifies modules that must be in the global session state. If the required modules aren't in the global session state, PowerShell imports them. If the required modules aren't available, the Import-Module command fails.
+ Specifies the internet address of the module's HelpInfo XML file. Enter a Uniform Resource Identifier (URI) that begins with `http:` or `https:`.
+ For more information, see Updatable Help (/powershell/module/microsoft.powershell.core/about/about_updatable_help).
- System.Object[]
+ System.Uri
- System.Object[]
+ System.Uri
None
- TypesToProcess
+ IconUri
- Specifies the type files (.ps1xml) that run when the module is imported.
- When you import the module, PowerShell runs the Update-TypeData cmdlet with the specified files. Because type files aren't scoped, they affect all session states in the session.
+ Specifies the URI of an icon for the module. The specified icon is displayed on the gallery web page for the module.
- System.String[]
+ System.Uri
- System.String[]
+ System.Uri
None
- FormatsToProcess
+ LicenseUri
- Specifies the formatting files (.ps1xml) that run when the module is imported.
- When you import a module, PowerShell runs the Update-FormatData cmdlet with the specified files. Because formatting files aren't scoped, they affect all session states in the session.
+ Specifies the URL of licensing terms for the module.
- System.String[]
+ System.Uri
- System.String[]
+ System.Uri
None
- ScriptsToProcess
+ ModuleList
- Specifies script (.ps1) files that run in the caller's session state when the module is imported. You can use these scripts to prepare an environment, just as you might use a login script.
- To specify scripts that run in the module's session state, use the NestedModules key.
+ Specifies an array of modules that are included in the module.
+ Enter each module name as a string or as a hashtable with ModuleName and ModuleVersion keys. The hashtable can also have an optional GUID key. You can combine strings and hashtables in the parameter value.
+ This key is designed to act as a module inventory.
- System.String[]
+ System.Object[]
- System.String[]
+ System.Object[]
None
- RequiredAssemblies
+ ModuleVersion
- Specifies the assembly (.dll) files that the module requires. Enter the assembly file names. PowerShell loads the specified assemblies before updating types or formats, importing nested modules, or importing the module file that is specified in the value of the RootModule key.
- Use this parameter to specify all the assemblies that the module requires, including assemblies that must be loaded to update any formatting or type files that are listed in the FormatsToProcess or TypesToProcess keys, even if those assemblies are also listed as binary modules in the NestedModules key.
+ Specifies the version of the module.
- System.String[]
+ System.Version
- System.String[]
+ System.Version
None
- FileList
+ NestedModules
- Specifies all items that are included in the module.
+ Specifies script modules (`.psm1`) and binary modules (`.dll`) that are imported into the module's session state. The files in the NestedModules key run in the order in which they're listed.
+ Enter each module name as a string or as a hashtable with ModuleName and ModuleVersion keys. The hashtable can also have an optional GUID key. You can combine strings and hashtables in the parameter value.
- System.String[]
+ System.Object[]
- System.String[]
+ System.Object[]
None
- ModuleList
-
- Specifies an array of modules that are included in the module.
- Enter each module name as a string or as a hash table with ModuleName and ModuleVersion keys. The hash table can also have an optional GUID key. You can combine strings and hash tables in the parameter value.
- This key is designed to act as a module inventory. The modules that are listed in the value of this key aren't automatically processed.
-
- System.String[]
-
- System.String[]
-
-
- None
-
-
- FunctionsToExport
+ PassThru
- Specifies the functions that the module exports. Wildcards are permitted.
- Use this parameter to restrict the functions that are exported by the module. FunctionsToExport can remove functions from the list of exported aliases, but it can't add functions to the list.
+
- System.String[]
- System.String[]
+ System.Management.Automation.SwitchParameter
- None
+ False
-
- AliasesToExport
+
+ PowerShellHostName
- Specifies the aliases that the module exports. Wildcards are permitted.
- Use this parameter to restrict the aliases that are exported by the module. AliasesToExport can remove aliases from the list of exported aliases, but it can't add aliases to the list.
+ Specifies the name of the PowerShell host program that the module requires. Enter the name of the host program, such as PowerShell ISE Host or ConsoleHost. Wildcards aren't permitted.
+ The name of a host program is stored in `$Host.Name`.
- System.String[]
+ System.String
- System.String[]
+ System.String
None
-
- VariablesToExport
+
+ PowerShellHostVersion
- Specifies the variables that the module exports. Wildcards are permitted.
- Use this parameter to restrict the variables that are exported by the module. VariablesToExport can remove variables from the list of exported variables, but it can't add variables to the list.
+ Specifies the minimum version of the PowerShell host program that works with the module. Enter a version number, such as 1.1.
- System.String[]
+ System.Version
- System.String[]
+ System.Version
None
-
- CmdletsToExport
+
+ PowerShellVersion
- Specifies the cmdlets that the module exports. Wildcards are permitted.
- Use this parameter to restrict the cmdlets that are exported by the module. CmdletsToExport can remove cmdlets from the list of exported cmdlets, but it can't add cmdlets to the list.
+ Specifies the minimum version of PowerShell that works with this module. For example, you can specify versions such as `5.1` or `7.2`.
- System.String[]
+ System.Version
- System.String[]
+ System.Version
None
-
- DscResourcesToExport
+
+ Prerelease
- Specifies the Desired State Configuration (DSC) resources that the module exports. Wildcards are permitted.
+ Specifies the prerelease value that is appended to the module version. For example, if Prerelease is `preview` and the ModuleVersion is `1.0.0`, the version of the module is `1.0.0-preview`.
- System.String[]
+ System.String
- System.String[]
+ System.String
None
@@ -3801,23 +4765,30 @@ PS C:\> Get-PSResourceRepository
PrivateData
- Specifies data that is passed to the module when it's imported.
+ Specifies data that is passed to the module when it's imported. This can be any arbitrary values stored in a hashtable.
- Hashtable
+ System.Collections.Hashtable
- Hashtable
+ System.Collections.Hashtable
None
- Tags
+ ProcessorArchitecture
- Specifies an array of tags.
+ Specifies the processor architecture that the module requires.
+ The acceptable values for this parameter are:
+ - `Amd64`
+ - `Arm`
+ - `IA64`
+ - `MSIL`
+ - `None` (unknown or unspecified)
+ - `X86`
- System.String[]
+ System.Reflection.ProcessorArchitecture
- System.String[]
+ System.Reflection.ProcessorArchitecture
None
@@ -3825,55 +4796,71 @@ PS C:\> Get-PSResourceRepository
ProjectUri
- Specifies the URL of a web page about this project.
+ Specifies the URI of a web page about this project.
- Uri
+ System.Uri
- Uri
+ System.Uri
None
- LicenseUri
+ ReleaseNotes
- Specifies the URL of licensing terms for the module.
+ Specifies a string that contains release notes or comments for the module.
- Uri
+ System.String
- Uri
+ System.String
None
- IconUri
+ RequiredAssemblies
- Specifies the URL of an icon for the module. The specified icon is displayed on the gallery web page for the module.
+ Specifies the assembly (`.dll`) files required by the module. PowerShell loads the specified assemblies before updating types or formats, importing nested modules, or importing the module file specified in the RootModule key.
+ Use RequiredAssemblies for assemblies that must be loaded to update any formatting or type files that are listed in the FormatsToProcess or TypesToProcess keys, even if those assemblies are also listed in the NestedModules key.
- Uri
+ System.String[]
- Uri
+ System.String[]
None
- ReleaseNotes
+ RequiredModules
- Specifies a string array that contains release notes or comments that you want available for this version of the script.
+ Specifies modules that must be in the global session state. If the required modules aren't in the global session state, PowerShell imports them. If the required modules aren't available, the `Import-Module` command fails.
+ The value can be an array containing module names or module specifications. 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.
- System.String[]
+ System.Object[]
- System.String[]
+ System.Object[]
None
- Prerelease
+ RequireLicenseAcceptance
+
+ Specifies that a license acceptance is required for the module.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ RootModule
- Specifies the prerelease tag that is appended to the module version. For example, if prerelease is "preview" and the module version is "1.0.0" the version of the module would be "1.0.0-preview".
+ Specifies the primary or root file of the module. Enter the file name of a script (`.ps1`), a script module (`.psm1`), a module manifest (`.psd1`), an assembly (`.dll`), or a cmdlet definition XML file (`.cdxml`). When the module is imported, the members exported from the root module are imported into the caller's session state.
+ If a module has a manifest file and no file is specified in the RootModule key, the manifest becomes the primary file for the module. The module is known as a manifest module ( ModuleType = `Manifest`).
+ To export members from `.psm1` or `.dll` files, the names of those files must be specified in the values of the RootModule or NestedModules keys in the manifest.
System.String
@@ -3883,35 +4870,35 @@ PS C:\> Get-PSResourceRepository
None
- HelpInfoUri
+ ScriptsToProcess
- Specifies the internet address of the module's HelpInfo XML file. Enter a Uniform Resource Identifier (URI) that begins with http or https.
- The HelpInfo XML file supports the Updatable Help feature that was introduced in PowerShell version 3.0. It contains information about the location of the module's downloadable help files and the version numbers of the newest help files for each supported locale.
- For information about Updatable Help, see: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_updatable_help?view=powershell-7.2. For information about the HelpInfo XML file, see: https://docs.microsoft.com/en-us/powershell/scripting/developer/module/supporting-updatable-help.
+ Specifies script (`.ps1`) files that run in the caller's session state when the module is imported. You can use these scripts to prepare an environment, just as you might use a login script.
+ To specify scripts that run in the module's session state, use the NestedModules key.
- Uri
+ System.String[]
- Uri
+ System.String[]
None
- DefaultCommandPrefix
+ Tags
- Specifies the default command prefix.
+ Specifies an array of tags.
- System.String
+ System.String[]
- System.String
+ System.String[]
None
- ExternalModuleDependencies
+ TypesToProcess
- Specifies an array of external module dependencies.
+ Specifies the type files (`.ps1xml`) that run when the module is imported.
+ When you import the module, PowerShell runs the `Update-TypeData` cmdlet with the specified files. Because type files aren't scoped, they affect all session states in the session.
System.String[]
@@ -3920,65 +4907,66 @@ PS C:\> Get-PSResourceRepository
None
-
- RequireLicenseAcceptance
+
+ VariablesToExport
- Specifies that a license acceptance is required for the module.
+ Specifies the variables that the module exports. Wildcards are permitted.
+ Use this parameter to restrict which variables that are exported by the module.
+ System.String[]
- System.Management.Automation.SwitchParameter
+ System.String[]
- False
+ None
-
- Path
+
+ AliasesToExport
- Specifies the path and file name of the module manifest. Enter a path and file name with a .psd1 file name extension, such as `"$PSHOME\Modules\MyModule\MyModule.psd1`.
+ Specifies the aliases that the module exports. Wildcards are permitted.
- String
+ System.String[]
- String
+ System.String[]
None
- NestedModules
+ Author
- Specifies script modules (.psm1) and binary modules (.dll) that are imported into the module's session state. The files in the NestedModules key run in the order in which they're listed in the value.
- Enter each module name as a string or as a hash table with ModuleName and ModuleVersion keys. The hash table can also have an optional GUID key. You can combine strings and hash tables in the parameter value.
+ Specifies the module author.
- Object[]
+ System.String
- Object[]
+ System.String
None
- Guid
+ ClrVersion
- Specifies a unique identifier for the module. The GUID can be used to distinguish among modules with the same name.
+ Specifies the minimum version of the Common Language Runtime (CLR) of the Microsoft .NET Framework required by the module.
- System.Guid
+ System.Version
- System.Guid
+ System.Version
None
-
- Author
+
+ CmdletsToExport
- Specifies the module author.
+ Specifies the cmdlets that the module exports. Wildcards are permitted.
- String
+ System.String[]
- String
+ System.String[]
None
@@ -3988,31 +4976,29 @@ PS C:\> Get-PSResourceRepository
Specifies the company or vendor who created the module.
- String
+ System.String
- String
+ System.String
None
- Copyright
+ CompatiblePSEditions
- Specifies a copyright statement for the module.
+ Specifies the compatible PSEditions of the module. For information about PSEdition , see Modules with compatible PowerShell Editions (/powershell/scripting/gallery/concepts/module-psedition-support).
- String
+ System.String[]
- String
+ System.String[]
None
- RootModule
+ Copyright
- Specifies the primary or root file of the module. Enter the file name of a script (.ps1), a script module (.psm1), a module manifest (.psd1), an assembly (.dll), a cmdlet definition XML file (.cdxml), or a workflow (.xaml). When the module is imported, the members that are exported from the root module file are imported into the caller's session state.
- If a module has a manifest file and no root file has been specified in the RootModule key, the manifest becomes the primary file for the module. And, the module becomes a manifest module (ModuleType = Manifest).
- To export members from .psm1 or .dll files in a module that has a manifest, the names of those files must be specified in the values of the RootModule or NestedModules keys in the manifest. Otherwise, their members aren't exported.
+ Specifies a copyright statement for the module.
System.String
@@ -4022,13 +5008,13 @@ PS C:\> Get-PSResourceRepository
None
- ModuleVersion
+ DefaultCommandPrefix
- Specifies the version of the module.
+ Specifies the default command prefix.
- System.Version
+ System.String
- System.Version
+ System.String
None
@@ -4046,28 +5032,21 @@ PS C:\> Get-PSResourceRepository
None
- ProcessorArchitecture
+ DotNetFrameworkVersion
- Specifies the processor architecture that the module requires.
- The acceptable values for this parameter are:
- * Amd64
- * Arm
- * IA64
- * MSIL
- * None (unknown or unspecified)
- * X86
+ Specifies the minimum version of the Microsoft .NET Framework required by the module.
- System.Reflection.ProcessorArchitecture
+ System.Version
- System.Reflection.ProcessorArchitecture
+ System.Version
None
-
- CompatiblePSEditions
+
+ DscResourcesToExport
- Specifies the compatible PSEditions of the module. For information about PSEdition, see: https://docs.microsoft.com/en-us/powershell/scripting/gallery/concepts/module-psedition-support
+ Specifies the Desired State Configuration (DSC) resources that the module exports. Wildcards are permitted.
System.String[]
@@ -4077,296 +5056,315 @@ PS C:\> Get-PSResourceRepository
None
- PowerShellVersion
+ ExternalModuleDependencies
- Specifies the minimum version of PowerShell that will work with this module. For example, you can specify 3.0, 4.0, or 5.0 as the value of this parameter.
+ Specifies an array of external module dependencies.
- System.Version
+ System.String[]
- System.Version
+ System.String[]
None
- ClrVersion
+ FileList
- Specifies the minimum version of the Common Language Runtime (CLR) of the Microsoft .NET Framework that the module requires.
+ Specifies all items that are included in the module.
- System.Version
+ System.String[]
- System.Version
+ System.String[]
None
- DotNetFrameworkVersion
+ FormatsToProcess
- Specifies the minimum version of the Microsoft .NET Framework that the module requires.
+ Specifies the formatting files (`.ps1xml`) that are processed when the module is imported.
+ When you import a module, PowerShell runs the `Update-FormatData` cmdlet with the specified files. Because formatting files aren't scoped, they affect all session states in the session.
- System.Version
+ System.String[]
- System.Version
+ System.String[]
None
-
- PowerShellHostName
+
+ FunctionsToExport
- Specifies the name of the PowerShell host program that the module requires. Enter the name of the host program, such as PowerShell ISE Host or ConsoleHost. Wildcards aren't permitted.
- To find the name of a host program, in the program, type $Host.Name.
+ Specifies the functions that the module exports. Wildcards are permitted.
- System.String
+ System.String[]
- System.String
+ System.String[]
None
- PowerShellHostVersion
+ Guid
- Specifies the minimum version of the PowerShell host program that works with the module. Enter a version number, such as 1.1.
+ Specifies a unique identifier for the module. The GUID is used to distinguish between modules with the same name.
- System.Version
+ System.Guid
- System.Version
+ System.Guid
None
- RequiredModules
+ HelpInfoUri
- Specifies modules that must be in the global session state. If the required modules aren't in the global session state, PowerShell imports them. If the required modules aren't available, the Import-Module command fails.
+ Specifies the internet address of the module's HelpInfo XML file. Enter a Uniform Resource Identifier (URI) that begins with `http:` or `https:`.
+ For more information, see Updatable Help (/powershell/module/microsoft.powershell.core/about/about_updatable_help).
- System.Object[]
+ System.Uri
- System.Object[]
+ System.Uri
None
- TypesToProcess
+ IconUri
- Specifies the type files (.ps1xml) that run when the module is imported.
- When you import the module, PowerShell runs the Update-TypeData cmdlet with the specified files. Because type files aren't scoped, they affect all session states in the session.
+ Specifies the URI of an icon for the module. The specified icon is displayed on the gallery web page for the module.
- System.String[]
+ System.Uri
- System.String[]
+ System.Uri
None
- FormatsToProcess
+ LicenseUri
- Specifies the formatting files (.ps1xml) that run when the module is imported.
- When you import a module, PowerShell runs the Update-FormatData cmdlet with the specified files. Because formatting files aren't scoped, they affect all session states in the session.
+ Specifies the URL of licensing terms for the module.
- System.String[]
+ System.Uri
- System.String[]
+ System.Uri
None
- ScriptsToProcess
+ ModuleList
- Specifies script (.ps1) files that run in the caller's session state when the module is imported. You can use these scripts to prepare an environment, just as you might use a login script.
- To specify scripts that run in the module's session state, use the NestedModules key.
+ Specifies an array of modules that are included in the module.
+ Enter each module name as a string or as a hashtable with ModuleName and ModuleVersion keys. The hashtable can also have an optional GUID key. You can combine strings and hashtables in the parameter value.
+ This key is designed to act as a module inventory.
- System.String[]
+ System.Object[]
- System.String[]
+ System.Object[]
None
- RequiredAssemblies
+ ModuleVersion
- Specifies the assembly (.dll) files that the module requires. Enter the assembly file names. PowerShell loads the specified assemblies before updating types or formats, importing nested modules, or importing the module file that is specified in the value of the RootModule key.
- Use this parameter to specify all the assemblies that the module requires, including assemblies that must be loaded to update any formatting or type files that are listed in the FormatsToProcess or TypesToProcess keys, even if those assemblies are also listed as binary modules in the NestedModules key.
+ Specifies the version of the module.
- System.String[]
+ System.Version
- System.String[]
+ System.Version
None
- FileList
+ NestedModules
- Specifies all items that are included in the module.
+ Specifies script modules (`.psm1`) and binary modules (`.dll`) that are imported into the module's session state. The files in the NestedModules key run in the order in which they're listed.
+ Enter each module name as a string or as a hashtable with ModuleName and ModuleVersion keys. The hashtable can also have an optional GUID key. You can combine strings and hashtables in the parameter value.
- System.String[]
+ System.Object[]
- System.String[]
+ System.Object[]
None
- ModuleList
+ PassThru
- Specifies an array of modules that are included in the module.
- Enter each module name as a string or as a hash table with ModuleName and ModuleVersion keys. The hash table can also have an optional GUID key. You can combine strings and hash tables in the parameter value.
- This key is designed to act as a module inventory. The modules that are listed in the value of this key aren't automatically processed.
+
- System.String[]
+ System.Management.Automation.SwitchParameter
- System.String[]
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
+
+ Path
+
+ Specifies the path and filename of the module manifest. Enter filename with a `.psd1` file extension.
+
+ System.String
+
+ System.String
None
-
- FunctionsToExport
+
+ PowerShellHostName
- Specifies the functions that the module exports. Wildcards are permitted.
- Use this parameter to restrict the functions that are exported by the module. FunctionsToExport can remove functions from the list of exported aliases, but it can't add functions to the list.
+ Specifies the name of the PowerShell host program that the module requires. Enter the name of the host program, such as PowerShell ISE Host or ConsoleHost. Wildcards aren't permitted.
+ The name of a host program is stored in `$Host.Name`.
- System.String[]
+ System.String
- System.String[]
+ System.String
None
-
- AliasesToExport
+
+ PowerShellHostVersion
- Specifies the aliases that the module exports. Wildcards are permitted.
- Use this parameter to restrict the aliases that are exported by the module. AliasesToExport can remove aliases from the list of exported aliases, but it can't add aliases to the list.
+ Specifies the minimum version of the PowerShell host program that works with the module. Enter a version number, such as 1.1.
- System.String[]
+ System.Version
- System.String[]
+ System.Version
None
-
- VariablesToExport
+
+ PowerShellVersion
- Specifies the variables that the module exports. Wildcards are permitted.
- Use this parameter to restrict the variables that are exported by the module. VariablesToExport can remove variables from the list of exported variables, but it can't add variables to the list.
+ Specifies the minimum version of PowerShell that works with this module. For example, you can specify versions such as `5.1` or `7.2`.
- System.String[]
+ System.Version
- System.String[]
+ System.Version
None
-
- CmdletsToExport
+
+ Prerelease
- Specifies the cmdlets that the module exports. Wildcards are permitted.
- Use this parameter to restrict the cmdlets that are exported by the module. CmdletsToExport can remove cmdlets from the list of exported cmdlets, but it can't add cmdlets to the list.
+ Specifies the prerelease value that is appended to the module version. For example, if Prerelease is `preview` and the ModuleVersion is `1.0.0`, the version of the module is `1.0.0-preview`.
- System.String[]
+ System.String
- System.String[]
+ System.String
None
-
- DscResourcesToExport
+
+ PrivateData
- Specifies the Desired State Configuration (DSC) resources that the module exports. Wildcards are permitted.
+ Specifies data that is passed to the module when it's imported. This can be any arbitrary values stored in a hashtable.
- System.String[]
+ System.Collections.Hashtable
- System.String[]
+ System.Collections.Hashtable
None
- PrivateData
+ ProcessorArchitecture
- Specifies data that is passed to the module when it's imported.
+ Specifies the processor architecture that the module requires.
+ The acceptable values for this parameter are:
+ - `Amd64`
+ - `Arm`
+ - `IA64`
+ - `MSIL`
+ - `None` (unknown or unspecified)
+ - `X86`
- Hashtable
+ System.Reflection.ProcessorArchitecture
- Hashtable
+ System.Reflection.ProcessorArchitecture
None
- Tags
+ ProjectUri
- Specifies an array of tags.
+ Specifies the URI of a web page about this project.
- System.String[]
+ System.Uri
- System.String[]
+ System.Uri
None
- ProjectUri
+ ReleaseNotes
- Specifies the URL of a web page about this project.
+ Specifies a string that contains release notes or comments for the module.
- Uri
+ System.String
- Uri
+ System.String
None
- LicenseUri
+ RequiredAssemblies
- Specifies the URL of licensing terms for the module.
+ Specifies the assembly (`.dll`) files required by the module. PowerShell loads the specified assemblies before updating types or formats, importing nested modules, or importing the module file specified in the RootModule key.
+ Use RequiredAssemblies for assemblies that must be loaded to update any formatting or type files that are listed in the FormatsToProcess or TypesToProcess keys, even if those assemblies are also listed in the NestedModules key.
- Uri
+ System.String[]
- Uri
+ System.String[]
None
- IconUri
+ RequiredModules
- Specifies the URL of an icon for the module. The specified icon is displayed on the gallery web page for the module.
+ Specifies modules that must be in the global session state. If the required modules aren't in the global session state, PowerShell imports them. If the required modules aren't available, the `Import-Module` command fails.
+ The value can be an array containing module names or module specifications. 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.
- Uri
+ System.Object[]
- Uri
+ System.Object[]
None
- ReleaseNotes
+ RequireLicenseAcceptance
- Specifies a string array that contains release notes or comments that you want available for this version of the script.
+ Specifies that a license acceptance is required for the module.
- System.String[]
+ System.Management.Automation.SwitchParameter
- System.String[]
+ System.Management.Automation.SwitchParameter
- None
+ False
- Prerelease
+ RootModule
- Specifies the prerelease tag that is appended to the module version. For example, if prerelease is "preview" and the module version is "1.0.0" the version of the module would be "1.0.0-preview".
+ Specifies the primary or root file of the module. Enter the file name of a script (`.ps1`), a script module (`.psm1`), a module manifest (`.psd1`), an assembly (`.dll`), or a cmdlet definition XML file (`.cdxml`). When the module is imported, the members exported from the root module are imported into the caller's session state.
+ If a module has a manifest file and no file is specified in the RootModule key, the manifest becomes the primary file for the module. The module is known as a manifest module ( ModuleType = `Manifest`).
+ To export members from `.psm1` or `.dll` files, the names of those files must be specified in the values of the RootModule or NestedModules keys in the manifest.
System.String
@@ -4376,35 +5374,35 @@ PS C:\> Get-PSResourceRepository
None
- HelpInfoUri
+ ScriptsToProcess
- Specifies the internet address of the module's HelpInfo XML file. Enter a Uniform Resource Identifier (URI) that begins with http or https.
- The HelpInfo XML file supports the Updatable Help feature that was introduced in PowerShell version 3.0. It contains information about the location of the module's downloadable help files and the version numbers of the newest help files for each supported locale.
- For information about Updatable Help, see: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_updatable_help?view=powershell-7.2. For information about the HelpInfo XML file, see: https://docs.microsoft.com/en-us/powershell/scripting/developer/module/supporting-updatable-help.
+ Specifies script (`.ps1`) files that run in the caller's session state when the module is imported. You can use these scripts to prepare an environment, just as you might use a login script.
+ To specify scripts that run in the module's session state, use the NestedModules key.
- Uri
+ System.String[]
- Uri
+ System.String[]
None
- DefaultCommandPrefix
+ Tags
- Specifies the default command prefix.
+ Specifies an array of tags.
- System.String
+ System.String[]
- System.String
+ System.String[]
None
- ExternalModuleDependencies
+ TypesToProcess
- Specifies an array of external module dependencies.
+ Specifies the type files (`.ps1xml`) that run when the module is imported.
+ When you import the module, PowerShell runs the `Update-TypeData` cmdlet with the specified files. Because type files aren't scoped, they affect all session states in the session.
System.String[]
@@ -4413,17 +5411,18 @@ PS C:\> Get-PSResourceRepository
None
-
- RequireLicenseAcceptance
+
+ VariablesToExport
- Specifies that a license acceptance is required for the module.
+ Specifies the variables that the module exports. Wildcards are permitted.
+ Use this parameter to restrict which variables that are exported by the module.
- System.Management.Automation.SwitchParameter
+ System.String[]
- System.Management.Automation.SwitchParameter
+ System.String[]
- False
+ None
@@ -4439,33 +5438,38 @@ PS C:\> Get-PSResourceRepository
- ## RELATED LINKS
+ For a full description of the module manifest file, see about_Module_Manifests (/powershell/module/microsoft.powershell.core/about/about_module_manifests).
-------------------------- Example 1 --------------------------
- PS C:\> Update-ModuleManifest -Path "C:\MyModules\TestModule" -Author "New Author"
+ Update-ModuleManifest -Path "C:\MyModules\TestModule" -Author "New Author"
- In this example the author property in the module manifest will be updated to "New Author".
+
-------------------------- Example 2 --------------------------
- PS C:\> Update-ModuleManifest -Path "C:\MyModules\TestModule" -Prerelease "beta2"
+ Update-ModuleManifest -Path "C:\MyModules\TestModule" -Prerelease "beta2"
- In this example the prerelease property will be updated to "beta2"
+
-------------------------- Example 3 --------------------------
- PS C:\> Update-ModuleManifest -Path "C:\MyModules\TestModule" -Tags "Windows", "Linux" -Description "A module for managing packages."
+ Update-ModuleManifest -Path "C:\MyModules\TestModule" -Tags "Windows", "Linux" -Description "A module for managing packages."
- In this example the tags and description will be updated to the passed in values.
+
-
+
+
+ New-ModuleManifest
+
+
+
@@ -4473,19 +5477,20 @@ PS C:\> Get-PSResourceRepository
Update
PSResource
- Updates a package already installed on the user's machine.
+ Downloads and installs the newest version of a package already installed on the local machine.
- The Update-PSResource cmdlet replaces the Update-Module and Update-Script cmdlets from V2. It updates an already installed package based on the `-Name` parameter argument. It does not return an object. Other parameters allow the package to be updated to be further filtered.
+ `Update-PSResource` downloads and installs the newest version of a package already installed on the local machine. This cmdlet replaces the `Update-Module` and `Update-Script` cmdlets from PowerShellGet v2. The new version of the resource is installed side-by-side with previous versions in a new versioned folder.
+ By default, `Update-PSResource` installs the latest version of the package and any of its dependencies without deleting the older versions installed.
Update-PSResource
-
+
Name
- Specifies name of a resource or resources to update.
+ Specifies the name of one or more resources to update. Wildcards are supported but NuGet only accepts the `*` character. NuGet does not support wildcard searches of local (file-based) repositories.
System.String[]
@@ -4505,10 +5510,21 @@ PS C:\> Get-PSResourceRepository
False
+
+ AuthenticodeCheck
+
+ Validates signed files and catalog files on Windows.
+
+
+ System.Management.Automation.SwitchParameter
+
+
+ False
+
Credential
- Specifies optional credentials to be used when accessing a private repository.
+ Specifies optional credentials used when accessing a private repository.
System.Management.Automation.PSCredential
@@ -4518,9 +5534,9 @@ PS C:\> Get-PSResourceRepository
None
- Prerelease
+ Force
- When specified, allows updating to a prerelease version.
+ When specified, bypasses checks for TrustRepository and AcceptLicense and updates the package.
System.Management.Automation.SwitchParameter
@@ -4529,9 +5545,9 @@ PS C:\> Get-PSResourceRepository
False
- Quiet
+ PassThru
- Supresses progress information.
+ When specified, outputs a PSResourceInfo object for the saved resource.
System.Management.Automation.SwitchParameter
@@ -4540,37 +5556,32 @@ PS C:\> Get-PSResourceRepository
False
- Repository
+ TemporaryPath
- Specifies one or more repository names to update packages from. If not specified, search for packages to update will include all currently registered repositories in order of highest priority.
+ Specifies the path to temporarily install the resource before actual installatoin. If no temporary path is provided, the resource is temporarily installed in the current user's temporary folder.
- System.String[]
+ System.String
- System.String[]
+ System.String
None
- Scope
+ Prerelease
- Specifies the scope of the resource to update.
+ When specified, allows updating to a prerelease version.
-
- CurrentUser
- AllUsers
-
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+ System.Management.Automation.SwitchParameter
- None
+ False
- TrustRepository
+ Quiet
- Specifies optional credentials to be used when accessing a private repository.
+ Supresses progress information.
System.Management.Automation.SwitchParameter
@@ -4578,34 +5589,44 @@ PS C:\> Get-PSResourceRepository
False
-
- Version
+
+ Repository
- Specifies the version of the resource to be updated to. The value can be an exact version or a version range using the NuGet versioning syntax.
- For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges)PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. So inputting "1.0.0.0" as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the values is considered as the required version and yields version 1.0.0.0 only (required version). To use the minimum inclusive range, provide `[1.0.0.0, ]` as the version range.
+ Specifies one or more repository names to search. Wildcards are supported.
+ If not specified, search includes all registered repositories, in priority order (highest first), until a repository is found that contains the package.
+ Lower Priority values have a higher precedence.
- System.String
+ System.String[]
- System.String
+ System.String[]
None
- Force
+ Scope
- When specified, bypasses checks for TrustRepository and AcceptLicense and updates the package.
+ Specifies the installation scope. Accepted values are:
+ - `CurrentUser`
+ - `AllUsers`
+
+ The default scope is `CurrentUser`, which doesn't require elevation.
+
+ CurrentUser
+ AllUsers
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- System.Management.Automation.SwitchParameter
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- False
+ None
- PassThru
+ SkipDependencyCheck
- Passes the resource updated to the console.
+ Skips the check for resource dependencies. This means that only named resources are updated.
System.Management.Automation.SwitchParameter
@@ -4614,9 +5635,9 @@ PS C:\> Get-PSResourceRepository
False
- AuthenticodeCheck
+ TrustRepository
- Does a check to to validate signed files and catalog files on Windows.
+ Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository isn't configured as trusted.
System.Management.Automation.SwitchParameter
@@ -4625,15 +5646,18 @@ PS C:\> Get-PSResourceRepository
False
- SkipdependencyCheck
+ Version
- Skips the check for resource dependencies, so that only found resources are updated, and not any resources the found resource depends on.
+ Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
+ For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
+ System.String
- System.Management.Automation.SwitchParameter
+ System.String
- False
+ None
Confirm
@@ -4649,7 +5673,7 @@ PS C:\> Get-PSResourceRepository
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -4673,33 +5697,33 @@ PS C:\> Get-PSResourceRepository
False
- Credential
+ AuthenticodeCheck
- Specifies optional credentials to be used when accessing a private repository.
+ Validates signed files and catalog files on Windows.
- System.Management.Automation.PSCredential
+ System.Management.Automation.SwitchParameter
- System.Management.Automation.PSCredential
+ System.Management.Automation.SwitchParameter
- None
+ False
-
- Name
+
+ Credential
- Specifies name of a resource or resources to update.
+ Specifies optional credentials used when accessing a private repository.
- System.String[]
+ System.Management.Automation.PSCredential
- System.String[]
+ System.Management.Automation.PSCredential
- "*"
+ None
- Prerelease
+ Force
- When specified, allows updating to a prerelease version.
+ When specified, bypasses checks for TrustRepository and AcceptLicense and updates the package.
System.Management.Automation.SwitchParameter
@@ -4708,10 +5732,22 @@ PS C:\> Get-PSResourceRepository
False
+
+ Name
+
+ Specifies the name of one or more resources to update. Wildcards are supported but NuGet only accepts the `*` character. NuGet does not support wildcard searches of local (file-based) repositories.
+
+ System.String[]
+
+ System.String[]
+
+
+ "*"
+
- Quiet
+ PassThru
- Supresses progress information.
+ When specified, outputs a PSResourceInfo object for the saved resource.
System.Management.Automation.SwitchParameter
@@ -4721,33 +5757,33 @@ PS C:\> Get-PSResourceRepository
False
- Repository
+ TemporaryPath
- Specifies one or more repository names to update packages from. If not specified, search for packages to update will include all currently registered repositories in order of highest priority.
+ Specifies the path to temporarily install the resource before actual installatoin. If no temporary path is provided, the resource is temporarily installed in the current user's temporary folder.
- System.String[]
+ System.String
- System.String[]
+ System.String
None
- Scope
+ Prerelease
- Specifies the scope of the resource to update.
+ When specified, allows updating to a prerelease version.
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+ System.Management.Automation.SwitchParameter
- Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
+ System.Management.Automation.SwitchParameter
- None
+ False
- TrustRepository
+ Quiet
- Specifies optional credentials to be used when accessing a private repository.
+ Supresses progress information.
System.Management.Automation.SwitchParameter
@@ -4756,35 +5792,40 @@ PS C:\> Get-PSResourceRepository
False
-
- Version
+
+ Repository
- Specifies the version of the resource to be updated to. The value can be an exact version or a version range using the NuGet versioning syntax.
- For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges)PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. So inputting "1.0.0.0" as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the values is considered as the required version and yields version 1.0.0.0 only (required version). To use the minimum inclusive range, provide `[1.0.0.0, ]` as the version range.
+ Specifies one or more repository names to search. Wildcards are supported.
+ If not specified, search includes all registered repositories, in priority order (highest first), until a repository is found that contains the package.
+ Lower Priority values have a higher precedence.
- System.String
+ System.String[]
- System.String
+ System.String[]
None
- Force
+ Scope
- When specified, bypasses checks for TrustRepository and AcceptLicense and updates the package.
+ Specifies the installation scope. Accepted values are:
+ - `CurrentUser`
+ - `AllUsers`
+
+ The default scope is `CurrentUser`, which doesn't require elevation.
- System.Management.Automation.SwitchParameter
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- System.Management.Automation.SwitchParameter
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
- False
+ None
- PassThru
+ SkipDependencyCheck
- Passes the resource updated to the console.
+ Skips the check for resource dependencies. This means that only named resources are updated.
System.Management.Automation.SwitchParameter
@@ -4794,9 +5835,9 @@ PS C:\> Get-PSResourceRepository
False
- AuthenticodeCheck
+ TrustRepository
- Does a check to to validate signed files and catalog files on Windows.
+ Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository isn't configured as trusted.
System.Management.Automation.SwitchParameter
@@ -4806,16 +5847,18 @@ PS C:\> Get-PSResourceRepository
False
- SkipdependencyCheck
+ Version
- Skips the check for resource dependencies, so that only found resources are updated, and not any resources the found resource depends on.
+ Specifies the version of the resource to be returned. The value can be an exact version or a version range using the NuGet versioning syntax.
+ For more information about NuGet version ranges, see Package versioning (/nuget/concepts/package-versioning#version-ranges).
+ PowerShellGet supports all but the minimum inclusive version listed in the NuGet version range documentation. Using `1.0.0.0` as the version doesn't yield versions 1.0.0.0 and higher (minimum inclusive range). Instead, the value is considered to be the required version. To search for a minimum inclusive range, use `[1.0.0.0, ]` as the version range.
- System.Management.Automation.SwitchParameter
+ System.String
- System.Management.Automation.SwitchParameter
+ System.String
- False
+ None
Confirm
@@ -4832,7 +5875,7 @@ PS C:\> Get-PSResourceRepository
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet isn't run.
System.Management.Automation.SwitchParameter
@@ -4852,7 +5895,16 @@ PS C:\> Get-PSResourceRepository
-
+
+
+
+ Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo
+
+
+ By default, the cmdlet doesn't return any objects. When the PassThru parameter is used, the cmdlet outputs a PSResourceInfo object for the saved resource.
+
+
+
@@ -4861,26 +5913,26 @@ PS C:\> Get-PSResourceRepository
-------------------------- Example 1 --------------------------
- PS C:\> Update-PSResource -Name "TestModule"
- Name Version Prerelease Description
- ---- ------- ---------- -----------
- TestModule 1.2.0 test
+ Get-PSResource -Name "TestModule"
-PS C:\> Update-PSResource -Name "TestModule"
+Name Version Prerelease Description
+---- ------- ---------- -----------
+TestModule 1.2.0 test
-PS C:\> Update-PSResource -Name "TestModule"
- Name Version Prerelease Description
- ---- ------- ---------- -----------
- TestModule 1.3.0 test
- TestModule 1.2.0 test
+Update-PSResource -Name "TestModule"
+
+Name Version Prerelease Description
+---- ------- ---------- -----------
+TestModule 1.3.0 test
+TestModule 1.2.0 test
- In this example, the user already has the TestModule package installed and they update the package. Update-PSResource will install the latest version of the package without deleting the older version installed.
+
- <add>
+ Install-PSResource