From 161e0ca10dfbbe326e580f8b4023833af3568cb0 Mon Sep 17 00:00:00 2001 From: Amber Erickson Date: Tue, 3 Aug 2021 14:31:15 -0700 Subject: [PATCH] Update help docs --- help/Get-InstalledPSResource.md | 24 ++-- help/Install-PSResource.md | 214 +++++++++----------------------- help/Publish-PSResource.md | 64 ++++------ help/Save-PSResource.md | 121 +++++++++--------- help/Uninstall-PSResource.md | 11 +- 5 files changed, 168 insertions(+), 266 deletions(-) diff --git a/help/Get-InstalledPSResource.md b/help/Get-InstalledPSResource.md index bb3a76b17..d5b320ab1 100644 --- a/help/Get-InstalledPSResource.md +++ b/help/Get-InstalledPSResource.md @@ -17,7 +17,7 @@ Get-InstalledPSResource [[-Name] ] [-Version ] [-Path ``` ## DESCRIPTION -The Get-InstalledPSResource 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 describe each resource item found. Other parameters allow the returned results to be filtered by version and path. +The Get-InstalledPSResource 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. ## EXAMPLES @@ -49,14 +49,21 @@ PS C:\> Get-InstalledPSResource Az -Path . This will return all versions of the Az module that have been installed in the current directory. +### Example 5 +```powershell +PS C:\> Get-InstalledPSResource +``` + +This will return all versions and scripts installed on the machine. + ## PARAMETERS ### -Name -Name of a resource or resources to find. Accepts wild card characters. +Name of a resource or resources to find. Accepts wild card characters or a null value. ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: Required: False @@ -71,7 +78,7 @@ Specifies the path to search in. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: Required: False @@ -82,11 +89,13 @@ Accept wildcard characters: False ``` ### -Version -Specifies the version of the resource to be returned. Can be an exact version or a version range. +Specifies the version of the resource to be returned. +Can be an exact version or a version range, using the NuGet versioning syntax. +Expected version/version range format is documented here: https://docs.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: Required: False @@ -103,7 +112,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo ``` -PSRepositoryItemInfo : { +PSResourceInfo : { AdditionalMetadata Author CompanyName @@ -119,6 +128,7 @@ PSRepositoryItemInfo : { Name PackageManagementProvider PowerShellGetFormatVersion + PrereleaseLabel ProjectUri PublishedDate ReleaseNotes diff --git a/help/Install-PSResource.md b/help/Install-PSResource.md index 187ae7a25..47765a5f2 100644 --- a/help/Install-PSResource.md +++ b/help/Install-PSResource.md @@ -8,107 +8,56 @@ schema: 2.0.0 # Install-PSResource ## SYNOPSIS -{{ Fill in the Synopsis }} +Installs resources (modules and scripts) from a registered repository onto the machine. ## SYNTAX -### NameParameterSet (Default) +### NameParameterSet ``` -Install-PSResource [-Name] [-Type ] [-Version ] [-Prerelease] - [-Repository ] [-Credential ] [-Scope ] [-NoClobber] [-TrustRepository] +Install-PSResource [-Name] [-Version ] [-Prerelease] + [-Repository ] [-Credential ] [-Scope ] [-TrustRepository] [-Reinstall] [-Quiet] [-AcceptLicense] [-WhatIf] [-Confirm] [] ``` -### InputObjectSet -``` -Install-PSResource [-InputObject] [-WhatIf] [-Confirm] [] -``` - -### RequiredResourceFileParameterSet -``` -Install-PSResource [-Type ] [-Prerelease] [-Repository ] [-Credential ] - [-Scope ] [-NoClobber] [-TrustRepository] [-Reinstall] [-Quiet] [-AcceptLicense] - [-RequiredResourceFile ] [-WhatIf] [-Confirm] [] -``` - -### RequiredResourceParameterSet -``` -Install-PSResource [-RequiredResource ] [-WhatIf] [-Confirm] [] -``` - ## DESCRIPTION -{{ Fill in the Description }} +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. ## EXAMPLES ### Example 1 ```powershell -PS C:\> {{ Add example code here }} +PS C:\> Install-PSResource Az ``` -{{ Add example description here }} - -## PARAMETERS - -### -AcceptLicense -{{ Fill AcceptLicense Description }} +Installs the Az module. -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameParameterSet, RequiredResourceFileParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +### Example 2 +```powershell +PS C:\> Install-PSResource Az -Version "[2.0.0, 3.0.0]" ``` -### -Credential -{{ Fill Credential Description }} +Installs the latest stable Az module that is within the range 2.0.0 and 3.0.0. -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False +### Example 3 +```powershell +PS C:\> Install-PSResource Az -Repository PSGallery ``` -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: RequiredResourceFileParameterSet -Aliases: +Installs the latest stable Az module from the PowerShellGallery. -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` -### -InputObject -{{ Fill InputObject Description }} +### Example 3 +```powershell +PS C:\> Install-PSResource Az -Reinstall +``` -```yaml -Type: System.Object[] -Parameter Sets: InputObjectSet -Aliases: +Installs the Az module and will write over any previously installed version if it is already installed. -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` +## PARAMETERS ### -Name -{{ Fill Name Description }} +Name of a resource or resources to install. Does not accept wildcard characters or a null value. ```yaml Type: System.String[] @@ -122,12 +71,14 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` -### -NoClobber -{{ Fill NoClobber Description }} +### -Version +Specifies the version of the resource to be installed. +Can be an exact version or a version range, using the NuGet versioning syntax. +Expected version/version range format is documented here: https://docs.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameParameterSet, RequiredResourceFileParameterSet +Type: System.String +Parameter Sets: NameParameterSet Aliases: Required: False @@ -138,41 +89,11 @@ Accept wildcard characters: False ``` ### -Prerelease -{{ Fill Prerelease Description }} +When specified, includes prerelease versions in search results returned. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameParameterSet, RequiredResourceFileParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Quiet -{{ Fill Quiet Description }} - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameParameterSet, RequiredResourceFileParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Reinstall -{{ Fill Reinstall Description }} - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameParameterSet, RequiredResourceFileParameterSet +Parameter Sets: NameParameterSet Aliases: Required: False @@ -183,11 +104,12 @@ Accept wildcard characters: False ``` ### -Repository -{{ Fill Repository Description }} +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. ```yaml Type: System.String[] -Parameter Sets: NameParameterSet, RequiredResourceFileParameterSet +Parameter Sets: NameParameterSet Aliases: Required: False @@ -197,28 +119,29 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -RequiredResource -{{ Fill RequiredResource Description }} +### -Credential +Optional credentials to be used when accessing a repository. ```yaml -Type: System.Object -Parameter Sets: RequiredResourceParameterSet +Type: System.Management.Automation.PSCredential +Parameter Sets: NameParameterSet Aliases: Required: False Position: Named Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` -### -RequiredResourceFile -{{ Fill RequiredResourceFile Description }} +### -Scope +Specifies the scope under which a user has access. ```yaml -Type: System.String -Parameter Sets: RequiredResourceFileParameterSet +Type: Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType +Parameter Sets: NameParameterSet Aliases: +Accepted values: CurrentUser, AllUsers Required: False Position: Named @@ -227,14 +150,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Scope -{{ Fill Scope Description }} +### -TrustRepository +Suppress prompts to trust repository. The prompt to trust repository only occurs if the repository is not already set to a trusted level. ```yaml -Type: System.String -Parameter Sets: NameParameterSet, RequiredResourceFileParameterSet +Type: System.Management.Automation.SwitchParameter +Parameter Sets: NameParameterSet Aliases: -Accepted values: CurrentUser, AllUsers Required: False Position: Named @@ -243,12 +165,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -TrustRepository -{{ Fill TrustRepository Description }} +### -Reinstall +Writes over any previously installed resource version that already exists on the machine. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameParameterSet, RequiredResourceFileParameterSet +Parameter Sets: NameParameterSet Aliases: Required: False @@ -258,12 +180,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Type -{{ Fill Type Description }} +### -Quiet +Supresses installation progress bar. ```yaml -Type: System.String[] -Parameter Sets: NameParameterSet, RequiredResourceFileParameterSet +Type: System.Management.Automation.SwitchParameter +Parameter Sets: NameParameterSet Aliases: Required: False @@ -273,11 +195,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Version -{{ Fill Version Description }} +### -AcceptLicense +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. ```yaml -Type: System.String +Type: System.Management.Automation.SwitchParameter Parameter Sets: NameParameterSet Aliases: @@ -293,7 +215,7 @@ Prompts you for confirmation before running the cmdlet. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: cf Required: False @@ -309,7 +231,7 @@ The cmdlet is not run. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: wi Required: False @@ -322,21 +244,9 @@ Accept wildcard characters: False ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). -## INPUTS - -### System.String[] - -### System.Object[] - -### System.Management.Automation.PSCredential - ## OUTPUTS - -### System.Object +None ## NOTES -## RELATED LINKS - -[]() - +## RELATED LINKS \ No newline at end of file diff --git a/help/Publish-PSResource.md b/help/Publish-PSResource.md index a73e53ceb..247919a52 100644 --- a/help/Publish-PSResource.md +++ b/help/Publish-PSResource.md @@ -14,22 +14,22 @@ Publishes a specified module from the local computer to PSResource repository. ### PathParameterSet ``` -Publish-PSResource [-APIKey ] [-Repository ] [-DestinationPath ] [-Path] +Publish-PSResource [-APIKey ] [-Repository ] [-Path] [-Credential ] [-SkipDependenciesCheck] [-WhatIf] [-Confirm] [] ``` ### PathLiteralParameterSet ``` -Publish-PSResource [-APIKey ] [-Repository ] [-DestinationPath ] -LiteralPath +Publish-PSResource [-APIKey ] [-Repository ] -LiteralPath [-Credential ] [-SkipDependenciesCheck] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION 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. +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. ## EXAMPLES @@ -54,7 +54,7 @@ Specifies the API key that you want to use to publish a resource to the online g ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: PathParameterSet, PathLiteralParameterSet Aliases: Required: False @@ -64,12 +64,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Credential -Specifies a user account that has rights to a specific repository (used for finding dependencies). +### -Repository +Specifies the repository to publish to. ```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) +Type: System.String +Parameter Sets: PathParameterSet, PathLiteralParameterSet Aliases: Required: False @@ -79,18 +79,18 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -DestinationPath -Specifies the location to be used to publish a nupkg locally. +### -Path +When specified, includes prerelease versions in search. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: PathParameterSet Aliases: -Required: False -Position: Named +Required: True +Position: 0 Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` @@ -109,27 +109,12 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` -### -Path -When specified, includes prerelease versions in search. - -```yaml -Type: System.String -Parameter Sets: PathParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Repository -Specifies the repository to publish to. +### -Credential +Specifies a user account that has rights to a specific repository (used for finding dependencies). ```yaml -Type: System.String -Parameter Sets: (All) +Type: System.Management.Automation.PSCredential +Parameter Sets: PathParameterSet, PathLiteralParameterSet Aliases: Required: False @@ -140,11 +125,11 @@ Accept wildcard characters: False ``` ### -SkipDependenciesCheck -Bypasses the default check that all dependencies are present. +Bypasses the default check that all dependencies are present on the repository which the resource is being published to. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: PathParameterSet, PathLiteralParameterSet Aliases: Required: False @@ -159,7 +144,7 @@ Prompts you for confirmation before running the cmdlet. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: PathParameterSet, PathLiteralParameterSet Aliases: cf Required: False @@ -175,7 +160,7 @@ The cmdlet is not run. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: PathParameterSet, PathLiteralParameterSet Aliases: wi Required: False @@ -190,8 +175,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS - -### None +None ## NOTES diff --git a/help/Save-PSResource.md b/help/Save-PSResource.md index e8d51d16f..ca6ae0889 100644 --- a/help/Save-PSResource.md +++ b/help/Save-PSResource.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Save-PSResource ## SYNOPSIS -{{ Fill in the Synopsis }} +Saves resources (modules and scripts) from a registered repository onto the machine. ## SYNTAX @@ -19,55 +19,75 @@ Save-PSResource [-Name] [-Version ] [-Prerelease] [-Repositor ``` ## DESCRIPTION -{{ Fill in the Description }} +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. ## EXAMPLES ### Example 1 ```powershell -PS C:\> {{ Add example code here }} +PS C:\> Save-PSResource -Name Az ``` +Saves the Az module -{{ Add example description here }} +### Example 2 +```powershell +PS C:\> Save-PSResource -Name Az -Repository PSGallery +``` +Saves the Az module found in the PowerShellGallery + +### Example 3 +```powershell +PS C:\> Save-PSResource Az -AsNupkg +``` +Saves the Az module as a .nupkg file + +### Example 4 +```powershell +PS C:\> Save-PSResource Az -IncludeXML +``` +Saves the Az module and includes the PowerShellGet XML metadata ## PARAMETERS -### -AsNupkg -{{ Fill AsNupkg Description }} +### -Name +Name of a resource or resources to save. Does not accept wildcard characters or a null value. ```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Type: System.String[] +Parameter Sets: NameParameterSet Aliases: -Required: False -Position: Named +Required: True +Position: 0 Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` -### -Credential -{{ Fill Credential Description }} +### -Version +Specifies the version of the resource to be saved. +Can be an exact version or a version range, using the NuGet versioning syntax. +Expected version/version range format is documented here: https://docs.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) +Type: System.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 ``` -### -IncludeXML -{{ Fill IncludeXML Description }} +### -Prerelease +Specifies to include prerelease versions. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: Required: False @@ -77,42 +97,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Name -{{ Fill Name Description }} +### -Repository +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. ```yaml Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Path -{{ Fill Path Description }} - -```yaml -Type: System.String -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: Required: False Position: Named Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` -### -Prerelease -{{ Fill Prerelease Description }} - +### -AsNupkg +Saves the resource as a zipped .nupkg file. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: Required: False @@ -122,12 +127,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Repository -{{ Fill Repository Description }} +### -IncludeXML +Includes the PowerShellGet metadata XML (used to verify that PowerShellGet has installed a module). ```yaml -Type: System.String[] -Parameter Sets: (All) +Type: System.Management.Automation.SwitchParameter +Parameter Sets: NameParameterSet Aliases: Required: False @@ -137,18 +142,18 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Version -{{ Fill Version Description }} +### -Path +Specifies the path to save the resource to. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: Required: False Position: Named Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` @@ -157,7 +162,7 @@ Prompts you for confirmation before running the cmdlet. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: cf Required: False @@ -173,7 +178,7 @@ The cmdlet is not run. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: wi Required: False @@ -188,19 +193,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### System.String[] - -### System.Management.Automation.PSCredential - -### System.String - ## OUTPUTS - -### System.Object +None ## NOTES ## RELATED LINKS - -[]() - diff --git a/help/Uninstall-PSResource.md b/help/Uninstall-PSResource.md index 13844b909..9dbd89a48 100644 --- a/help/Uninstall-PSResource.md +++ b/help/Uninstall-PSResource.md @@ -17,7 +17,10 @@ Uninstall-PSResource [-Name] [-Version ] [-Force] [-WhatIf] [ ``` ## DESCRIPTION -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. +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. ## EXAMPLES @@ -66,7 +69,7 @@ Specifies the version of the resource to be uninstalled. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: Required: False @@ -81,7 +84,7 @@ Skips check to see if any modules have a dependency on the resource to be uninst ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: Required: False @@ -97,7 +100,7 @@ The cmdlet is not run. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: NameParameterSet Aliases: wi Required: False