diff --git a/help/Find-PSResource.md b/help/Find-PSResource.md index a29c9bb27..9c0f8b892 100644 --- a/help/Find-PSResource.md +++ b/help/Find-PSResource.md @@ -1,22 +1,20 @@ --- external help file: PowerShellGet.dll-Help.xml Module Name: PowerShellGet -online version: +online version: schema: 2.0.0 --- # Find-PSResource ## SYNOPSIS -Searches for packages from a repository (local or remote), based on Name or other package properties. - +Searches for packages from a repository (local or remote), based on `-Name` and other package properties. ## SYNTAX ### ResourceNameParameterSet (Default) ``` PowerShell -[[-Name] ] [-Type ] [-Version ] [-Prerelease] [-Tag ] -[-Repository ] [-Credential ] [-IncludeDependencies] [-WhatIf] [-Confirm] [] +[[-Name] ] [-Type ] [-Version ] [-Prerelease] [-Tag ] [-Repository ] [-Credential ] [-IncludeDependencies] [-WhatIf] [-Confirm] [] ``` ### CommandNameParameterSet @@ -44,7 +42,7 @@ Searches for packages from a repository (local or remote), based on Name or othe ``` ## DESCRIPTION -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 `-Name` or other package properties. ## EXAMPLES These examples assume that the PSGallery repository is registered and contains the packages we are searching for. @@ -162,7 +160,7 @@ Accept wildcard characters: False ### -Repository Specifies one or more repository names to search. -If not specified, search will include all currently registered repositories, in order of highest priority, til first repository package is found in. +If not specified, search will include all currently registered repositories, in order of highest priority, until a repository is found that contains the package. ```yaml Type: System.String[] @@ -210,6 +208,7 @@ Accept wildcard characters: False ### -Version Specifies the version of the resource to be returned. +Expected version/version range format is documented here: https://docs.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml Type: System.String @@ -261,14 +260,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.String[] -### System.String - -### System.Management.Automation.PSCredential - -### System.Management.Automation.SwitchParameter - -### Microsoft.PowerShell.PowerShellGet.UtilClasses.ResourceType[] - ## OUTPUTS ### Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo diff --git a/help/Get-PSResourceRepository.md b/help/Get-PSResourceRepository.md index cb3f7e77f..a2aeff8ea 100644 --- a/help/Get-PSResourceRepository.md +++ b/help/Get-PSResourceRepository.md @@ -17,7 +17,7 @@ Get-PSResourceRepository [[-Name] ] [] ``` ## DESCRIPTION -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. +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. ## EXAMPLES @@ -71,7 +71,7 @@ This example runs the command with the 'Name' parameter being set to a single wi ## PARAMETERS ### -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. +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. ```yaml Type: String[] @@ -91,9 +91,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS ### System.String[] + ## OUTPUTS ### Microsoft.PowerShell.PowerShellGet.UtilClasses.PSRepositoryInfo + ## NOTES If no value for Name is provided, Get-PSResourceRepository will return information for all registered repositories. diff --git a/help/Register-PSResourceRepository.md b/help/Register-PSResourceRepository.md index 698267ab3..a676178d2 100644 --- a/help/Register-PSResourceRepository.md +++ b/help/Register-PSResourceRepository.md @@ -14,7 +14,7 @@ Registers a repository for PowerShell resources. ### NameParameterSet (Default) ``` -Register-PSResourceRepository [-Name] [-URL] [-Trusted] [-Priority ] [-PassThru] +Register-PSResourceRepository [-Name] [-URL] [-Trusted] [-Priority ] [-PassThru] [-WhatIf] [-Confirm] [] ``` @@ -33,7 +33,7 @@ Register-PSResourceRepository -Repositories [-PassThru] [-WhatIf] The Register-PSResourceRepository cmdlet registers a repository for PowerShell resources. ## EXAMPLES -These examples assume that the repository we attempt to reigster is not already registered on the user's machine. +These examples assume that the repository we attempt to register is not already registered on the user's machine. ### Example 1 ``` PS C:\> Register-PSResourceRepository -Name "PoshTestGallery" -URL "https://www.powershellgallery.com/api/v2" @@ -43,7 +43,7 @@ PS C:\> Get-PSResourceRepository -Name "PoshTestGallery" PoshTestGallery https://www.poshtestgallery.com/api/v2 False 50 ``` -This example registers the repository with the 'Name' of "PoshTestGallery" along with the associated 'URL' value for it. +This example registers the repository with the `-Name` of "PoshTestGallery" along with the associated `URL` value for it. ### Example 2 ``` @@ -54,7 +54,7 @@ PS C:\> Get-PSResourceRepository -Name "PSGallery" 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 'URL' parameters to register the "PSGallery" repository as it is considered Powershell's default repository store and has its own value for URL. +This example registers the "PSGallery" repository, with the 'PSGallery' parameter. Unlike the previous example, we cannot use the `-Name` or `-URL` parameters to register the "PSGallery" repository as it is considered Powershell's default repository store and has its own value for URL. ### Example 3 ``` @@ -68,12 +68,13 @@ PS C:\> Get-PSResourceRepository ``` -This example registers multiple repositories at once. To do so, we use the 'Repositories' 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. +This example registers multiple repositories at once. To do so, we use the `-Repositories` 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. ## PARAMETERS ### -Name Name of the repository to be registered. +Cannot be "PSGallery". ```yaml Type: String @@ -153,7 +154,7 @@ Specifies the location of the repository to be registered. URL can be of the following Uri schemas: HTTPS, HTTP, FTP, file share based. ```yaml -Type: Uri +Type: String Parameter Sets: NameParameterSet Aliases: @@ -216,12 +217,16 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS ### System.String -### System.Uri + ## OUTPUTS -### Microsoft.PowerShell.PowerShellGet.UtilClasses.PSRepositoryInfo (if 'PassThru' parameter used) +### Microsoft.PowerShell.PowerShellGet.UtilClasses.PSRepositoryInfo (if 'PassThru' parameter is used) + ## NOTES 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 'URL' parameters). +URL string input must be of one of the following Uri schemes: HTTP, HTTPS, FTP, File + ## RELATED LINKS diff --git a/help/Set-PSResourceRepository.md b/help/Set-PSResourceRepository.md index 1b2e76236..a775ad574 100644 --- a/help/Set-PSResourceRepository.md +++ b/help/Set-PSResourceRepository.md @@ -1,7 +1,7 @@ --- external help file: PowerShellGet.dll-Help.xml Module Name: PowerShellGet -online version: +online version: schema: 2.0.0 --- @@ -14,7 +14,7 @@ Sets information for a registered repository. ### NameParameterSet (Default) ``` -Set-PSResourceRepository [-Name] [-URL ] [-Trusted] [-Priority ] [-WhatIf] [-Confirm] [] +Set-PSResourceRepository [-Name] [-URL ] [-Trusted] [-Priority ] [-WhatIf] [-Confirm] [] ``` ### RepositoriesParameterSet @@ -26,7 +26,7 @@ Set-PSResourceRepository -Repositories [-Priority ] [-WhatI The Set-PSResourceRepository cmdlet sets information for a registered repository. ## EXAMPLES -These examples are run independently of each other and assume the repositories used are already registered. The 'PassThru' parameter used with Set-PSResourceRepository is only used to display the changes made to the repository and is not mandatory. +These examples are run independently of each other and assume the repositories used are already registered. The `-PassThru` parameter used with Set-PSResourceRepository is only used to display the changes made to the repository and is not mandatory. ### Example 1 ```powershell PS C:\> Get-PSResourceRepository -Name "PoshTestGallery" @@ -39,7 +39,7 @@ PS C:\> Set-PSResourceRepository -Name "PoshTestGallery" -URL "c:/code/testdir" PoshTestGallery file:///c:/code/testdir False 50 ``` -This example first checks if the PoshTestGallery repository has been registered. We wish to set the 'URL' value of this repository by running the Set-PSResourceRepository cmdlet with the 'URL' parameter and a valid Uri scheme url. We run the Get-PSResourceRepository cmdlet again to ensure that the 'URL' of the repository was changed. We also use the 'PassThru' parameter to see the changed repository. +This example first checks if the PoshTestGallery repository has been registered. We wish to set the `-URL` value of this repository by running the Set-PSResourceRepository cmdlet with the `-URL` parameter and a valid Uri scheme url. We run the Get-PSResourceRepository cmdlet again to ensure that the `-URL` of the repository was changed. We also use the `-PassThru` parameter to see the changed repository. ### Example 2 ```powershell @@ -53,7 +53,7 @@ PS C:\> Set-PSResourceRepository -Name "PSGallery" -Priority 25 -Trusted -PassTh 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 50 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 'URL' value can't be changed/set. We also use the 'PassThru' parameter to see the changed repository. +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 50 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 `-URL` value can't be changed/set. We also use the `-PassThru` parameter to see the changed repository. ### Example 3 ```powershell @@ -62,7 +62,9 @@ PS C:\> Get-PSResourceRepository -Name "*" ---- --- ------- -------- 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"; URL = "c:/code/testdir"} + PS C:\> Set-PSResourceRepository -Repositories $arrayOfHashtables -PassThru Name Url Trusted Priority ---- --- ------- -------- @@ -70,7 +72,7 @@ PS C:\> Set-PSResourceRepository -Repositories $arrayOfHashtables -PassThru PoshTestGallery file:///c:/code/testdir False 50 ``` -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 'Repositories' 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. +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 `-Repositories` 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. ## PARAMETERS @@ -105,7 +107,7 @@ Accept wildcard characters: False ``` ### -Repositories -Specifies a hashtable of repositories and is used to register multiple repositories at once. +Specifies a hashtable of repositories and is used to set multiple repositories at once. ```yaml Type: Hashtable[] @@ -138,14 +140,14 @@ Accept wildcard characters: False Specifies the location of the repository to be set. ```yaml -Type: System.Uri +Type: String Parameter Sets: NameParameterSet Aliases: Required: False Position: Named Default value: None -Accept pipeline input: True (ByPropertyName) +Accept pipeline input: False Accept wildcard characters: False ``` @@ -187,12 +189,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.String -### System.Uri - ### System.Collections.Hashtable[] -### System.Int32 - ## OUTPUTS ### Microsoft.PowerShell.PowerShellGet.UtilClasses.PSRepositoryInfo (if 'PassThru' parameter used) diff --git a/help/Unregister-PSResourceRepository.md b/help/Unregister-PSResourceRepository.md index e875af838..95f69b31f 100644 --- a/help/Unregister-PSResourceRepository.md +++ b/help/Unregister-PSResourceRepository.md @@ -49,7 +49,7 @@ PS C:\> Get-PSResourceRepository ``` -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. +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. ## PARAMETERS @@ -105,9 +105,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS ### System.String[] + ## OUTPUTS None + ## NOTES ## RELATED LINKS diff --git a/help/Update-PSResource.md b/help/Update-PSResource.md index 158815573..8ee64d319 100644 --- a/help/Update-PSResource.md +++ b/help/Update-PSResource.md @@ -1,7 +1,7 @@ --- external help file: PowerShellGet.dll-Help.xml Module Name: PowerShellGet -online version: +online version: schema: 2.0.0 --- @@ -20,7 +20,7 @@ Update-PSResource [-Name] [-Version ] [-Prerelease] [-Reposit ## DESCRIPTION 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 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. ## EXAMPLES @@ -32,8 +32,9 @@ PS C:\> Get-InstalledPSResource -Name "TestModule" ---- ------- ---------- ----------- TestModule 1.2.0 test - Update-PSResource -Name "TestModule" - Get-InstalledPSResource -Name "TestModule" +PS C:\> Update-PSResource -Name "TestModule" + +PS C:\> Get-InstalledPSResource -Name "TestModule" Name Version Prerelease Description ---- ------- ---------- ----------- TestModule 1.3.0 test @@ -169,6 +170,7 @@ Accept wildcard characters: False ### -Version Specifies the version the resource is to be updated to. +Expected version/version range format is documented here: https://docs.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml Type: System.String