From 8f84c69c046a6c08d195a993f098f07d061b37fb Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Thu, 11 Dec 2025 10:03:29 -0600 Subject: [PATCH] Retire obsolete module docs --- .../PowerShellGet/Find-Command.md | 343 ------- .../PowerShellGet/Find-DscResource.md | 312 ------ .../PowerShellGet/Find-Module.md | 569 ----------- .../PowerShellGet/Find-RoleCapability.md | 66 -- .../PowerShellGet/Find-Script.md | 432 --------- .../PowerShellGet/Get-InstalledModule.md | 187 ---- .../PowerShellGet/Get-InstalledScript.md | 166 ---- .../PowerShellGet/Get-PSRepository.md | 111 --- .../PowerShellGet/Install-Module.md | 586 ------------ .../PowerShellGet/Install-Script.md | 555 ----------- .../PowerShellGet/New-ScriptFileInfo.md | 584 ------------ .../PowerShellGet/PowerShellGet.md | 111 --- .../PowerShellGet/Publish-Module.md | 426 --------- .../PowerShellGet/Publish-Script.md | 302 ------ .../PowerShellGet/Register-PSRepository.md | 304 ------ .../PowerShellGet/Save-Module.md | 440 --------- .../PowerShellGet/Save-Script.md | 392 -------- .../PowerShellGet/Set-PSRepository.md | 255 ----- .../PowerShellGet/Test-ScriptFileInfo.md | 165 ---- .../PowerShellGet/Uninstall-Module.md | 270 ------ .../PowerShellGet/Uninstall-Script.md | 245 ----- .../PowerShellGet/Unregister-PSRepository.md | 90 -- .../PowerShellGet/Update-Module.md | 401 -------- .../PowerShellGet/Update-ModuleManifest.md | 887 ------------------ .../PowerShellGet/Update-Script.md | 293 ------ .../PowerShellGet/Update-ScriptFileInfo.md | 502 ---------- 26 files changed, 8994 deletions(-) delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Find-Command.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Find-DscResource.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Find-Module.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Find-RoleCapability.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Find-Script.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Get-InstalledModule.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Get-InstalledScript.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Get-PSRepository.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Install-Module.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Install-Script.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/New-ScriptFileInfo.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/PowerShellGet.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Publish-Module.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Publish-Script.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Register-PSRepository.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Save-Module.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Save-Script.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Set-PSRepository.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Test-ScriptFileInfo.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Uninstall-Module.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Uninstall-Script.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Unregister-PSRepository.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Update-Module.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Update-ModuleManifest.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Update-Script.md delete mode 100644 powershell-gallery/powershellget-3.x/PowerShellGet/Update-ScriptFileInfo.md diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Find-Command.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Find-Command.md deleted file mode 100644 index 388c301..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Find-Command.md +++ /dev/null @@ -1,343 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/find-command?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Find-Command ---- - -# Find-Command - -## SYNOPSIS -Finds PowerShell commands in modules. - -## SYNTAX - -### All - -``` -Find-Command [[-Name] ] [-ModuleName ] [-MinimumVersion ] - [-MaximumVersion ] [-RequiredVersion ] [-AllVersions] [-AllowPrerelease] - [-Tag ] [-Filter ] [-Proxy ] [-ProxyCredential ] - [-Repository ] [] -``` - -## DESCRIPTION - -The `Find-Command` cmdlet finds PowerShell commands such as cmdlets, aliases, functions, and -workflows. `Find-Command` searches modules in registered repositories. - -This is a proxy cmdlet for the `Find-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Find-PSResource](../Microsoft.PowerShell.PSResourceGet/Find-PSResource.md). - -## EXAMPLES - -### Example 1: Find a command by name - -`Find-Command` can use the name of a command to locate the module in a repository. It's possible -that a command name exists in multiple **ModuleNames**. - -```powershell -Find-Command -Repository PSGallery -Name Get-TargetResource -``` - -```Output -Name Version ModuleName Repository ----- ------- ---------- ---------- -Get-TargetResource 3.1.0.0 xPowerShellExecutionPolicy PSGallery -Get-TargetResource 1.0.0 xInternetExplorerHomePage PSGallery -Get-TargetResource 1.2.0.0 SystemLocaleDsc PSGallery -``` - -`Find-Command` uses the **Repository** parameter to search the **PSGallery**. The **Name** parameter -specifies the command `Get-TargetResource`. - -### Example 2: Find commands by name and install the module - -`Find-Command` can locate the command and module, then send the object to `Install-Module`. If a -command is included in multiple modules, use the `Find-Command` cmdlets **ModuleName** parameter. -Otherwise, modules might be installed that you didn't want to install. - -```powershell -Find-Command -Name Get-TargetResource -Repository PSGallery -ModuleName SystemLocaleDsc | - Install-Module -Get-InstalledModule -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -1.2.0.0 SystemLocaleDsc PSGallery This DSC Resource allows configuration of the Windows... -``` - -`Find-Command` uses the **Name** parameter to specify the command `Get-TargetResource`. The -**Repository** parameter searches the **PSGallery**. The **ModuleName** parameter specifies the -module you want to install, **SystemLocaleDsc**. The object is sent down the pipeline to -`Install-Module` and the module is installed. After the installation finishes, you can use -`Get-InstalledModule` to display the results. - -### Example 3: Find a command and save its module - -```powershell -Find-Command -Name Invoke-ScriptAnalyzer -Repository PSGallery | - Save-Module -Path C:\Test\Modules -Verbose -``` - -```Output -VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/PSScriptAnalyzer/1.18.0'. -VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/PSScriptAnalyzer/1.18.0'. -VERBOSE: Completed downloading 'PSScriptAnalyzer'. -VERBOSE: Module 'PSScriptAnalyzer' was saved successfully to path 'C:\Test\Modules\PSScriptAnalyzer\1.18.0'. -``` - -`Find-Command` uses the **Name** and **Repository** parameters to search for the command -`Invoke-ScriptAnalyzer` in the **PSGallery** repository. The object is sent down the pipeline to -`Save-Module`. The **Path** parameter determines the location to save the module. **Verbose** is an -optional parameter, but displays status output in the PowerShell console. The verbose output is -beneficial for troubleshooting. - -## PARAMETERS - -### -AllowPrerelease - -Includes modules marked as a prerelease in the results. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Find-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllVersions - -The proxy cmdlet ignores this parameter since it's not supported by the **CommandNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -The proxy cmdlet ignores this parameter since it's not supported by the **CommandNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet ignores this parameter since it's not supported by the **CommandNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet ignores this parameter since it's not supported by the **CommandNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName - -The proxy cmdlet ignores this parameter since it's not supported by the **CommandNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies the command name to search for in a repository. Use commas to separate an array of command -names. - -The proxy cmdlet maps this parameter to the **CommandName** parameter of `Find-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by the **CommandNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by the **CommandNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Repository - -Specifies the repository to search for commands. Use commas to separate an array of repository -names. The default is all repositories. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet ignores this parameter since it's not supported by the **CommandNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag - -The proxy cmdlet ignores this parameter since it's not supported by the **CommandNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -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 - -## OUTPUTS - -### PSGetCommandInfo - -`Find-Command` outputs a **PSGetCommandInfo** object. - -## NOTES - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - -## RELATED LINKS - -[Get-InstalledModule](Get-InstalledModule.md) - -[Install-Module](Install-Module.md) - -[Save-Module](Save-Module.md) - -[Select-Object](xref:Microsoft.PowerShell.Utility.Select-Object) - -[Uninstall-Module](Uninstall-Module.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Find-DscResource.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Find-DscResource.md deleted file mode 100644 index e7808da..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Find-DscResource.md +++ /dev/null @@ -1,312 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/find-dscresource?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Find-DscResource ---- - -# Find-DscResource - -## SYNOPSIS -Finds Desired State Configuration (DSC) resources. - -## SYNTAX - -### All - -``` -Find-DscResource [[-Name] ] [-ModuleName ] [-MinimumVersion ] - [-MaximumVersion ] [-RequiredVersion ] [-AllVersions] [-AllowPrerelease] - [-Tag ] [-Filter ] [-Proxy ] [-ProxyCredential ] - [-Repository ] [] -``` - -## DESCRIPTION - -The `Find-DscResource` cmdlet searches registered repositories to find DSC resources contained in -modules. By default `Find-DscResource` searches all registered repositories. - -This is a proxy cmdlet for the `Find-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Find-PSResource](../Microsoft.PowerShell.PSResourceGet/Find-PSResource.md). - -## EXAMPLES - -### Example 1: Find a DSC resource by name - -`Find-DscResource` locates DSC resources by name. Use commas to separate an array of resource names. - -```powershell -Find-DscResource -Name xWebsite, xWebApplication, xWebSiteDefaults -``` - -```Output -Name Version ModuleName Repository ----- ------- ---------- ---------- -xWebApplication 2.6.0.0 xWebAdministration PSGallery -xWebsite 2.6.0.0 xWebAdministration PSGallery -xWebSiteDefaults 2.6.0.0 xWebAdministration PSGallery -``` - -`Find-DscResource` uses the **Name** parameter to find the specified array of DSC resources. - -### Example 2: Find a DSC resource and install it - -`Find-DscResource` locates a DSC resource and sends the object down the pipeline to be installed. -After the installation, use `Get-InstalledModule` to view the results. - -Multiple resources from the same module can be sent down the pipeline to the `Install-Module`. -`Install-Module` attempts to only install the module once. - -```powershell -Find-DscResource -Name xWebsite | Install-Module -``` - -`Find-DscResource` uses the **Name** parameter to find the resource named **xWebsite**. The object -is sent down the pipeline to the `Install-Module` cmdlet. `Install-Module` installs the -**xWebAdministration** module for the resource. - -## PARAMETERS - -### -AllowPrerelease - -Includes resources marked as a prerelease in the results. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Find-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllVersions - -The proxy cmdlet ignores this parameter since it's not supported by the **DscResourceNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -The proxy cmdlet ignores this parameter since it's not supported by the **DscResourceNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet ignores this parameter since it's not supported by the **DscResourceNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet ignores this parameter since it's not supported by the **DscResourceNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName - -The proxy cmdlet ignores this parameter since it's not supported by the **DscResourceNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies the name of a resource. The default is all resources. Use commas to separate an array of -resource names. - -The proxy cmdlet maps this parameter to the **DscResourceName** parameter of `Find-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by the **DscResourceNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by the **DscResourceNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Repository - -Specifies a repository to search for resources. Use commas to separate an array of repository names. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet ignores this parameter since it's not supported by the **DscResourceNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag - -The proxy cmdlet ignores this parameter since it's not supported by the **DscResourceNameParameterSet** -of `Find-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -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 - -## OUTPUTS - -### PSGetDscResourceInfo - -`Find-DscResource` returns a **PSGetDscResourceInfo** object. - -## NOTES - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - -## RELATED LINKS - -[Get-InstalledModule](Get-InstalledModule.md) - -[Install-Module](Install-Module.md) - -[Register-PSRepository](Register-PSRepository.md) - -[Select-Object](xref:Microsoft.PowerShell.Utility.Select-Object) - -[Uninstall-Module](Uninstall-Module.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Find-Module.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Find-Module.md deleted file mode 100644 index e1f5398..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Find-Module.md +++ /dev/null @@ -1,569 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/find-module?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Find-Module ---- -# Find-Module - -## SYNOPSIS -Finds modules in a repository that match specified criteria. - -## SYNTAX - -### All - -``` -Find-Module [[-Name] ] [-MinimumVersion ] [-MaximumVersion ] - [-RequiredVersion ] [-AllVersions] [-IncludeDependencies] [-Filter ] - [-Tag ] [-Includes ] [-DscResource ] [-RoleCapability ] - [-Command ] [-Proxy ] [-ProxyCredential ] [-Repository ] - [-Credential ] [-AllowPrerelease] [] -``` - -## DESCRIPTION - -The `Find-Module` cmdlet finds modules in a repository that match the specified criteria. -`Find-Module` returns a **PSRepositoryItemInfo** object for each module it finds. The objects can be -sent down the pipeline to cmdlets such as `Install-Module`. - -This is a proxy cmdlet for the `Find-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Find-PSResource](../Microsoft.PowerShell.PSResourceGet/Find-PSResource.md). - -## EXAMPLES - -### Example 1: Find a module by name - -This example finds a module in the default repository. - -```powershell -Find-Module -Name PowerShellGet -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -2.1.0 PowerShellGet PSGallery PowerShell module with commands for discovering... -``` - -The `Find-Module` cmdlet uses the **Name** parameter to specify the **PowerShellGet** module. - -### Example 2: Find modules with similar names - -This example uses the asterisk (`*`) wildcard to find modules with similar names. - -```powershell -Find-Module -Name PowerShell* -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -0.4.0 powershell-yaml PSGallery Powershell module for serializing and... -2.1.0 PowerShellGet PSGallery PowerShell module with commands for... -1.9 Powershell.Helper.Extension PSGallery # Powershell.Helper.Extension... -3.1 PowerShellHumanizer PSGallery PowerShell Humanizer wraps Humanizer... -4.0 PowerShellISEModule PSGallery a module that adds capability to the ISE -``` - -The `Find-Module` cmdlet uses the **Name** parameter with the asterisk (`*`) wildcard to find all -modules that contain **PowerShell**. - -### Example 3: Find a module by minimum version - -This example searches for a module's minimum version. If the repository contains a newer version of -the module, the newer version is returned. - -```powershell -Find-Module -Name PowerShellGet -MinimumVersion 1.6.5 -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -2.1.0 PowerShellGet PSGallery PowerShell module with commands for discovering... -``` - -The `Find-Module` cmdlet uses the **Name** parameter to specify the **PowerShellGet** module. The -**MinimumVersion** specifies version **1.6.5**. `Find-Module` returns PowerShellGet version -**2.1.0** because it exceeds the minimum version and is the most current version. - -### Example 4: Find a module by specific version - -This example shows how to install a specific prerelease version of a module. Prerelease versions -have a format of `-`. - -```powershell -Find-Module PSReadLine -AllowPrerelease -RequiredVersion 2.2.4-beta1 -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -2.2.4-beta1 PSReadLine PSGallery Great command line editing in the PowerS… -``` - -### Example 5: Find a module in a specific repository - -This example uses the **Repository** parameter to find a module in a specific repository. - -```powershell -Find-Module -Name PowerShellGet -Repository PSGallery -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -2.1.0 PowerShellGet PSGallery PowerShell module with commands for discovering... -``` - -The `Find-Module` cmdlet uses the **Name** parameter to specify the **PowerShellGet** module. The -**Repository** parameter specifies to search the **PSGallery** repository. - -### Example 6: Find a module in multiple repositories - -This example uses the `Register-PSRepository` to specify a repository. `Find-Module` uses the -repository to search for a module. - -```powershell -Register-PSRepository -Name MySource -SourceLocation https://www.myget.org/F/powershellgetdemo/ -Find-Module -Name Contoso* -Repository PSGallery, MySource -``` - -```Output -Repository Version Name Description ----------- ------- ---- ----------- -PSGallery 2.0.0.0 ContosoServer Cmdlets and DSC resources for managing Contoso Server... -MySource 1.2.0.0 ContosoClient Cmdlets and DSC resources for managing Contoso Client... -``` - -The `Register-PSRepository` cmdlet registers a new repository. The **Name** parameter assigns the -name **MySource**. The **SourceLocation** parameter specifies the repository's address. - -The `Find-Module` cmdlet uses the **Name** parameter with the asterisk (`*`) wildcard to specify the -**Contoso** module. The **Repository** parameter specifies to search two repositories, **PSGallery** -and **MySource**. - -### Example 7: Find a module that contains a DSC resource - -This command returns modules that contain DSC resources. The **Includes** parameter has four -predefined functionalities that are used to search the repository. Use tab-complete to display the -four functionalities supported by the **Includes** parameter. - -```powershell -Find-Module -Repository PSGallery -Includes DscResource -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -2.7.0 Carbon PSGallery Carbon is a PowerShell module... -8.5.0.0 xPSDesiredStateConfiguration PSGallery The xPSDesiredStateConfiguration module... -1.3.1 PackageManagement PSGallery PackageManagement (a.k.a. OneGet) is... -2.7.0.0 xWindowsUpdate PSGallery Module with DSC Resources... -3.2.0.0 xCertificate PSGallery This module includes DSC resources... -3.1.0.0 xPowerShellExecutionPolicy PSGallery This DSC resource can change the user... -``` - -The `Find-Module` cmdlet uses the **Repository** parameter to search the repository, **PSGallery**. -The **Includes** parameter specifies **DscResource**, which is a functionality that the parameter -can search for in the repository. - -### Example 8: Find a module with a filter - -In this example, to find modules, a filter is used to search the repository. - -For a NuGet-based repository, the **Filter** parameter searches through the name, description, and -tags for the argument. - -```powershell -Find-Module -Filter AppDomain -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -1.0.0.0 AppDomainConfig PSGallery Manipulate AppDomain configuration... -1.1.0 ClassExplorer PSGallery Quickly search the AppDomain for classes... -``` - -The `Find-Module` cmdlet uses the **Filter** parameter to search the repository for **AppDomain**. - -### Example 9: Find a module by tag - -This example shows how to find modules by a tag. The `CrescendoBuilt` value is a tag that is -automatically added to modules created using the **Microsoft.PowerShell.Crescendo** module. - -```powershell -Find-Module -Tag CrescendoBuilt -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -0.1.0 Foil PSGallery A PowerShell Crescendo wrapper for Chocolatey -0.3.1 Cobalt PSGallery A PowerShell Crescendo wrapper for WinGet -1.1.0 SysInternals PSGallery PowerShell cmdlets for SysInternal tools -0.0.4 Croze PSGallery A PowerShell Crescendo wrapper for Homebrew -0.0.2 AptPackage PSGallery PowerShell Crescendo-generated Module to query APT-Package Information -1.0.1 RoboCopy PSGallery PowerShell cmdlet for the official RoboCopy.exe -1.0.2 TShark PSGallery PowerShell cmdlet for tshark.exe -1.0.0 SpeedTestCLI PSGallery PowerShell cmdlets speedtest-cli -1.0.0 SpeedTest-CLI PSGallery PowerShell cmdlets for Internet Speed Test -1.0.2 Image2Text PSGallery PowerShell Images into ASCII art -0.1.1 Quser.Crescendo PSGallery This module displays session information of users logged onto a local or remote m... -1.0.2 Takeown PSGallery Crescendo Powershell wrapper of takeown.exe -``` - -## PARAMETERS - -### -AllowPrerelease - -Includes in the results modules marked as a pre-release. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Find-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllVersions - -Specifies to include all versions of a module in the results. You cannot use the **AllVersions** -parameter with the **MinimumVersion**, **MaximumVersion**, or **RequiredVersion** parameters. - -The proxy cmdlet transforms this parameter to the `-Version *` before calling `Find-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Command - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Credential - -Specifies a user account that has rights to install a module for a specified package provider or -source. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -DscResource - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IncludeDependencies - -Indicates that this operation includes all modules that are dependent upon the module specified in -the **Name** parameter. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Includes - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: -Accepted values: DscResource, Cmdlet, Function, RoleCapability - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies the names of modules to search for in the repository. A comma-separated list of module -names is accepted. Wildcards are accepted. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: True -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Repository - -Use the **Repository** parameter to specify which repository to search for a module. Used when -multiple repositories are registered. Accepts a comma-separated list of repositories. To register a -repository, use `Register-PSRepository`. To display registered repositories, use `Get-PSRepository`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RoleCapability - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag - -Specifies an array of tags. Example tags include **DesiredStateConfiguration**, **DSC**, -**DSCResourceKit**, or **PSModule**. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -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.String - -### System.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### PSRepositoryItemInfo - -`Find-Module` creates **PSRepositoryItemInfo** objects that can be sent down the pipeline to cmdlets -such as `Install-Module`. - -## NOTES - -PowerShell includes the following aliases for `Find-Module`: - -- All platforms: - - `fimo` - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - - -## RELATED LINKS - -[Get-PSRepository](Get-PSRepository.md) - -[Install-Module](Install-Module.md) - -[Publish-Module](Publish-Module.md) - -[Save-Module](Save-Module.md) - -[Uninstall-Module](Uninstall-Module.md) - -[Update-Module](Update-Module.md) - -[Register-PSRepository](Register-PSRepository.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Find-RoleCapability.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Find-RoleCapability.md deleted file mode 100644 index b353c7e..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Find-RoleCapability.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/find-rolecapability?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Find-RoleCapability ---- - -# Find-RoleCapability - -## SYNOPSIS -Finds role capabilities in modules. - -## SYNTAX - -### All - -``` -Find-RoleCapability -``` - -## DESCRIPTION - -The `Find-RoleCapability` cmdlet isn't supported by the **Microsoft.PowerShell.PSResourceGet** -module. The proxy cmdlet returns a warning message that the cmdlet is not supported. - -All parameters are ignored. - -## EXAMPLES - -### Example 1: Find role capabilities - -```powershell -Find-RoleCapability -``` - -```Output -WARNING: The cmdlet 'Find-RoleCapability' is deprecated. -``` - -## PARAMETERS - -### 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.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### PSGetRoleCapabilityInfo - -The `Find-RoleCapability` cmdlet returns a **PSGetRoleCapabilityInfo** object. - -## NOTES - -## RELATED LINKS diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Find-Script.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Find-Script.md deleted file mode 100644 index e6dd6a1..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Find-Script.md +++ /dev/null @@ -1,432 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/find-script?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Find-Script ---- -# Find-Script - -## SYNOPSIS -Finds a script. - -## SYNTAX - -``` -Find-Script [[-Name] ] [-MinimumVersion ] [-MaximumVersion ] - [-RequiredVersion ] [-AllVersions] [-IncludeDependencies] [-Filter ] [-Tag ] - [-Includes ] [-Command ] [-Proxy ] [-ProxyCredential ] - [-Repository ] [-Credential ] [-AllowPrerelease] [] -``` - -## DESCRIPTION - -The `Find-Script` cmdlet finds a specified script in registered repositories. - -This is a proxy cmdlet for the `Find-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Find-PSResource](../Microsoft.PowerShell.PSResourceGet/Find-PSResource.md). - -## EXAMPLES - -### Example 1: Find a script by name - -```powershell -Find-Script -Name "Start-WFContosoServer" -``` - -This command find the script named `Start-WFContosoServer`. - -### Example 2: Find a script by name, required version, and from a specified repository - -```powershell -Find-Script -Name "Required-Script2" -RequiredVersion 2.0 -Repository "LocalRepo01" -``` - -This command finds a script by name and required version in the LocalRepo01 repository. - -### Example 3: Find a script in the specified version range - -``` -Find-Script -Name "Required-Script2" -MinimumVersion 2.1 -MaximumVersion 2.5 -Repository "LocalRepo1" -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Required-Script2 Script LocalRepo1 Description for the Required-Script2 script -``` - -This command finds all versions of RequiredScript2 between versions 2.1 and 2.5 in the LocalRepo1 -respository. - -### Example 4: Find all versions of a script - -```powershell -Find-Script -Name "Required-Script02" -AllVersions -``` - -```Output -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -1.0 Required-Script2 Script LocalRepo1 Description for the Required-Script2 script -1.5 Required-Script2 Script LocalRepo1 Description for the Required-Script2 script -2.0 Required-Script2 Script LocalRepo1 Description for the Required-Script2 script -2.5 Required-Script2 Script LocalRepo1 Description for the Required-Script2 script -``` - -This command finds all versions of Required-Script02. - -### Example 5: Find a script and its dependencies - -```powershell -Find-Script -Name "Script-WithDependencies1" -IncludeDependencies -Repository "LocalRepo1" -``` - -```Output -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -1.0 Script-WithDependencies1 Script LocalRepo1 Description for the Script-WithDependencies1 script -2.0 RequiredModule3 Script LocalRepo1 RequiredModule3 module -2.5 Required-Script1 Script LocalRepo1 Description for the Required-Script1 script -2.5 Required-Script2 Script LocalRepo1 Description for the Required-Script2 script -``` - -This command finds a script and its dependencies. - -### Example 6: Find scripts with the specified tag - -```powershell -Find-Script -Tag "Tag1" -Repository "LocalRepo1" -``` - -```Output -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -1.0 Fabrikam-ClientScript Script LocalRepo1 Description for the Fabrikam-ClientScript script -``` - -This command finds scripts that have the tag Tag1 in the LocalRepo1 repository - -### Example 7: Find scripts with specified command name - -```powershell -Find-Script -Command Test-FunctionFromScript_Required-Script3 -Repository "LocalRepo1" -``` - -```Output -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Required-Script3 Script LocalRepo1 Description for the Required-Script3 script -``` - -This command finds a script that contains the specified command name. - -### Example 8: Find scripts using wildcards - -```powershell -Find-Script -Name "Required-Script*" -Repository "LocalRepo1" -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Required-Script1 Script local1 Description for the Required-Script1 script -2.5 Required-Script2 Script local1 Description for the Required-Script2 script -2.5 Required-Script3 Script local1 Description for the Required-Script3 script -``` - -This command uses the wildcard character (`*`) to find scripts that begin with Required-Script. - -## PARAMETERS - -### -AllowPrerelease - -Includes in the results scripts marked as a prerelease. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Find-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllVersions - -Indicates that this operation finds all script versions. - -The proxy cmdlet transforms this parameter to `-Version *` before calling `Find-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Command - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Credential - -Specifies a user account that has permission to access the repository to search for scripts. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Filter - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IncludeDependencies - -Indicates that this operation gets all scripts that are dependent upon the script specified in the -**Name** parameter. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Includes - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: -Accepted values: Function, Workflow - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies an array of names of scripts to find. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: True -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by the **NameParameterSet** of -`Find-PSResource`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Repository - -Specifies the friendly name of a repository that has been registered by running -`Register-PSRepository`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Find-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Tag - -Specifies an array of tags. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -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.String - -### System.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### PSRepositoryItemInfo - -## NOTES - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - -## RELATED LINKS - -[Install-Script](Install-Script.md) - -[Publish-Script](Publish-Script.md) - -[Save-Script](Save-Script.md) - -[Uninstall-Script](Uninstall-Script.md) - -[Update-Script](Update-Script.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Get-InstalledModule.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Get-InstalledModule.md deleted file mode 100644 index b0c4186..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Get-InstalledModule.md +++ /dev/null @@ -1,187 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/get-installedmodule?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Get-InstalledModule ---- -# Get-InstalledModule - -## SYNOPSIS -Gets a list of modules on the computer that were installed by PowerShellGet. - -## SYNTAX - -``` -Get-InstalledModule [[-Name] ] [-MinimumVersion ] [-RequiredVersion ] - [-MaximumVersion ] [-AllVersions] [-AllowPrerelease] [] -``` - -## DESCRIPTION - -The `Get-InstalledModule` cmdlet gets PowerShell modules that are installed on a computer using -PowerShellGet. To see all modules installed on the system, use the `Get-Module -ListAvailable` -command. - -This is a proxy cmdlet for the `Get-InstalledPSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Get-InstalledPSResource](../Microsoft.PowerShell.PSResourceGet/Get-InstalledPSResource.md). - -## EXAMPLES - -### Example 1: Get all installed modules - -```powershell -Get-InstalledModule -``` - -```Output -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.0.0 PSGTEST-UploadMultipleVersionOfP... Module GalleryINT Module for DAC functionality -1.3.5 AzureAutomationDebug Module PSGallery Module for debugging Azure Automation runbooks, emulating AA native cmdlets -1.0.1 AzureRM.Automation Module PSGallery Microsoft Azure PowerShell - Automation service cmdlets for Azure Resource Manager -``` - -This command gets all installed modules. - -### Example 2: Get specific versions of a module - -```powershell -Get-InstalledModule -Name "AzureRM.Automation" -MinimumVersion 1.0 -MaximumVersion 2.0 -``` - -```Output -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -1.0.1 AzureRM.Automation Module PSGallery Microsoft Azure PowerShell - Automation service cmdlets for Azure Resource Manager -``` - -This command gets versions of the AzureRM.Automation module from version 1.0 through version 2.0. - -## PARAMETERS - -### -AllowPrerelease - -Includes in the results modules marked as a prerelease. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Get-InstalledPSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllVersions - -The proxy cmdlet transforms this parameter to `-Version *` before calling `Get-InstalledPSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Get-InstalledPSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Get-InstalledPSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies an array of names of modules to get. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Get-InstalledPSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -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](/powershell/module/Microsoft.PowerShell.Core/About/about_CommonParameters). - -## INPUTS - -### System.String[] - -### System.String - -## OUTPUTS - -### System.Management.Automation.PSCustomObject - -## NOTES - -## RELATED LINKS - diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Get-InstalledScript.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Get-InstalledScript.md deleted file mode 100644 index c8f2013..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Get-InstalledScript.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/get-installedscript?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Get-InstalledScript ---- -# Get-InstalledScript - -## SYNOPSIS -Gets an installed script. - -## SYNTAX - -``` -Get-InstalledScript [[-Name] ] [-MinimumVersion ] [-RequiredVersion ] - [-MaximumVersion ] [-AllowPrerelease] [] -``` - -## DESCRIPTION - -The `Get-InstalledScript` cmdlet gets installed scripts for **CurrentUser** and **AllUsers** scopes. - -This is a proxy cmdlet for the `Get-InstalledPSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Get-InstalledPSResource](../Microsoft.PowerShell.PSResourceGet/Get-InstalledPSResource.md). - -## EXAMPLES - -### Example 1: Get all installed scripts - -```powershell -Get-InstalledScript -``` - -This command gets all installed scripts. - -### Example 2: Get installed scripts by name - -```powershell -Get-InstalledScript -Name "Required-Scri*" -``` - -```Output -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Required-Script1 Script local1 Description for the Required-Script1 script -2.5 Required-Script2 Script local1 Description for the Required-Script2 script -2.5 Required-Script3 Script local1 Description for the Required-Script3 script -``` - -This command gets scripts where the name begins with `Required-Scri`. - -## PARAMETERS - -### -AllowPrerelease - -Includes in the results scripts marked as a prerelease. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Get-InstalledPSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Get-InstalledPSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Get-InstalledPSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies an array of names of scripts to get. Wildcards are accepted. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: True -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Get-InstalledPSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -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.String - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS - -[Install-Script](Install-Script.md) - -[Uninstall-Script](Uninstall-Script.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Get-PSRepository.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Get-PSRepository.md deleted file mode 100644 index 018155a..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Get-PSRepository.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/get-psrepository?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Get-PSRepository ---- -# Get-PSRepository - -## SYNOPSIS -Gets PowerShell repositories. - -## SYNTAX - -``` -Get-PSRepository [[-Name] ] [] -``` - -## DESCRIPTION - -The `Get-PSRepository` cmdlet gets PowerShell module repositories that are registered for the -current user. - -This is a proxy cmdlet for the `Get-PSResourceRepository` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Get-PSResourceRepository](../Microsoft.PowerShell.PSResourceGet/Get-PSResourceRepository.md). - -## EXAMPLES - -### Example 1: Get all module repositories - -```powershell -Get-PSRepository -``` - -This command gets all module repositories registered for the current user. - -### Example 2: Get module repositories by name - -```powershell -Get-PSRepository -Name "*NuGet*" -``` - -This command gets all module repositories that include NuGet in their names. - -### Example 3: Get a module repository and format the output - -```powershell -Get-PSRepository -Name "Local01" | Format-List * -Force -``` - -```Output -Name : local01 -SourceLocation : http://manikb-dev:8765/api/v2/ -Trusted : True -Registered : True -InstallationPolicy : Trusted -PackageManagementProvider : NuGet -PublishLocation : http://pattif-dev:8765/api/v2/package/ -ScriptSourceLocation : http://pattif-dev:8765/api/v2/artifacts/psscript -ScriptPublishLocation : http://pattif-dev:8765/api/v2/package/ -ProviderOptions : {} -``` - -This command gets the repository named Local01 and uses the pipeline operator to pass that object to -the Format-List cmdlet. - -## PARAMETERS - -### -Name - -Specifies the names of the repositories to get. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -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[] - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS - -[Register-PSRepository](Register-PSRepository.md) - -[Set-PSRepository](Set-PSRepository.md) - -[Unregister-PSRepository](Unregister-PSRepository.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Install-Module.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Install-Module.md deleted file mode 100644 index 16a0236..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Install-Module.md +++ /dev/null @@ -1,586 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 08/14/2024 -online version: https://learn.microsoft.com/powershell/module/powershellget/install-module?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Install-Module ---- -# Install-Module - -## SYNOPSIS -Downloads one or more modules from a repository, and installs them on the local computer. - -## SYNTAX - -### NameParameterSet (Default) - -``` -Install-Module [-Name] [-MinimumVersion ] [-MaximumVersion ] - [-RequiredVersion ] [-Repository ] [-Credential ] [-Scope ] - [-Proxy ] [-ProxyCredential ] [-AllowClobber] [-SkipPublisherCheck] [-Force] - [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [] -``` - -### InputObject - -``` -Install-Module [-InputObject] [-Credential ] [-Scope ] - [-Proxy ] [-ProxyCredential ] [-AllowClobber] [-SkipPublisherCheck] [-Force] - [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION - -The `Install-Module` cmdlet gets one or more modules that meet specified criteria from an online -repository. The cmdlet verifies that search results are valid modules and copies the module folders -to the installation location. Installed modules aren't automatically imported after installation. -You can filter which module is installed based on the minimum, maximum, and exact versions of -specified modules. - -This is a proxy cmdlet for the `Get-InstalledPSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Install-PSResource](../Microsoft.PowerShell.PSResourceGet/Install-PSResource.md). - -## EXAMPLES - -### Example 1: Find and install a module - -This example finds a module in the repository and installs the module. - -```powershell -Find-Module -Name PowerShellGet | Install-Module -``` - -The `Find-Module` uses the **Name** parameter to specify the **PowerShellGet** module. By default, -the newest version of the module is downloaded from the repository. The object is sent down the -pipeline to the `Install-Module` cmdlet. `Install-Module` installs the module for all users in -`$env:ProgramFiles\PowerShell\Modules`. - -### Example 2: Install a module by name - -In this example, the newest version of the **PowerShellGet** module is installed. - -```powershell -Install-Module -Name PowerShellGet -``` - -The `Install-Module` uses the **Name** parameter to specify the **PowerShellGet** module. By -default, the newest version of the module is downloaded from the repository and installed. - -### Example 3: Install a module using its minimum version - -In this example, the minimum version of the **PowerShellGet** module is installed. The -**MinimumVersion** parameter specifies the lowest version of the module that should be installed. If -a newer version of the module is available, that version is downloaded and installed for all users. - -```powershell -Install-Module -Name PowerShellGet -MinimumVersion 2.0.1 -``` - -The `Install-Module` uses the **Name** parameter to specify the **PowerShellGet** module. The -**MinimumVersion** parameter specifies that version **2.0.1** is downloaded from the repository and -installed. Because version **2.0.4** is available, that version is downloaded and installed for all -users. - -### Example 4: Install a specific version of a module - -In this example, a specific version of the **PowerShellGet** module is installed. - -```powershell -Install-Module -Name PowerShellGet -RequiredVersion 2.0.0 -``` - -The `Install-Module` uses the **Name** parameter to specify the **PowerShellGet** module. The -**RequiredVersion** parameter specifies that version **2.0.0** is downloaded and installed for all -users. - -### Example 5: Install a module only for the current user - -This example downloads and installs the newest version of a module, only for the current user. - -```powershell -Install-Module -Name PowerShellGet -Scope CurrentUser -``` - -The `Install-Module` uses the **Name** parameter to specify the **PowerShellGet** module. -`Install-Module` downloads and installs the newest version of **PowerShellGet** into the current -user's directory, `$HOME\Documents\PowerShell\Modules`. - -### Example 6: Install the latest prerelease version of a module - -This example shows how to install the latest version of a module when that version is a prerelease -version. Installing a prerelease version requires the **AllowPrerelease** parameter. - -```powershell -Install-Module -Name Microsoft.PowerShell.Crescendo -AllowPrerelease -``` - -Using this method you get the latest version available. If the latest version isn't a prerelease, -you get the latest stable version of the module. - -### Example 7: Install a specific prerelease version of a module - -This example shows how to install a specific prerelease version of a module. The `Find-Module` -cmdlet can be used to find prerelease versions of modules in the PowerShell Gallery. - -Prerelease versions have a format of `-`. - -```powershell -Find-Module PSReadLine -AllVersions -AllowPrerelease | Select-Object -First 5 -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -2.2.6 PSReadLine PSGallery Great command line editing in the PowerS… -2.2.5 PSReadLine PSGallery Great command line editing in the PowerS… -2.2.4-beta1 PSReadLine PSGallery Great command line editing in the PowerS… -2.2.3 PSReadLine PSGallery Great command line editing in the PowerS… -2.2.2 PSReadLine PSGallery Great command line editing in the PowerS… -``` - -```powershell -Install-Module -Name PSReadLine -RequiredVersion 2.2.4-beta1 -AllowPrerelease -``` - -Use the version shown in the PowerShell Gallery for the value of the **RequiredVersion** parameter. - -## PARAMETERS - -### -AcceptLicense - -For modules that require a license, **AcceptLicense** automatically accepts the license agreement -during installation. For more information, see -[Modules Requiring License Acceptance](/powershell/scripting/gallery/concepts/module-license-acceptance). - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowClobber - -Overrides warning messages about installation conflicts about existing commands on a computer. -Overwrites existing commands that have the same name as commands being installed by a module. -**AllowClobber** and **Force** can be used together in an `Install-Module` command. - -The proxy cmdlet transform the value of this parameter to the **NoClobber** parameter of the -`Install-PSResource` cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowPrerelease - -Allows you to install a module marked as a pre-release. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Install-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Credential - -Specifies a user account that has rights to install a module for a specified package provider or -source. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -The proxy cmdlet ignores this parameter since it's not supported by `Install-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject - -Used for pipeline input. An error is thrown if a value supplied directly to **InputObject**. -Use the pipeline to pass objects with the **InputObject** parameter. - -```yaml -Type: System.Management.Automation.PSObject[] -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Install-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Install-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies the exact names of modules to install from the online gallery. A comma-separated list of -module names is accepted. The module name must match the module name in the repository. Use -`Find-Module` to get a list of module names. - -```yaml -Type: System.String[] -Parameter Sets: NameParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PassThru - -When using the **PassThru** parameter, `Install-Module` outputs a **PSRepositoryItemInfo** object -for the module. This is the same information that you get from the `Find-Module` cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by `Install-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by `Install-PSResource`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Repository - -Use the **Repository** parameter to specify the name of repository from which to download and -install a module. Used when multiple repositories are registered. Specifies the name of a registered -repository in the `Install-Module` command. To register a repository, use `Register-PSRepository`. -To display registered repositories, use `Get-PSRepository`. - -```yaml -Type: System.String[] -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Install-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Scope - -Specifies the installation scope of the module. The acceptable values for this parameter are -**AllUsers** and **CurrentUser**. - -The **AllUsers** scope installs modules in a location that's accessible to all users of the -computer: - -`$env:ProgramFiles\PowerShell\Modules` - -The **CurrentUser** installs modules in a location that's accessible only to the current user of -the computer. For example: - -`$HOME\Documents\PowerShell\Modules` - -When no **Scope** is defined, the default is set based on the PowerShellGet version. - -- In PowerShellGet 1.x versions, the default is **AllUsers**, which requires elevation for install. -- For PowerShellGet versions 2.0.0 and above in PowerShell 6 or higher: - - The default is **CurrentUser**, which doesn't require elevation for install. - - If you are running in an elevated session, the default is **AllUsers**. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: -Accepted values: CurrentUser, AllUsers - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipPublisherCheck - -The proxy cmdlet transforms this parameter to **AuthenticodeCheck** before calling -`Install-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before running the `Install-Module` cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if an `Install-Module` command was run. The cmdlet isn't run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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 - -### PSRepositoryItemInfo - -`Find-Module` creates **PSRepositoryItemInfo** objects that can be sent down the pipeline to -`Install-Module`. - -### System.String[] - -### System.Management.Automation.PSObject[] - -### System.String - -### System.Management.Automation.PSCredential - -### System.Uri - -## OUTPUTS - -### Microsoft.PowerShell.Commands.PSRepositoryItemInfo - -When using the **PassThru** parameter, `Install-Module` outputs a **PSRepositoryItemInfo** object -for the module. This is the same information that you get from the `Find-Module` cmdlet. - -## NOTES - -PowerShell includes the following aliases for `Install-Module`: - -- All platforms: - - `inmo` - -`Install-Module` runs on PowerShell 5.0 or later releases, on Windows 7 or Windows 2008 R2 and later -releases of Windows. - -> [!IMPORTANT] -> As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS) -> versions 1.0 and 1.1. If you aren't using TLS 1.2 or higher, you will receive an error when -> trying to access the PowerShell Gallery. Use the following command to ensure you are using TLS -> 1.2: -> -> `[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12` -> -> For more information, see the -> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the -> PowerShell blog. - -As a security best practice, evaluate a module's code before running any cmdlets or functions for -the first time. To prevent running modules that contain malicious code, installed modules aren't -automatically imported after installation. - -If the module name specified by the **Name** parameter doesn't exist in the repository, -`Install-Module` returns an error. - -To install multiple modules, use the **Name** parameter and specify a comma-separated array of -module names. If you specify multiple module names, you can't use **MinimumVersion**, -**MaximumVersion**, or **RequiredVersion**. `Find-Module` creates **PSRepositoryItemInfo** objects -that can be sent down the pipeline to `Install-Module`. The pipeline is another way to specify -multiple modules to install in a single command. - -By default, modules for the scope of **AllUsers** are installed in -`$env:ProgramFiles\PowerShell\Modules`. The default prevents confusion when you install PowerShell -Desired State Configuration (DSC) resources. - -A module installation fails and can't be imported if it doesn't have a `.psm1`, `.psd1`, or `.dll` -of the same name within the folder. Use the **Force** parameter to install the module. - -If an existing module's version matches the name specified by the **Name** parameter, and the -**MinimumVersion** or **RequiredVersion** parameter aren't used, `Install-Module` silently continues -but doesn't install the module. - -If an existing module's version is greater than the value of the **MinimumVersion** parameter, or -equal to the value of the **RequiredVersion** parameter, `Install-Module` silently continues but -doesn't install the module. - -If the existing module doesn't match the values specified by the **MinimumVersion** or -**RequiredVersion** parameters, an error occurs in the `Install-Module` command. For example, if the -version of the existing installed module is lower than the **MinimumVersion** value or not equal to -the **RequiredVersion** value. - -`Install-Module` also installs any dependent modules specified as required by the module publisher. -The publisher lists the required modules and their versions in the module manifest. - -## RELATED LINKS - -[Find-Module](Find-Module.md) - -[Get-PSRepository](Get-PSRepository.md) - -[Import-Module](xref:Microsoft.PowerShell.Core.Import-Module) - -[Publish-Module](Publish-Module.md) - -[Register-PSRepository](Register-PSRepository.md) - -[Uninstall-Module](Uninstall-Module.md) - -[Update-Module](Update-Module.md) - -[about_Module](/powershell/module/Microsoft.PowerShell.Core/About/about_Modules) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Install-Script.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Install-Script.md deleted file mode 100644 index 39dcd06..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Install-Script.md +++ /dev/null @@ -1,555 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/install-script?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Install-Script ---- -# Install-Script - -## SYNOPSIS -Installs a script. - -## SYNTAX - -### NameParameterSet (Default) - -``` -Install-Script [-Name] [-MinimumVersion ] [-MaximumVersion ] - [-RequiredVersion ] [-Repository ] [-Scope ] [-NoPathUpdate] - [-Proxy ] [-ProxyCredential ] [-Credential ] [-Force] - [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [] -``` - -### InputObject - -``` -Install-Script [-InputObject] [-Scope ] [-NoPathUpdate] [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-AcceptLicense] - [-PassThru] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION - -The `Install-Script` cmdlet acquires a script payload from a repository, verifies that the -payload is a valid PowerShell script, and copies the script file to a specified installation -location. - -This is a proxy cmdlet for the `Install-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Install-PSResource](../Microsoft.PowerShell.PSResourceGet/Install-PSResource.md). - -## EXAMPLES - -### Example 1: Find a script and install it - -``` -PS C:\> Find-Script -Repository "Local1" -Name "Required-Script2" -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Required-Script2 Script local1 Description for the Required-Script2 script - -PS C:\> Find-Script -Repository "Local1" -Name "Required-Script2" | Install-Script -PS C:\> Get-Command -Name "Required-Script2" -CommandType Name Version Source ------------ ---- ------- ------ -ExternalScript Required-Script2.ps1 2.0 C:\Users\pattif\Documents\WindowsPowerShell\Scripts\Required-Script2.ps1 - -PS C:\> Get-InstalledScript -Name "Required-Script2" -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Required-Script2 Script local1 Description for the Required-Script2 script - -PS C:\> Get-InstalledScript -Name "Required-Script2" | Format-List * -Name : Required-Script2 -Version : 2.5 -Type : Script -Description : Description for the Required-Script2 script -Author : pattif -CompanyName : -Copyright : 2015 Microsoft Corporation. All rights reserved. -PublishedDate : 8/15/2015 12:42:39 AM -LicenseUri : http://required-script2.com/license -ProjectUri : http://required-script2.com/ -IconUri : http://required-script2.com/icon -Tags : {Tag1, Tag2, Tag-Required-Script2-2.5, PSScript...} -Includes : {Function, DscResource, Cmdlet, Command} -PowerShellGetFormatVersion : -ReleaseNotes : Required-Script2 release notes -Dependencies : {} -RepositorySourceLocation : http://pattif-dev:8765/api/v2/ -Repository : local1 -PackageManagementProvider : NuGet -InstalledLocation : C:\Users\pattif\Documents\WindowsPowerShell\Scripts -``` - -The first command finds the script named `Required-Script2` from the Local1 repository and displays -the results. - -The second command finds the `Required-Script2` script, and then uses the pipeline operator to pass -it to the `Install-Script` cmdlet to install it. - -The third command uses the `Get-Command` cmdlet to get `Required-Script2`, and then displays the -results. - -The fourth command uses the `Get-InstalledScript` cmdlet to get `Required-Script2` and display the -results. - -The fifth command gets `Required-Script2` and uses the pipeline operator to pass it to the -`Format-List` cmdlet to format the output. - -### Example 2: Install a script with AllUsers scope - -``` -PS C:\> Install-Script -Repository "Local1" -Name "Required-Script3" -Scope "AllUsers" -PS C:\> Get-InstalledScript -Name "Required-Script3" -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Required-Script3 Script local1 Description for the Required-Script3 script - -PS C:\> Get-InstalledScript -Name "Required-Script3" | Format-List * -Name : Required-Script3 -Version : 2.5 -Type : Script -Description : Description for the Required-Script3 script -Author : pattif -CompanyName : -Copyright : 2015 Microsoft Corporation. All rights reserved. -PublishedDate : 8/15/2015 12:42:45 AM -LicenseUri : http://required-script3.com/license -ProjectUri : http://required-script3.com/ -IconUri : http://required-script3.com/icon -Tags : {Tag1, Tag2, Tag-Required-Script3-2.5, PSScript...} -Includes : {Function, DscResource, Cmdlet, Command} -PowerShellGetFormatVersion : -ReleaseNotes : Required-Script3 release notes -Dependencies : {} -RepositorySourceLocation : http://pattif-dev:8765/api/v2/ -Repository : local1 -PackageManagementProvider : NuGet -InstalledLocation : C:\Program Files\WindowsPowerShell\Scripts -``` - -The first command installs the script named `Required-Script3` and assigns it AllUsers scope. - -The second command gets the installed script `Required-Script3` and displays information about it. - -The third command gets `Required-Script3` and uses the pipeline operator to pass it to the -`Format-List` cmdlet to format the output. - -### Example 3: Install a script and its dependencies - -``` -PS C:\> Find-Script -Repository "Local1" -Name "Script-WithDependencies2" -IncludeDependencies -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.0 Script-WithDependencies2 Script local1 Description for the Script-WithDependencies2 script -2.5 RequiredModule1 Module local1 RequiredModule1 module -2.5 RequiredModule2 Module local1 RequiredModule2 module -2.5 RequiredModule3 Module local1 RequiredModule3 module -2.5 Required-Script1 Script local1 Description for the Required-Script1 script -2.5 Required-Script2 Script local1 Description for the Required-Script2 script -2.5 Required-Script3 Script local1 Description for the Required-Script3 script - -PS C:\> Install-Script -Repository "Local1" -Name "Script-WithDependencies2" -PS C:\> Get-InstalledScript -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Required-Script1 Script local1 Description for the Required-Script1 script -2.5 Required-Script2 Script local1 Description for the Required-Script2 script -2.5 Required-Script3 Script local1 Description for the Required-Script3 script -2.0 Script-WithDependencies2 Script local1 Description for the Script-WithDependencies2 script - -PS C:\> Get-InstalledModule -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 RequiredModule1 Module local1 RequiredModule1 module -2.5 RequiredModule2 Module local1 RequiredModule2 module -2.5 RequiredModule3 Module local1 RequiredModule3 module - -PS C:\> Find-Script -Repository "Local1" -Name "Required-Script*" -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Required-Script1 Script local1 Description for the Required-Script1 script -2.5 Required-Script2 Script local1 Description for the Required-Script2 script -2.5 Required-Script3 Script local1 Description for the Required-Script3 script - -PS C:\> Install-Script -Repository "Local1" -Name "Required-Script*" -PS C:\> Get-InstalledScript -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Required-Script1 Script local1 Description for the Required-Script1 script -2.5 Required-Script2 Script local1 Description for the Required-Script2 script -2.5 Required-Script3 Script local1 Description for the Required-Script3 script -``` - -The first command finds the script named `Script-WithDependencies2` and its dependencies in the -Local1 repository and displays the results. - -The second command installs `Script-WithDependencies2`. - -The third command uses the `Get-InstalledScript` script cmdlet to get installed scripts and display -the results. - -The fourth command uses the `Get-InstalledModule` cmdlet to get installed modules and display the -results. - -The fifth command uses the `Find-Script` cmdlet to find scripts where the name begins with -`Required-Script` and display the results. - -The sixth command installs the scripts where the name begins with `Required-Script` in the Local1 -repository. - -The final command gets installed scripts and displays the results. - -## PARAMETERS - -### -AcceptLicense - -Automatically accept the license agreement during installation if the module requires it. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowPrerelease - -Allows you to install a script marked as a prerelease. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Install-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Credential - -Specifies a user account that has rights to install a script for a specified package provider or -source. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -The proxy cmdlet ignores this parameter since it's not supported by `Install-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject - -Used for pipeline input. An error is thrown if a value supplied directly to **InputObject**. -Use the pipeline to pass objects with the **InputObject** parameter. - -```yaml -Type: System.Management.Automation.PSObject[] -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Install-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Install-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies an array of names of scripts to install. - -```yaml -Type: System.String[] -Parameter Sets: NameParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -NoPathUpdate - -The proxy cmdlet ignores this parameter since it's not supported by `Install-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru - -When using the **PassThru** parameter, `Install-Script` outputs a **PSRepositoryItemInfo** object -for the module. This is the same information that you get from the `Find-Script` cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by `Install-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by `Install-PSResource`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Repository - -Specifies the friendly name of a repository that has been registered with the -`Register-PSRepository` cmdlet. The default is all registered repositories. - -```yaml -Type: System.String[] -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Install-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Scope - -Specifies the installation scope of the script. -Valid values are: AllUsers and CurrentUser. - -The AllUsers scope lets modules be installed in a location that is accessible to all users of the -computer, that is, `$env:ProgramFiles\WindowsPowerShell\Scripts`. - -The CurrentUser scope lets modules be installed only to -`$HOME\Documents\WindowsPowerShell\Scripts`, so that the module is available only to the current -user. - -When no **Scope** is defined, the default will be set based on the current session: - -- For an elevated PowerShell session, **Scope** defaults to AllUsers; -- For non-elevated PowerShell sessions in [PowerShellGet versions 2.0.0](https://www.powershellgallery.com/packages/PowerShellGet) - and above, **Scope** is CurrentUser; -- For non-elevated PowerShell sessions in PowerShellGet versions 1.6.7 and earlier, **Scope** is - undefined, and `Install-Module` fails. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: -Accepted values: CurrentUser, AllUsers - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if the cmdlet runs. The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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.Management.Automation.PSObject[] - -### System.String - -### System.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### System.Object - -## NOTES - -> [!IMPORTANT] -> As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS) -> versions 1.0 and 1.1. If you are not using TLS 1.2 or higher, you will receive an error when -> trying to access the PowerShell Gallery. Use the following command to ensure you are using TLS -> 1.2: -> -> `[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12` -> -> For more information, see the -> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the -> PowerShell blog. - -## RELATED LINKS - -[Find-Script](Find-Script.md) - -[Publish-Script](Publish-Script.md) - -[Save-Script](Save-Script.md) - -[Uninstall-Script](Uninstall-Script.md) - -[Update-Script](Update-Script.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/New-ScriptFileInfo.md b/powershell-gallery/powershellget-3.x/PowerShellGet/New-ScriptFileInfo.md deleted file mode 100644 index d45844b..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/New-ScriptFileInfo.md +++ /dev/null @@ -1,584 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/new-scriptfileinfo?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: New-ScriptFileInfo ---- - -# New-ScriptFileInfo - -## SYNOPSIS -Creates a script file with metadata. - -## SYNTAX - -### All - -``` -New-ScriptFileInfo [[-Path] ] [-Version ] [-Author ] -Description - [-Guid ] [-CompanyName ] [-Copyright ] [-RequiredModules ] - [-ExternalModuleDependencies ] [-RequiredScripts ] - [-ExternalScriptDependencies ] [-Tags ] [-ProjectUri ] [-LicenseUri ] - [-IconUri ] [-ReleaseNotes ] [-PrivateData ] [-PassThru] [-Force] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION - -The `New-ScriptFileInfo` cmdlet creates a PowerShell script file, including metadata about the -script. - -This is a proxy cmdlet for the `New-PSScriptFileInfo` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[New-PSScriptFileInfo](../Microsoft.PowerShell.PSResourceGet/New-PSScriptFileInfo.md). - -## EXAMPLES - -### Example 1: Create a script file and specify its version, author, and description - -In this example, a script file is created and its contents are displayed in the PowerShell console. - -```powershell -$Parms = @{ - Path = "C:\Test\Temp-Scriptfile.ps1" - Version = "1.0" - Author = "pattif@contoso.com" - Description = "My test script file description goes here" - } -New-ScriptFileInfo @Parms -Get-Content -Path C:\Test\Temp-Scriptfile.ps1 -``` - -```Output -<#PSScriptInfo - -.VERSION 1.0 - -.GUID 3bb10ee7-38c1-41b9-88ea-16899164fc19 - -.AUTHOR pattif@contoso.com - -.COMPANYNAME - -.COPYRIGHT - -.TAGS - -.LICENSEURI - -.PROJECTURI - -.ICONURI - -.EXTERNALMODULEDEPENDENCIES - -.REQUIREDSCRIPTS - -.EXTERNALSCRIPTDEPENDENCIES - -.RELEASENOTES - -.PRIVATEDATA - -#> - -<# - -.DESCRIPTION - My test script file description goes here - -#> -Param() -``` - -The `New-ScriptFileInfo` cmdlet uses splatting to configure several parameters for the script. -**Path** sets the location and name of the script. **Version** specifies the script's version -number. **Author** is the email address of the person who created the script. **Description** -explains the script's purpose. - -After the script is created, `Get-Content` uses the **Path** parameter to locate the script. The -script's contents are displayed in the PowerShell console. - -### Example 2: Test a script file - -In this example, the metadata for the script created in **Example 1** is tested. - -```powershell -Test-ScriptFileInfo -Path C:\Test\Temp-Scriptfile.ps1 -``` - -```Output -Version Name Author Description -------- ---- ------ ----------- -1.0 Temp-Scriptfile pattif@contoso.com My test script file description goes here -``` - -The `Test-ScriptFileInfo` cmdlet uses the **Path** parameter to specify the script file's location. - -### Example 3: Create a script file with all the metadata properties - -This example uses splatting to create a script file named `New-ScriptFile.ps1` that includes all its -metadata properties. The **Verbose** parameter specifies that verbose output is displayed as the -script is created. - -```powershell -$Parms = @{ - Path = "C:\Test\New-ScriptFile.ps1" - Verbose = $True - Version = "1.0" - Author = "pattif@contoso.com" - Description = "My new script file test" - CompanyName = "Contoso Corporation" - Copyright = "2019 Contoso Corporation. All rights reserved." - ExternalModuleDependencies = "ff","bb" - RequiredScripts = "Start-WFContosoServer", "Stop-ContosoServerScript" - ExternalScriptDependencies = "Stop-ContosoServerScript" - Tags = @("Tag1", "Tag2", "Tag3") - ProjectUri = "https://contoso.com" - LicenseUri = "https://contoso.com/License" - IconUri = "https://contoso.com/Icon" - PassThru = $True - ReleaseNotes = @("Contoso script now supports the following features:", - "Feature 1", - "Feature 2", - "Feature 3", - "Feature 4", - "Feature 5") - RequiredModules = - "1", - "2", - "RequiredModule1", - @{ModuleName="RequiredModule2";ModuleVersion="1.0"}, - @{ModuleName="RequiredModule3";RequiredVersion="2.0"}, - "ExternalModule1" - } -New-ScriptFileInfo @Parms -``` - -```Output -VERBOSE: Performing the operation "Creating the 'C:\Test\New-ScriptFile.ps1' - PowerShell Script file" on target "C:\Test\New-ScriptFile.ps1". - -<#PSScriptInfo - -.VERSION 1.0 - -.GUID 4fabe8c7-7862-45b1-a72e-1352a433b77d - -.AUTHOR pattif@contoso.com - -.COMPANYNAME Contoso Corporation - -.COPYRIGHT 2019 Contoso Corporation. All rights reserved. - -.TAGS Tag1 Tag2 Tag3 - -.LICENSEURI https://contoso.com/License - -.PROJECTURI https://contoso.com/ - -.ICONURI https://contoso.com/Icon - -.EXTERNALMODULEDEPENDENCIES ff,bb - -.REQUIREDSCRIPTS Start-WFContosoServer,Stop-ContosoServerScript - -.EXTERNALSCRIPTDEPENDENCIES Stop-ContosoServerScript - -.RELEASENOTES -Contoso script now supports the following features: -Feature 1 -Feature 2 -Feature 3 -Feature 4 -Feature 5 - -.PRIVATEDATA - -#> - -#Requires -Module 1 -#Requires -Module 2 -#Requires -Module RequiredModule1 -#Requires -Module @{ModuleName = 'RequiredModule2'; ModuleVersion = '1.0'} -#Requires -Module @{RequiredVersion = '2.0'; ModuleName = 'RequiredModule3'} -#Requires -Module ExternalModule1 - -<# - -.DESCRIPTION - My new script file test - -#> -Param() -``` - -## PARAMETERS - -### -Author - -Specifies the script author. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CompanyName - -Specifies the company or vendor who created the script. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Copyright - -Specifies a copyright statement for the script. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description - -Specifies a description for the script. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExternalModuleDependencies - -Specifies an array of external module dependencies. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExternalScriptDependencies - -Specifies an array of external script dependencies. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Force - -Forces the command to run without asking for user confirmation. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Guid - -Specifies a unique ID for the script. - -```yaml -Type: System.Guid -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IconUri - -Specifies the URL of an icon for the script. The specified icon is displayed on the gallery web page -for the script. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LicenseUri - -Specifies the URL of licensing terms. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru - -The proxy cmdlet ignores this parameter since it's not supported by `New-PSScriptFileInfo`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Path - -Specifies the location where the script file is saved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PrivateData - -Specifies private data for the script. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProjectUri - -Specifies the URL of a web page about this project. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReleaseNotes - -Specifies a string array that contains release notes or comments that you want available to users of -this version of the script. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredModules - -Specifies modules that must be in the global session state. If the required modules aren't in the -global session state, PowerShell imports them. - -```yaml -Type: System.Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredScripts - -Specifies an array of required scripts. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -Specifies an array of tags. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Version - -Specifies the version of the script. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before running the `New-ScriptFileInfo`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if `New-ScriptFileInfo` runs. The cmdlet isn't run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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 - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS - -[about_Splatting](/powershell/module/Microsoft.PowerShell.Core/About/about_splatting) - -[Test-ScriptFileInfo](Test-ScriptFileInfo.md) - -[Update-ScriptFileInfo](Update-ScriptFileInfo.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/PowerShellGet.md b/powershell-gallery/powershellget-3.x/PowerShellGet/PowerShellGet.md deleted file mode 100644 index 5cc2d6a..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/PowerShellGet.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -Download Help Link: https://aka.ms/powershell74-help -Help Version: 7.3.0.0 -Locale: en-US -Module Guid: 1d73a601-4a6c-43c5-ba3f-619b18bbb404 -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -schema: 2.0.0 -title: PowerShellGet v3 (preview) ---- -# PowerShellGet v3 Module - -## Description - -This documentation covers version 3.0.22-beta22 of the **PowerShellGet** module. This module is -provided for compatibility with **PowerShellGet** v2.2.x. The cmdlets in this version of the module -are proxy cmdlets that call the equivalent cmdlets in the **Microsoft.PowerShell.PSResourceGet** -module. - -The proxy cmdlets provide a compatibility layer for scripts that use the version 2.x cmdlets. In -most cases, the scripts continue to work without modification. However, there are some differences -in behavior between the modules. Some parameters for the **PowerShellGet** cmdlets aren't supported -by the **Microsoft.PowerShell.PSResourceGet** cmdlets. The proxy cmdlets silently discard -unsupported parameters, transform some parameters, and pass other parameters through to the -equivalent cmdlets in the **Microsoft.PowerShell.PSResourceGet** module. - -For more information about the **Microsoft.PowerShell.PSResourceGet** module, see -[about_PSResourceGet](../microsoft.powershell.psresourceget/about/about_psresourceget.md). - -> [!IMPORTANT] -> Windows PowerShell 5.1 comes with version 1.0.0.1 of **PowerShellGet** preinstalled. This version -> of PowerShellGet has a limited features and doesn't support the updated capabilities of the -> PowerShell Gallery. To be supported, you must update to the latest version. - -## PowerShellGet Cmdlets - -### [Find-Command](Find-Command.md) -Finds PowerShell commands in modules. - -### [Find-DscResource](Find-DscResource.md) -Finds a DSC resource. - -### [Find-Module](Find-Module.md) -Finds modules in a repository that match specified criteria. - -### [Find-RoleCapability](Find-RoleCapability.md) -Finds role capabilities in modules. - -### [Find-Script](Find-Script.md) -Finds a script. - -### [Get-InstalledModule](Get-InstalledModule.md) -Gets a list of modules on the computer that were installed by PowerShellGet. - -### [Get-InstalledScript](Get-InstalledScript.md) -Gets an installed script. - -### [Get-PSRepository](Get-PSRepository.md) -Gets PowerShell repositories. - -### [Install-Module](Install-Module.md) -Downloads one or more modules from a repository, and installs them on the local computer. - -### [Install-Script](Install-Script.md) -Installs a script. - -### [New-ScriptFileInfo](New-ScriptFileInfo.md) -Creates a script file with metadata. - -### [Publish-Module](Publish-Module.md) -Publishes a specified module from the local computer to an online gallery. - -### [Publish-Script](Publish-Script.md) -Publishes a script. - -### [Register-PSRepository](Register-PSRepository.md) -Registers a PowerShell repository. - -### [Save-Module](Save-Module.md) -Saves a module and its dependencies on the local computer but doesn't install the module. - -### [Save-Script](Save-Script.md) -Saves a script. - -### [Set-PSRepository](Set-PSRepository.md) -Sets values for a registered repository. - -### [Test-ScriptFileInfo](Test-ScriptFileInfo.md) -Validates a comment block for a script. - -### [Uninstall-Module](Uninstall-Module.md) -Uninstalls a module. - -### [Uninstall-Script](Uninstall-Script.md) -Uninstalls a script. - -### [Unregister-PSRepository](Unregister-PSRepository.md) -Unregisters a repository. - -### [Update-Module](Update-Module.md) -Downloads and installs the newest version of specified modules from an online gallery to the local computer. - -### [Update-ModuleManifest](Update-ModuleManifest.md) -Updates a module manifest file. - -### [Update-Script](Update-Script.md) -Updates a script. - -### [Update-ScriptFileInfo](Update-ScriptFileInfo.md) -Updates information for a script. diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Publish-Module.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Publish-Module.md deleted file mode 100644 index 807217a..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Publish-Module.md +++ /dev/null @@ -1,426 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 2.9.0-preview -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/publish-module?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Publish-Module ---- - -# Publish-Module - -## SYNOPSIS -Publishes a specified module from the local computer to an online gallery. - -## SYNTAX - -### ModuleNameParameterSet (Default) - -``` -Publish-Module -Name [-RequiredVersion ] [-NuGetApiKey ] - [-Repository ] [-Credential ] [-FormatVersion ] - [-ReleaseNotes ] [-Tags ] [-LicenseUri ] [-IconUri ] - [-ProjectUri ] [-Exclude ] [-Force] [-AllowPrerelease] [-SkipAutomaticTags] - [-WhatIf] [-Confirm] [] -``` - -### ModulePathParameterSet - -``` -Publish-Module -Path [-NuGetApiKey ] [-Repository ] - [-Credential ] [-FormatVersion ] [-ReleaseNotes ] - [-Tags ] [-LicenseUri ] [-IconUri ] [-ProjectUri ] [-Force] - [-SkipAutomaticTags] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION - -The `Publish-Module` cmdlet publishes a module to an online NuGet-based gallery by using an API key, -stored as part of a user's profile in the gallery. You can specify the module to publish either by -the module's name, or by the path to the folder containing the module. - -This is a proxy cmdlet for the `Publish-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Publish-PSResource](../Microsoft.PowerShell.PSResourceGet/Publish-PSResource.md). - -## EXAMPLES - -### Example 1: Publish a module - -In this example, **MyDscModule** is published to the online gallery by using the API key to indicate -the module owner's online gallery account. If **MyDscModule** is not a valid manifest module that -specifies a name, version, description, and author, an error occurs. - -```powershell -Publish-Module -Path c:\projects\MyDscModule\1.0.0 -NuGetApiKey "11e4b435-6cb4-4bf7-8611-5162ed75eb73" -``` - -### Example 2: Publish a module with gallery metadata - -In this example, **MyDscModule** is published to the online gallery by using the API key to indicate -the module owner's gallery account. The additional metadata provided is displayed on the webpage for -the module in the gallery. The owner adds two search tags for the module, relating it to Active -Directory; a brief release note is added. If **MyDscModule** is not a valid manifest module that -specifies a name, version, description, and author, an error occurs. - -```powershell -$parameters = @{ - Path = 'c:\projects\MyDscModule\1.0.0' - NuGetApiKey = '11e4b435-6cb4-4bf7-8611-5162ed75eb73' - LicenseUri = 'http://contoso.com/license' - Tag = 'Active Directory','DSC' - ReleaseNote = 'Updated the ActiveDirectory DSC Resources to support adding users.' -} -Publish-Module @parameters -``` - -## PARAMETERS - -### -AllowPrerelease - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: ModuleNameParameterSet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Credential - -Specifies a user account that has rights to publish a module for a specified package provider or -source. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Exclude - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: ModuleNameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Force - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FormatVersion - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: -Accepted values: 2.0 - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IconUri - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LicenseUri - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.String -Parameter Sets: ModuleNameParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -NuGetApiKey - -Specifies the API key that you want to use to publish a module to the online gallery. The API key is -part of your profile in the online gallery, and can be found on your user account page in the -gallery. The API key is NuGet-specific functionality. - -The proxy cmdlet maps this parameter to the **ApiKey** parameter of `Publish-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Path - -Specifies the path to the module that you want to publish. This parameter accepts the path to the -folder that contains the module. The folder must have the same name as the module. - -```yaml -Type: System.String -Parameter Sets: ModulePathParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectUri - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReleaseNotes - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Repository - -Specifies the friendly name of a repository that has been registered by running -`Register-PSRepository`. The repository must have a **PublishLocation**, which is a valid NuGet URI. -The **PublishLocation** can be set by running `Set-PSRepository`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.String -Parameter Sets: ModuleNameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipAutomaticTags - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before running the `Publish-Module`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if the `Publish-Module` runs. The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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.Management.Automation.PSCredential - -## OUTPUTS - -### System.Object - -## NOTES - -PowerShell includes the following aliases for `Publish-Module`: - -- All platforms: - - `pumo` - -`Publish-Module` runs on PowerShell 3.0 or later releases of PowerShell, on Windows 7 or Windows -2008 R2 and later releases of Windows. - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - -Publishing a module requires metadata that is displayed on the gallery page for the module. Required -metadata includes the module name, version, description, and author. The metadata must be defined in -the module manifest. For more information, see -[Package manifest values that impact the PowerShell Gallery UI](/powershell/scripting/gallery/concepts/package-manifest-affecting-ui). - -## RELATED LINKS - -[Find-Module](Find-Module.md) - -[Install-Module](Install-Module.md) - -[Register-PSRepository](Register-PSRepository.md) - -[Set-PSRepository](Set-PSRepository.md) - -[Uninstall-Module](Uninstall-Module.md) - -[Update-Module](Update-Module.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Publish-Script.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Publish-Script.md deleted file mode 100644 index 76597a1..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Publish-Script.md +++ /dev/null @@ -1,302 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/publish-script?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Publish-Script ---- -# Publish-Script - -## SYNOPSIS -Publishes a script. - -## SYNTAX - -### PathParameterSet (Default) - -``` -Publish-Script -Path [-NuGetApiKey ] [-Repository ] - [-Credential ] [-Force] [-WhatIf] [-Confirm] [] -``` - -### LiteralPathParameterSet - -``` -Publish-Script -LiteralPath [-NuGetApiKey ] [-Repository ] - [-Credential ] [-Force] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION - -The `Publish-Script` cmdlet publishes the specified script to the online gallery. - -This is a proxy cmdlet for the `Publish-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Publish-PSResource](../Microsoft.PowerShell.PSResourceGet/Publish-PSResource.md). - -## EXAMPLES - -### Example 1: Create a script file, add content to it, and publish it - -The `New-ScriptFileInfo` cmdlet creates a script file named `Demo-Script.ps1`. `Get-Content` -displays the content of `Demo-Script.ps1`. The `Add-Content` cmdlet adds a function and a workflow -to `Demo-Script.ps1`. - -```powershell -$newScriptInfo = @{ - Path = 'D:\ScriptSharingDemo\Demo-Script.ps1' - Version = '1.0' - Author = 'author@contoso.com' - Description = "my test script file description goes here" -} -New-ScriptFileInfo @newScriptInfo -Get-Content -Path $newScriptInfo.Path -``` - -```Output -<#PSScriptInfo - -.VERSION 1.0 - -.AUTHOR pattif@microsoft.com - -.COMPANYNAME - -.COPYRIGHT - -.TAGS - -.LICENSEURI - -.PROJECTURI - -.ICONURI - -.EXTERNALMODULEDEPENDENCIES - -.REQUIREDSCRIPTS - -.EXTERNALSCRIPTDEPENDENCIES - -.RELEASENOTES -#> - -<# -.DESCRIPTION - my test script file description goes here -#> -Param() -``` - -```powershell -Add-Content -Path D:\ScriptSharingDemo\Demo-Script.ps1 -Value @" - -Function Demo-ScriptFunction { 'Demo-ScriptFunction' } - -Workflow Demo-ScriptWorkflow { 'Demo-ScriptWorkflow' } - -Demo-ScriptFunction -Demo-ScriptWorkflow -"@ -Test-ScriptFileInfo -Path D:\ScriptSharingDemo\Demo-Script.ps1 -``` - -```Output -Version Name Author Description -------- ---- ------ ----------- -1.0 Demo-Script author@contoso.com my test script file description goes here -``` - -```powershell -Publish-Script -Path D:\ScriptSharingDemo\Demo-Script.ps1 -Repository LocalRepo1 -Find-Script -Repository LocalRepo1 -Name "Demo-Script" -``` - -```Output -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -1.0 Demo-Script Script LocalRepo1 my test script file description goes here -``` - -The `Test-ScriptFileInfo` cmdlet validates `Demo-Script.ps1`. The `Publish-Script` cmdlet publishes -the script to the **LocalRepo1** repository. Finally. `Find-Script` is used to search for -`Demo-Script.ps1` in the **LocalRepo1** repository. - -## PARAMETERS - -### -Credential - -Specifies a user account that has rights to publish the script. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -The proxy cmdlet ignores this parameter since it's not supported by `Publish-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LiteralPath - -Specifies a path to one or more locations. Unlike the **Path** parameter, the value of the -**LiteralPath** parameter is used exactly as entered. No characters are interpreted as wildcards. If -the path includes escape characters, enclose them in single quotation marks. Single quotation marks -tell Windows PowerShell not to interpret any characters as escape sequences. - -The parameter is mapped to the **Path** parameter of the `Publish-PSResource` cmdlet. - -```yaml -Type: System.String -Parameter Sets: LiteralPathParameterSet -Aliases: PSPath - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -NuGetApiKey - -Specifies the API key that you want to use to publish a script to the online gallery. The API key is -part of your profile in the online gallery. For more information see [Managing API keys](/powershell/scripting/gallery/how-to/managing-profile/creating-apikeys). - -The parameter is mapped to the **ApiKey** parameter of the `Publish-PSResource` cmdlet. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Path - -Specifies a path to one or more locations. Wildcards are permitted. The default location is the -current directory. - -```yaml -Type: System.String -Parameter Sets: PathParameterSet -Aliases: - -Required: True -Position: Named -Default value: -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: True -``` - -### -Repository - -Specifies the friendly name of a repository that has been registered by running -`Register-PSRepository`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if the cmdlet runs. The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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.Management.Automation.PSCredential - -## OUTPUTS - -### System.Object - -## NOTES - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - -## RELATED LINKS - -[Find-Script](Find-Script.md) - -[Install-Script](Install-Script.md) - -[Publish-Script](Publish-Script.md) - -[Save-Script](Save-Script.md) - -[Update-Script](Update-Script.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Register-PSRepository.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Register-PSRepository.md deleted file mode 100644 index cf91682..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Register-PSRepository.md +++ /dev/null @@ -1,304 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/register-psrepository?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Register-PSRepository ---- -# Register-PSRepository - -## SYNOPSIS -Registers a PowerShell repository. - -## SYNTAX - -### NameParameterSet (Default) - -``` -Register-PSRepository [-Name] [-SourceLocation] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [-Credential ] - [-InstallationPolicy ] [-Proxy ] [-ProxyCredential ] - [-PackageManagementProvider ] [] -``` - -### PSGalleryParameterSet - -``` -Register-PSRepository [-Default] [-InstallationPolicy ] [-Proxy ] - [-ProxyCredential ] [] -``` - -## DESCRIPTION - -The `Register-PSRepository` cmdlet registers the default repository for PowerShell modules. After a -repository is registered, you can reference it from the `Find-Module`, `Install-Module`, and -`Publish-Module` cmdlets. The registered repository becomes the default repository in `Find-Module` -and `Install-Module`. - -Registered repositories are user-specific. They are not registered in a system-wide context. - -This is a proxy cmdlet for the `Register-PSResourceRepository` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Register-PSResourceRepository](../Microsoft.PowerShell.PSResourceGet/Register-PSResourceRepository.md). - -## EXAMPLES - -### Example 1: Register a repository - -```powershell -$parameters = @{ - Name = "myNuGetSource" - SourceLocation = "https://www.myget.org/F/powershellgetdemo/api/v2" - PublishLocation = "https://www.myget.org/F/powershellgetdemo/api/v2/Packages" - InstallationPolicy = 'Trusted' -} -Register-PSRepository @parameters -Get-PSRepository -``` - -```Output -Name SourceLocation OneGetProvider InstallationPolicy ----- -------------- -------------- ------------------ -PSGallery http://go.micro... NuGet Untrusted -myNuGetSource https://myget.c... NuGet Trusted -``` - -The first command registers `https://www.myget.org/F/powershellgetdemo/` as a repository for the -current user. After myNuGetSource is registered, you can explicitly reference it when searching for, -installing, and publishing modules. Because the **PackageManagementProvider** parameter isn't -specified, the repository is not explicitly associated with a OneGet package provider, so -PowerShellGet polls available package providers and associates it with the NuGet provider. - -The second command gets registered repositories and displays the results. - -## PARAMETERS - -### -Credential - -The proxy cmdlet ignores this parameter since it's not supported by `Register-PSResourceRepository`. - -```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 -``` - -### -Default - -Registers PowerShell Gallery as the default repository. - -The proxy cmdlet transforms the value of this parameter to the **PSGallery** parameter of -`Register-PSResourceRepository`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PSGalleryParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InstallationPolicy - -Specifies the installation policy. Valid values are: Trusted, UnTrusted. The default value is -UnTrusted. - -A repository's installation policy specifies PowerShell behavior when installing from that -repository. When installing modules from an UnTrusted repository, the user is prompted for -confirmation. - -The proxy cmdlet transforms the value of this parameter to the **Trusted** parameter of -`Register-PSResourceRepository`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: -Accepted values: Trusted, Untrusted - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies the name of the repository to register. You can use this name to specify the repository in -cmdlets such as `Find-Module` and `Install-Module`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PackageManagementProvider - -The proxy cmdlet ignores this parameter since it's not supported by `Register-PSResourceRepository`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by `Register-PSResourceRepository`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by `Register-PSResourceRepository`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PublishLocation - -The proxy cmdlet ignores this parameter since it's not supported by `Register-PSResourceRepository`. - -```yaml -Type: System.Uri -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptPublishLocation - -The proxy cmdlet ignores this parameter since it's not supported by `Register-PSResourceRepository`. - -```yaml -Type: System.Uri -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptSourceLocation - -The proxy cmdlet ignores this parameter since it's not supported by `Register-PSResourceRepository`. - -```yaml -Type: System.Uri -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SourceLocation - -Specifies the URI for discovering and installing modules from this repository. A URI can be a NuGet -server feed (most common situation), HTTP, HTTPS, FTP or file location. - -For example, for NuGet-based repositories, the source location is similar to -`https://someNuGetUrl.com/api/v2`. - -The proxy cmdlet maps this parameter to the **Uri** parameter of `Register-PSResourceRepository` - -```yaml -Type: System.Uri -Parameter Sets: NameParameterSet -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -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.Management.Automation.PSCredential - -### System.Uri - -## OUTPUTS - -### System.Object - -## NOTES - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - -## RELATED LINKS - -[Get-PSRepository](Get-PSRepository.md) - -[Set-PSRepository](Set-PSRepository.md) - -[Unregister-PSRepository](Unregister-PSRepository.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Save-Module.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Save-Module.md deleted file mode 100644 index 32395d2..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Save-Module.md +++ /dev/null @@ -1,440 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/save-module?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Save-Module ---- - -# Save-Module - -## SYNOPSIS -Saves a module and its dependencies on the local computer but doesn't install the module. - -## SYNTAX - -### NameAndPathParameterSet (Default) - -``` -Save-Module [-Name] [-MinimumVersion ] [-MaximumVersion ] - [-RequiredVersion ] [-Repository ] [-Path] [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-AllowPrerelease] - [-AcceptLicense] [-WhatIf] [-Confirm] [] -``` - -### NameAndLiteralPathParameterSet - -``` -Save-Module [-Name] [-MinimumVersion ] [-MaximumVersion ] - [-RequiredVersion ] [-Repository ] -LiteralPath [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-AllowPrerelease] - [-AcceptLicense] [-WhatIf] [-Confirm] [] -``` - -### InputObjectAndLiteralPathParameterSet - -``` -Save-Module [-InputObject] -LiteralPath [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-AcceptLicense] [-WhatIf] - [-Confirm] [] -``` - -### InputObjectAndPathParameterSet - -``` -Save-Module [-InputObject] [-Path] [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-AcceptLicense] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION - -The `Save-Module` cmdlet downloads a module and any dependencies from a registered repository. -`Save-Module` downloads and saves the most current version of a module. The files are saved to a -specified path on the local computer. The module isn't installed, but the contents are available for -inspection by an administrator. The saved module can then be copied into the appropriate -`$env:PSModulePath` location of the offline machine. - -This is a proxy cmdlet for the `Save-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Save-PSResource](../Microsoft.PowerShell.PSResourceGet/Save-PSResource.md) - -## EXAMPLES - -### Example 1: Save a module - -In this example, a module and its dependencies are saved to the local computer. - -```powershell -Save-Module -Name PowerShellGet -Path C:\Test\Modules -Repository PSGallery -Get-ChildItem -Path C:\Test\Modules -``` - -```Output - Directory: C:\Test\Modules - -Mode LastWriteTime Length Name ----- ------------- ------ ---- -d----- 7/1/2019 13:31 PackageManagement -d----- 7/1/2019 13:31 PowerShellGet -``` - -`Save-Module` uses the **Name** parameter to specify the module, **PowerShellGet**. The **Path** -parameter specifies where to store the downloaded module. The **Repository** parameter specifies a -registered repository, **PSGallery**. After the download is finished, `Get-ChildItem` displays the -contents of **Path** where the files are stored. - -### Example 2: Save a specific version of a module - -This example shows how to use a parameter such as **MaximumVersion**, or **RequiredVersion** to -specify a module version. - -```powershell -Save-Module -Name PowerShellGet -Path C:\Test\Modules -Repository PSGallery -MaximumVersion 2.1.0 -Get-ChildItem -Path C:\Test\Modules\PowerShellGet\ -``` - -```Output - Directory: C:\Test\Modules\PowerShellGet - -Mode LastWriteTime Length Name ----- ------------- ------ ---- -d----- 7/1/2019 13:40 2.1.0 -``` - -`Save-Module` uses the **Name** parameter to specify the module, **PowerShellGet**. The **Path** -parameter specifies where to store the downloaded module. The **Repository** parameter specifies a -registered repository, **PSGallery**. **MaximumVersion** specifies that version **2.1.0** is -downloaded and saved. After the download is finished, `Get-ChildItem` displays the contents of -**Path** where the files are stored. - -### Example 3: Find and save a specific version of a module - -In this example, a required module version is found in the repository and saved to the local -computer. - -```powershell -Find-Module -Name PowerShellGet -Repository PSGallery -RequiredVersion 1.6.5 | - Save-Module -Path C:\Test\Modules -Get-ChildItem -Path C:\Test\Modules\PowerShellGet -``` - -```Output - Directory: C:\Test\Modules\PowerShellGet - -Mode LastWriteTime Length Name ----- ------------- ------ ---- -d----- 7/1/2019 14:04 1.6.5 -``` - -`Find-Module` uses the **Name** parameter to specify the module, **PowerShellGet**. The -**Repository** parameter specifies a registered repository, **PSGallery**. **RequiredVersion** -specifies version **1.6.5**. - -The object is sent down the pipeline to `Save-Module`. The **Path** parameter specifies where to -store the downloaded module. After the download is finished, `Get-ChildItem` displays the contents -of **Path** where the files are stored. - -## PARAMETERS - -### -AcceptLicense - -The proxy cmdlet ignores this parameter since it's not supported by `Save-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowPrerelease - -Allows you to save a module marked as a prerelease. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Save-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Credential - -Specifies a user account that has rights to save a module. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -The proxy cmdlet ignores this parameter since it's not supported by `Save-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject - -Accepts a **PSRepositoryItemInfo** object. For example, output `Find-Module` to a variable and use -that variable as the **InputObject** argument. - -```yaml -Type: System.Management.Automation.PSObject[] -Parameter Sets: InputObjectAndLiteralPathParameterSet, InputObjectAndPathParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -LiteralPath - -Specifies a path to one or more locations. The value of the **LiteralPath** parameter is used -exactly as entered. No characters are interpreted as wildcards. If the path includes escape -characters, enclose them in single quotation marks. PowerShell does not interpret any characters -enclosed in single quotation marks as escape sequences. - -The proxy cmdlet maps this parameter to the **Path** parameter of `Save-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameAndLiteralPathParameterSet, InputObjectAndLiteralPathParameterSet -Aliases: PSPath - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Save-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Save-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies an array of names of modules to save. - -```yaml -Type: System.String[] -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Path - -Specifies the location on the local computer to store a saved module. Accepts wildcard characters. - -```yaml -Type: System.String -Parameter Sets: NameAndPathParameterSet, InputObjectAndPathParameterSet -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: True -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by `Save-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by `Save-PSResource`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Repository - -Specifies the friendly name of a repository that has been registered by running -`Register-PSRepository`. Use `Get-PSRepository` to display registered repositories. - -```yaml -Type: System.String[] -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Save-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before running the `Save-Module`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if the `Save-Module` runs. The cmdlet isn't run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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.Management.Automation.PSObject[] - -### System.String - -### System.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### System.Object - -## NOTES - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - -## RELATED LINKS diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Save-Script.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Save-Script.md deleted file mode 100644 index 2e8d37f..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Save-Script.md +++ /dev/null @@ -1,392 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/save-script?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Save-Script ---- - -# Save-Script - -## SYNOPSIS -Saves a script. - -## SYNTAX - -### NameAndPathParameterSet (Default) - -``` -Save-Script [-Name] [-MinimumVersion ] [-MaximumVersion ] - [-RequiredVersion ] [-Repository ] [-Path] [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-AllowPrerelease] - [-AcceptLicense] [-WhatIf] [-Confirm] [] -``` - -### NameAndLiteralPathParameterSet - -``` -Save-Script [-Name] [-MinimumVersion ] [-MaximumVersion ] - [-RequiredVersion ] [-Repository ] -LiteralPath [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-AllowPrerelease] - [-AcceptLicense] [-WhatIf] [-Confirm] [] -``` - -### InputObjectAndLiteralPathParameterSet - -``` -Save-Script [-InputObject] -LiteralPath [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-AcceptLicense] [-WhatIf] - [-Confirm] [] -``` - -### InputObjectAndPathParameterSet - -``` -Save-Script [-InputObject] [-Path] [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-AcceptLicense] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION - -The `Save-Script` cmdlet saves the specified script. - -This is a proxy cmdlet for the `Save-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Save-PSResource](../Microsoft.PowerShell.PSResourceGet/Save-PSResource.md). - -## EXAMPLES - -### Example 1: Save a script and validate the script's metadata - -In this example, a script from a repository is saved to the local computer and the script's metadata -is validated. - -```powershell -Save-Script -Name Install-VSCode -Repository PSGallery -Path C:\Test\Scripts -Test-ScriptFileInfo -Path C:\Test\Scripts\Install-VSCode.ps1 -``` - -```Output -Version Name Author Description -------- ---- ------ ----------- -1.3 Install-VSCode Microsoft This script can be used to easily install Visual Studio Code -``` - -`Save-Script` uses the **Name** parameter to specify the script's name. The **Repository** parameter -specifies where to find the script. The script is saved in the location specified by the **Path** -parameter. `Test-ScriptFileInfo` specifies the **Path** and validates the script's metadata. - -## PARAMETERS - -### -AcceptLicense - -The proxy cmdlet ignores this parameter since it's not supported by `Save-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowPrerelease - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Save-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Credential - -Specifies a user account that has permission to save a script. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -The proxy cmdlet ignores this parameter since it's not supported by `Save-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject - -Accepts a **PSRepositoryItemInfo** object. For example, output `Find-Script` to a variable and use -that variable as the **InputObject** argument. - -```yaml -Type: System.Management.Automation.PSObject[] -Parameter Sets: InputObjectAndLiteralPathParameterSet, InputObjectAndPathParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -LiteralPath - -Specifies a path to one or more locations. The value of the **LiteralPath** parameter is used -exactly as entered. No characters are interpreted as wildcards. If the path includes escape -characters, enclose the path within single quotation marks. PowerShell doesn't interpret any -characters enclosed in single quotation marks as escape sequences. - -The proxy cmdlet maps this parameter to the **Path** parameter of `Save-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameAndLiteralPathParameterSet, InputObjectAndLiteralPathParameterSet -Aliases: PSPath - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Save-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Save-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies an array of script names to save. - -```yaml -Type: System.String[] -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Path - -Specifies the location on the local computer to store a saved module. Accepts wildcard characters. - -```yaml -Type: System.String -Parameter Sets: NameAndPathParameterSet, InputObjectAndPathParameterSet -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: True -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by `Save-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by `Save-PSResource`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Repository - -Specifies the friendly name of a repository that has been registered by running -`Register-PSRepository`. Use `Get-PSRepository` to display registered repositories. - -```yaml -Type: System.String[] -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Save-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before running `Save-Script`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if `Save-Script` runs. The cmdlet isn't run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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.Management.Automation.PSObject[] - -### System.String - -### System.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### System.Object - -## NOTES - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - -## RELATED LINKS - -[Find-Script](Find-Script.md) - -[Install-Script](Install-Script.md) - -[Publish-Script](Publish-Script.md) - -[Test-ScriptFileInfo](Test-ScriptFileInfo.md) - -[Uninstall-Script](Uninstall-Script.md) - -[Update-Script](Update-Script.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Set-PSRepository.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Set-PSRepository.md deleted file mode 100644 index 43cfc12..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Set-PSRepository.md +++ /dev/null @@ -1,255 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/set-psrepository?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Set-PSRepository ---- -# Set-PSRepository - -## SYNOPSIS -Sets values for a registered repository. - -## SYNTAX - -``` -Set-PSRepository [-Name] [[-SourceLocation] ] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [-Credential ] - [-InstallationPolicy ] [-Proxy ] [-ProxyCredential ] - [-PackageManagementProvider ] [] -``` - -## DESCRIPTION - -The `Set-PSRepository` cmdlet sets values for a registered module repository. The settings are -persistent for the current user and apply to all versions of PowerShell installed for that user. - -This is a proxy cmdlet for the `Set-PSResourceRepository` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Set-PSResourceRepository](../Microsoft.PowerShell.PSResourceGet/Set-PSResourceRepository.md). - -## EXAMPLES - -### Example 1: Set the installation policy for a repository - -```powershell -Set-PSRepository -Name "myInternalSource" -InstallationPolicy Trusted -``` - -This command sets the installation policy for the **myInternalSource** repository to **Trusted**, so -that you are not prompted before installing modules from that source. - -### Example 2: Set the source and publish locations for a repository - -```powershell -Set-PSRepository -Name "myInternalSource" -SourceLocation 'https://someNuGetUrl.com/api/v2' -PublishLocation 'https://someNuGetUrl.com/api/v2/packages' -``` - -This command sets the source location and publish location for **myInternalSource** to the specified -URIs. - -## PARAMETERS - -### -Credential - -The proxy cmdlet ignores this parameter since it's not supported by `Set-PSResourceRepository`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -InstallationPolicy - -Specifies the installation policy. Valid values are: **Trusted**, **Untrusted**. - -The proxy cmdlet transforms the value of this parameter to the **Trusted** parameter of -`Set-PSResourceRepository`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: -Accepted values: Trusted, Untrusted - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies the name of the repository. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PackageManagementProvider - -The proxy cmdlet ignores this parameter since it's not supported by `Set-PSResourceRepository`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by `Set-PSResourceRepository`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by `Set-PSResourceRepository`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PublishLocation - -The proxy cmdlet ignores this parameter since it's not supported by `Set-PSResourceRepository`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptPublishLocation - -The proxy cmdlet ignores this parameter since it's not supported by `Set-PSResourceRepository`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptSourceLocation - -The proxy cmdlet ignores this parameter since it's not supported by `Set-PSResourceRepository`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SourceLocation - -Specifies the URI for discovering and installing modules from this repository. For example, for -NuGet-based repositories, the source location is similar to `https://someNuGetUrl.com/api/v2`. - -The proxy cmdlet maps this parameter to the **Uri** parameter of `Set-PSResourceRepository`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -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.Management.Automation.PSCredential - -### System.Uri - -## OUTPUTS - -### System.Object - -## NOTES - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - -## RELATED LINKS - -[Get-PSRepository](Get-PSRepository.md) - -[Register-PSRepository](Register-PSRepository.md) - -[Unregister-PSRepository](Unregister-PSRepository.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Test-ScriptFileInfo.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Test-ScriptFileInfo.md deleted file mode 100644 index 575ba5e..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Test-ScriptFileInfo.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/test-scriptfileinfo?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Test-ScriptFileInfo ---- -# Test-ScriptFileInfo - -## SYNOPSIS -Validates a comment block for a script. - -## SYNTAX - -### PathParameterSet (Default) - -``` -Test-ScriptFileInfo [-Path] [] -``` - -### LiteralPathParameterSet - -``` -Test-ScriptFileInfo -LiteralPath [] -``` - -## DESCRIPTION - -The `Test-ScriptFileInfo` cmdlet validates the comment block at the beginning of a script that will -be published with the Publish-Script cmdlet. If the comment block has an error, this cmdlet returns -information about where the error is located or how to correct it. - -This is a proxy cmdlet for the `Test-PSScriptFileInfo` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Test-PSScriptFileInfo](../Microsoft.PowerShell.PSResourceGet/Test-PSScriptFileInfo.md). - -## EXAMPLES - -### Example 1: Test a script file - -```powershell -Test-ScriptFileInfo -Path "C:\temp\temp_scripts\New-ScriptFile.ps1" -``` - -This command tests the New-ScriptFile.ps1 script file and displays the results. -The script file includes valid metadata. - -### Example 2: Test a script file that has values for all metadata properties - -```powershell -Test-ScriptFileInfo -Path "D:\code\Test-Runbook.ps1" | Format-List * -``` - -```Output -Name : Test-Runbook -Path : D:\code\Test-Runbook.ps1 -ScriptBase : D:\code -ReleaseNotes : {contoso script now supports following features, Feature 1, Feature 2, Feature 3...} -Version : 1.0 -Guid : eb246b19-17da-4392-8c89-7c280f69ad0e -Author : pattif -CompanyName : Microsoft Corporation -Copyright : 2015 Microsoft Corporation. All rights reserved. -Tags : {Tag1, Tag2, Tag3} -LicenseUri : https://contoso.com/License -ProjectUri : https://contoso.com/ -IconUri : https://contoso.com/MyScriptIcon -ExternalModuleDependencies : ExternalModule1 -RequiredScripts : {Start-WFContosoServer, Stop-ContosoServerScript} -ExternalScriptDependencies : Stop-ContosoServerScript -Description : Contoso Script example -RequiredModules : {RequiredModule1, @{ ModuleName = 'RequiredModule2'; ModuleVersion = '1.0' }, @{ ModuleName = 'RequiredModule3'; RequiredVersion = '2.0' }, ExternalModule1} -ExportedCommands : {Test-WebUri, ValidateAndAdd-PSScriptInfoEntry, Get-PSScriptInfo, My-Workflow...} -ExportedFunctions : {Test-WebUri, ValidateAndAdd-PSScriptInfoEntry, Get-PSScriptInfo, My-AdvPSCmdlet} -ExportedWorkflows : My-Workflow -``` - -This command tests the script file Test-Runbook.ps1 and uses the pipeline operator to pass the results to the Format-List cmdlet to format the results. - -### Example 3: Test a script file that has no metadata - -```powershell -Test-ScriptFileInfo -Path "D:\code\Hello-World.ps1" -``` - -```Output -Test-ScriptFileInfo : Script 'D:\code\Hello-World.ps1' is missing required metadata properties. Verify that the script file has Version, Description -and Author properties. You can use the Update-ScriptFileInfo or New-ScriptFileInfo cmdlet to add or update the PSScriptInfo to the script file. -At line:1 char:1 -+ Test-ScriptFileInfo D:\code\Hello-World.ps1 -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ CategoryInfo : InvalidArgument: (D:\code\Hello-World.ps1:String) [Test-ScriptFileInfo], ArgumentException - -+ FullyQualifiedErrorId : MissingRequiredPSScriptInfoProperties,Test-ScriptFile -``` - -This command tests the script file Hello-World.ps1, which has no metadata associated with it. - -## PARAMETERS - -### -LiteralPath - -Specifies a path to one or more locations. Unlike the **Path** parameter, the value of the -**LiteralPath** parameter is used exactly as it is entered. No characters are interpreted as -wildcards. If the path includes escape characters, enclose them in single quotation marks. Single -quotation marks tell PowerShell not to interpret any characters as escape sequences. - -The parameter is mapped to the **Path** parameter of `Test-PSScriptFileInfo`. - -```yaml -Type: System.String -Parameter Sets: LiteralPathParameterSet -Aliases: PSPath - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Path - -Specifies a path to one or more locations. Wildcards are permitted. The default location is the -current directory (`.`). - -```yaml -Type: System.String -Parameter Sets: PathParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: True -``` - -### 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 - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS - -[New-ScriptFileInfo](New-ScriptFileInfo.md) - -[Publish-Script](Publish-Script.md) - -[Update-ScriptFileInfo](Update-ScriptFileInfo.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Uninstall-Module.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Uninstall-Module.md deleted file mode 100644 index 278eb28..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Uninstall-Module.md +++ /dev/null @@ -1,270 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/uninstall-module?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Uninstall-Module ---- - -# Uninstall-Module - -## SYNOPSIS -Uninstalls a module. - -## SYNTAX - -### NameParameterSet (Default) - -``` -Uninstall-Module [-Name] [-MinimumVersion ] [-RequiredVersion ] - [-MaximumVersion ] [-AllVersions] [-Force] [-AllowPrerelease] [-WhatIf] [-Confirm] - [] -``` - -### InputObject - -``` -Uninstall-Module [-InputObject] [-Force] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION - -The `Uninstall-Module` cmdlet uninstalls a specified module from the local computer. You can't -uninstall a module if other modules depend on it or the module wasn't installed with the -`Install-Module` cmdlet. - -This is a proxy cmdlet for the `Uninstall-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Uninstall-PSResource](../Microsoft.PowerShell.PSResourceGet/Uninstall-PSResource.md). - -## EXAMPLES - -### Example 1: Uninstall a module - -This example uninstalls a module. - -```powershell -Uninstall-Module -Name SpeculationControl -``` - -`Uninstall-Module` uses the **Name** parameter to specify the module to uninstall from the local -computer. - -### Example 2: Use the pipeline to uninstall a module - -In this example, the pipeline is used to uninstall a module. - -```powershell -Get-InstalledModule -Name SpeculationControl | Uninstall-Module -``` - -`Get-InstalledModule` uses the **Name** parameter to specify the module. The object is sent down the -pipeline to `Uninstall-Module` and is uninstalled. - -## PARAMETERS - -### -AllowPrerelease - -Allows you to uninstall a module marked as a prerelease. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Uninstall-PSResource` - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllVersions - -Specifies that you want to include all available versions of a module. You can't use the -**AllVersions** parameter with the **MinimumVersion**, **MaximumVersion**, or **RequiredVersion** -parameters. - -The proxy cmdlet transforms this parameter to `-Version *` before calling `Uninstall-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Force - -The proxy cmdlet ignores this parameter since it's not supported by `Uninstall-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject - -Accepts a **PSRepositoryItemInfo** object. For example, output `Get-InstalledModule` to a variable -and use that variable as the **InputObject** argument. - -```yaml -Type: System.Management.Automation.PSObject[] -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Uninstall-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Uninstall-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies an array of module names to uninstall. - -```yaml -Type: System.String[] -Parameter Sets: NameParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Uninstall-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before running the `Uninstall-Module`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if `Uninstall-Module` runs. The cmdlet isn't run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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.Management.Automation.PSObject[] - -### System.String - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS - -[Find-Module](Find-Module.md) - -[Get-InstalledModule](Get-InstalledModule.md) - -[Publish-Module](Publish-Module.md) - -[Save-Module](Save-Module.md) - -[Update-Module](Update-Module.md) - diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Uninstall-Script.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Uninstall-Script.md deleted file mode 100644 index 42d6843..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Uninstall-Script.md +++ /dev/null @@ -1,245 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/uninstall-script?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Uninstall-Script ---- - -# Uninstall-Script - -## SYNOPSIS -Uninstalls a script. - -## SYNTAX - -### NameParameterSet (Default) - -``` -Uninstall-Script [-Name] [-MinimumVersion ] [-RequiredVersion ] - [-MaximumVersion ] [-Force] [-AllowPrerelease] [-WhatIf] [-Confirm] [] -``` - -### InputObject - -``` -Uninstall-Script [-InputObject] [-Force] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION - -The `Uninstall-Script` cmdlet uninstalls a specified script from the local computer. - -This is a proxy cmdlet for the `Uninstall-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Uninstall-PSResource](../Microsoft.PowerShell.PSResourceGet/Uninstall-PSResource.md). - -## EXAMPLES - -### Example 1: Uninstall a script - -This example uninstalls a script. - -```powershell -Uninstall-Script -Name UpdateManagement-Template -``` - -`Uninstall-Script` uses the **Name** parameter to specify the script to uninstall from the local -computer. - -### Example 2: Use the pipeline to uninstall a script - -In this example, the pipeline is used to uninstall a script. - -```powershell -Get-InstalledScript -Name UpdateManagement-Template | Uninstall-Script -``` - -`Get-InstalledScript` uses the **Name** parameter to specify the script. The object is sent down the -pipeline to `Uninstall-Script` and the script is uninstalled. - -## PARAMETERS - -### -AllowPrerelease - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Uninstall-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Force - -The proxy cmdlet ignores this parameter since it's not supported by `Uninstall-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject - -Accepts a **PSRepositoryItemInfo** object. For example, output `Get-InstalledScript` to a variable -and use that variable as the **InputObject** argument. - -```yaml -Type: System.Management.Automation.PSObject[] -Parameter Sets: InputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Uninstall-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Uninstall-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies an array of script names to uninstall. - -```yaml -Type: System.String[] -Parameter Sets: NameParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Uninstall-PSResource`. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before running `Uninstall-Script`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if `Uninstall-Script` runs. The cmdlet isn't run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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.Management.Automation.PSObject[] - -### System.String - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS - -[Find-Script](Find-Script.md) - -[Install-Script](Install-Script.md) - -[Publish-Script](Publish-Script.md) - -[Save-Script](Save-Script.md) - -[Update-Script](Update-Script.md) - diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Unregister-PSRepository.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Unregister-PSRepository.md deleted file mode 100644 index c3d57ee..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Unregister-PSRepository.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/unregister-psrepository?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Unregister-PSRepository ---- -# Unregister-PSRepository - -## SYNOPSIS -Unregisters a repository. - -## SYNTAX - -``` -Unregister-PSRepository [-Name] [] -``` - -## DESCRIPTION - -The `Unregister-PSRepository` cmdlet unregisters a repository for the current user. - -This is a proxy cmdlet for the `Unregister-PSResourceRepository` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Unregister-PSResourceRepository](../Microsoft.PowerShell.PSResourceGet/Unregister-PSResourceRepository.md). - -## EXAMPLES - -### Example 1: Unregister a repository - -This example unregisters the repository named myNuGetSource. - -```powershell -Unregister-PSRepository -Name "myNuGetSource" -``` - -### Example 2: Unregister all repositories - -This example uses `Get-PSRepository` to get all registered repositories, and uses the pipeline -operator to pass them to `Unregister-PSRepository` to unregister them. - -```powershell -Get-PSRepository | Unregister-PSRepository -``` - -## PARAMETERS - -### -Name - -Specifies an array of names of the repositories to remove. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -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[] - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS - -[Get-PSRepository](Get-PSRepository.md) - -[Register-PSRepository](Register-PSRepository.md) - -[Set-PSRepository](Set-PSRepository.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Update-Module.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Update-Module.md deleted file mode 100644 index 840bc65..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Update-Module.md +++ /dev/null @@ -1,401 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/update-module?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Update-Module ---- - -# Update-Module - -## SYNOPSIS -Downloads and installs the newest version of specified modules from an online gallery to the local -computer. - -## SYNTAX - -### All - -``` -Update-Module [[-Name] ] [-RequiredVersion ] [-MaximumVersion ] - [-Credential ] [-Scope ] [-Proxy ] [-ProxyCredential ] - [-Force] [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION - -The `Update-Module` cmdlet installs a module's newest version from an online gallery. You're -prompted to confirm the update before it's installed. Updates are installed only for modules that -were installed on the local computer with `Install-Module`. `Update-Module` searches -`$env:PSModulePath` for installed modules. - -This is a proxy cmdlet for the `Update-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Update-PSResource](../Microsoft.PowerShell.PSResourceGet/Update-PSResource.md). - -## EXAMPLES - -### Example 1: Update all modules - -This example updates all installed modules to the newest version in an online gallery. - -```powershell -Update-Module -``` - -### Example 2: Update a module by name - -This example updates a specific module to the newest version in an online gallery. - -```powershell -Update-Module -Name SpeculationControl -``` - -`Update-Module` uses the **Name** parameter to update a specific module, **SpeculationControl**. - -### Example 3: View what-if Update-Module runs - -This example does a what-if scenario to show what happens if `Update-Module` is run. The command -isn't run. - -```powershell -Update-Module -WhatIf -``` - -```Output -What if: Performing the operation "Update-Module" on target "Version '2.8.0' of module - 'Carbon', updating to version '2.8.1'". -What if: Performing the operation "Update-Module" on target "Version '1.0.10' of module - 'SpeculationControl', updating to version '1.0.14'". -``` - -`Update-Module` uses the **WhatIf** parameter display what would happen if `Update-Module` were run. - -### Example 4: Update a module to a specified version - -In this example, a module is updated to a specific version. The version must exist in the online -gallery or an error is displayed. - -```powershell -Update-Module -Name SpeculationControl -RequiredVersion 1.0.14 -``` - -`Update-Module` uses the **Name** parameter to specify the module, **SpeculationControl**. The -**RequiredVersion** parameter specifies the version, **1.0.14**. - -### Example 5: Update a module without confirmation - -This example doesn't request confirmation to update the module to the newest version from an online -gallery. If the module is already installed, the **Force** parameter reinstalls the module. - -```powershell -Update-Module -Name SpeculationControl -Force -``` - -`Update-Module` uses the **Name** parameter to specify the module, **SpeculationControl**. The -**Force** parameter updates the module without requesting user confirmation. - -## PARAMETERS - -### -AcceptLicense - -Automatically accept the license agreement during installation if the package requires it. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowPrerelease - -Allows you to update a module with the newer module marked as a prerelease. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Update-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Credential - -Specifies a user account that has permission to update a module. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -Forces an update of each specified module without a prompt to request confirmation. If the module is -already installed, **Force** reinstalls the module. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Update-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies the names of one or more modules to update. `Update-Module` searches `$env:PSModulePath` -for the modules to update. If no matches are found in `$env:PSModulePath` for the specified module -name, an error occurs. - -Wildcards are accepted in module names. If you add wildcard characters to the specified name and no -matches are found, no error occurs. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: True -``` - -### -PassThru - -Returns an object representing the item with which you are working. By default, this cmdlet does not -generate any output. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by `Update-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by `Update-PSResource`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Update-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Scope - -Specifies the installation scope of the module. The acceptable values for this parameter are -**AllUsers** and **CurrentUser**. If **Scope** isn't specified, the update is installed in the -**CurrentUser** scope. - -The **AllUsers** scope requires elevated permissions and installs modules in a location that is -accessible to all users of the computer: - -`$env:ProgramFiles\PowerShell\Modules` - -The **CurrentUser** doesn't require elevated permissions and installs modules in a location that is -accessible only to the current user of the computer: - -`$HOME\Documents\PowerShell\Modules` - -When no **Scope** is defined, the default is set based on the PowerShellGet version. - -- In PowerShellGet versions 2.0.0 and above, the default is **CurrentUser**, which does not require - elevation for install. -- In PowerShellGet 1.x versions, the default is **AllUsers**, which requires elevation for install. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: -Accepted values: CurrentUser, AllUsers - -Required: False -Position: Named -Default value: CurrentUser -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before running `Update-Module`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if `Update-Module` runs. The cmdlet isn't run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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.String - -### System.Management.Automation.PSCredential - -### System.Uri - -## OUTPUTS - -### System.Object - -## NOTES - -PowerShell includes the following aliases for `Update-Module`: - -- All platforms: - - `upmo` - -For PowerShell version 6.0 and above, the default installation scope is always **CurrentUser**. -Module updates for **CurrentUser**, `$HOME\Documents\PowerShell\Modules`, don't need elevated -permissions. Module updates for **AllUsers**, `$env:ProgramFiles\PowerShell\Modules`, need elevated -permissions. - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - -`Update-Module` runs on PowerShell 3.0 or later releases of PowerShell, on Windows 7 or Windows 2008 -R2 and later releases of Windows. - -If the module that you specify with the **Name** parameter wasn't installed using `Install-Module`, -an error occurs. - -You can only run `Update-Module` on modules that you installed from the online gallery by running -`Install-Module`. - -If `Update-Module` attempts to update binaries that are in use, `Update-Module` returns an error -that identifies the problem processes. The user is informed to retry `Update-Module` after the -processes are stopped. - -## RELATED LINKS - -[Find-Module](Find-Module.md) - -[Get-InstalledModule](Get-InstalledModule.md) - -[Install-Module](Install-Module.md) - -[Publish-Module](Publish-Module.md) - -[Uninstall-Module](Uninstall-Module.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Update-ModuleManifest.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Update-ModuleManifest.md deleted file mode 100644 index 0b0f4a9..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Update-ModuleManifest.md +++ /dev/null @@ -1,887 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/update-modulemanifest?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Update-ModuleManifest ---- - -# Update-ModuleManifest - -## SYNOPSIS -Updates a module manifest file. - -## SYNTAX - -### All - -``` -Update-ModuleManifest [-Path] [-NestedModules ] [-Guid ] - [-Author ] [-CompanyName ] [-Copyright ] [-RootModule ] - [-ModuleVersion ] [-Description ] - [-ProcessorArchitecture ] [-CompatiblePSEditions ] - [-PowerShellVersion ] [-ClrVersion ] - [-DotNetFrameworkVersion ] [-PowerShellHostName ] - [-PowerShellHostVersion ] [-RequiredModules ] - [-TypesToProcess ] [-FormatsToProcess ] - [-ScriptsToProcess ] [-RequiredAssemblies ] [-FileList ] - [-ModuleList ] [-FunctionsToExport ] [-AliasesToExport ] - [-VariablesToExport ] [-CmdletsToExport ] - [-DscResourcesToExport ] [-PrivateData ] [-Tags ] - [-ProjectUri ] [-LicenseUri ] [-IconUri ] [-ReleaseNotes ] - [-Prerelease ] [-HelpInfoUri ] [-PassThru] [-DefaultCommandPrefix ] - [-ExternalModuleDependencies ] [-PackageManagementProviders ] - [-RequireLicenseAcceptance] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION - -The `Update-ModuleManifest` cmdlet updates a module manifest (`.psd1`) file. - -This is a proxy cmdlet for the `Update-PSModuleManifest` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Update-PSModuleManifest](../Microsoft.PowerShell.PSResourceGet/Update-PSModuleManifest.md). - -## EXAMPLES - -### Example 1: Update a module manifest - -This example updates an existing module manifest file. Splatting is used to pass parameter values -to `Update-ModuleManifest`. For more information, see -[about_Splatting](/powershell/module/Microsoft.PowerShell.Core/About/about_Splatting). - -```powershell -$Params = @{ - Path = "C:\Test\TestManifest.psd1" - Author = "TestUser1" - CompanyName = "Contoso Corporation" - Copyright = "(c) 2019 Contoso Corporation. All rights reserved." -} - -Update-ModuleManifest @Params -``` - -`$Params` is a splat that stores the parameter values for **Path**, **Author**, **CompanyName**, and -**Copyright**. `Update-ModuleManifest` gets the parameter values from `@Params` and updates the -module manifest, **TestManifest.psd1**. - -## PARAMETERS - -### -AliasesToExport - -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. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: True -``` - -### -Author - -Specifies the module author. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClrVersion - -Specifies the minimum version of the Common Language Runtime (CLR) of the Microsoft .NET Framework -that the module requires. - -> [!NOTE] -> This setting is valid for the PowerShell Desktop edition only, such as Windows PowerShell 5.1, -> and only applies to .NET Framework versions lower than 4.5. This requirement has no effect for -> newer versions of PowerShell or the .NET Framework. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CmdletsToExport - -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. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: True -``` - -### -CompanyName - -Specifies the company or vendor who created the module. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CompatiblePSEditions - -Specifies the compatible **PSEditions** of the module. For information about **PSEdition**, see -[Modules with compatible PowerShell Editions](/powershell/scripting/gallery/concepts/module-psedition-support). - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: -Accepted values: Desktop, Core - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Copyright - -Specifies a copyright statement for the module. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DefaultCommandPrefix - -Specifies the default command prefix. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description - -Specifies a description of the module. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DotNetFrameworkVersion - -Specifies the minimum version of the Microsoft .NET Framework that the module requires. - -> [!NOTE] -> This setting is valid for the PowerShell Desktop edition only, such as Windows PowerShell 5.1, -> and only applies to .NET Framework versions lower than 4.5. This requirement has no effect for -> newer versions of PowerShell or the .NET Framework. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DscResourcesToExport - -Specifies the Desired State Configuration (DSC) resources that the module exports. Wildcards are -permitted. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExternalModuleDependencies - -Specifies an array of external module dependencies. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FileList - -Specifies all items that are included in the module. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FormatsToProcess - -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. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FunctionsToExport - -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. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: True -``` - -### -Guid - -Specifies a unique identifier for the module. The GUID can be used to distinguish among modules with -the same name. - -```yaml -Type: System.Guid -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HelpInfoUri - -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 -[about_Updatable_Help](/powershell/module/Microsoft.PowerShell.Core/About/about_Updatable_Help). For information -about the **HelpInfo XML** file, see -[Supporting Updatable Help](/powershell/scripting/developer/module/supporting-updatable-help). - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IconUri - -Specifies the URL of an icon for the module. The specified icon is displayed on the gallery web page -for the module. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LicenseUri - -Specifies the URL of licensing terms for the module. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -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. - -```yaml -Type: System.Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleVersion - -Specifies the version of the module. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NestedModules - -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. - -```yaml -Type: System.Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PackageManagementProviders - -Specifies an array of package management providers. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru - -Returns an object representing the item with which you're working. By default, -`Update-ModuleManifest` doesn't generate any output. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -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`. - -If you specify the path to an existing file, `Update-ModuleManifest` replaces the file without -warning unless the file has the read-only attribute. - -The manifest should be located in the module's directory, and the manifest file name should be the -same as the module directory name, but with a `.psd1` extension. - -You can't use variables, such as `$PSHOME` or `$HOME`, in response to a prompt for a **Path** -parameter value. To use a variable, include the **Path** parameter in the command. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PowerShellHostName - -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`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PowerShellHostVersion - -Specifies the minimum version of the PowerShell host program that works with the module. Enter a -version number, such as 1.1. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PowerShellVersion - -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. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Prerelease - -Indicates the module is prerelease. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateData - -Specifies data that is passed to the module when it's imported. - -```yaml -Type: System.Collections.Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProcessorArchitecture - -Specifies the processor architecture that the module requires. - -The acceptable values for this parameter are: - -- Amd64 -- Arm -- IA64 -- MSIL -- None (unknown or unspecified) -- X86 - -```yaml -Type: System.Reflection.ProcessorArchitecture -Parameter Sets: (All) -Aliases: -Accepted values: None, MSIL, X86, IA64, Amd64, Arm - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProjectUri - -Specifies the URL of a web page about this project. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReleaseNotes - -Specifies a string array that contains release notes or comments that you want available for this -version of the script. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredAssemblies - -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. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredModules - -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. - -```yaml -Type: System.Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequireLicenseAcceptance - -Specifies that a license acceptance is required for the module. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RootModule - -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. - -In PowerShell 2.0, this key was called **ModuleToProcess**. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptsToProcess - -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. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -Specifies an array of tags. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TypesToProcess - -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. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -VariablesToExport - -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. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: True -``` - -### -Confirm - -Prompts you for confirmation before running `Update-ModuleManifest`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if `Update-ModuleManifest` runs. The cmdlet isn't run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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 - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Update-Script.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Update-Script.md deleted file mode 100644 index 0203a6f..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Update-Script.md +++ /dev/null @@ -1,293 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/update-script?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Update-Script ---- - -# Update-Script - -## SYNOPSIS -Updates a script. - -## SYNTAX - -### All - -``` -Update-Script [[-Name] ] [-RequiredVersion ] [-MaximumVersion ] - [-Proxy ] [-ProxyCredential ] [-Credential ] [-Force] - [-AllowPrerelease] [-AcceptLicense] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION - -The `Update-Script` cmdlet updates a script that is installed on the local computer. The updated -script is downloaded from the same repository as the installed version. - -This is a proxy cmdlet for the `Update-PSResource` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Update-PSResource](../Microsoft.PowerShell.PSResourceGet/Update-PSResource.md). - -## EXAMPLES - -### Example 1: Update the specified script - -This example updates an installed script and displays the updated version. - -```powershell -Update-Script -Name UpdateManagement-Template -RequiredVersion 1.1 -Get-InstalledScript -Name UpdateManagement-Template -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -1.1 UpdateManagement-Template PSGallery This is a template script for Update Management... -``` - -`Update-Script` uses the **Name** parameter to specify the script to update. The **RequiredVersion** -parameter specifies the script version. `Get-InstalledScript` displays the updated version of the -script. - -## PARAMETERS - -### -AcceptLicense - -Automatically accept the license agreement during installation if the package requires it. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowPrerelease - -Allows you to update a script with the newer script marked as a prerelease. - -The proxy cmdlet maps this parameter to the **Prerelease** parameter of `Update-PSResource`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Credential - -Specifies a user account that has permission to update a script. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -Forces `Update-Script` to run without asking for user confirmation. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Update-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name - -Specifies one script name or an array of script names to update. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PassThru - -When using the **PassThru** parameter, `Update-Script` outputs a **PSRepositoryItemInfo** object -for the script. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -The proxy cmdlet ignores this parameter since it's not supported by `Update-PSResource`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProxyCredential - -The proxy cmdlet ignores this parameter since it's not supported by `Update-PSResource`. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequiredVersion - -The proxy cmdlet uses the value of this parameter to create a NuGet version search string for use -with the **Version** parameter of `Update-PSResource`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before running `Update-Script`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -Shows what would happen if `Update-Script` runs. The cmdlet isn't run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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.String - -### System.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### System.Object - -## NOTES - -The PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. You -must use TLS 1.2 or higher. Use the following command to ensure you are using TLS 1.2: - -`[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12` - -## RELATED LINKS - -[Find-Script](Find-Script.md) - -[Install-Script](Install-Script.md) - -[Publish-Script](Publish-Script.md) - -[Save-Script](Save-Script.md) - -[Uninstall-Script](Uninstall-Script.md) diff --git a/powershell-gallery/powershellget-3.x/PowerShellGet/Update-ScriptFileInfo.md b/powershell-gallery/powershellget-3.x/PowerShellGet/Update-ScriptFileInfo.md deleted file mode 100644 index 4b0fbe6..0000000 --- a/powershell-gallery/powershellget-3.x/PowerShellGet/Update-ScriptFileInfo.md +++ /dev/null @@ -1,502 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.custom: 3.0.22-beta22 -ms.date: 09/19/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/update-scriptfileinfo?view=powershellget-2.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Update-ScriptFileInfo ---- - -# Update-ScriptFileInfo - -## SYNOPSIS -Updates information for a script. - -## SYNTAX - -### PathParameterSet (Default) - -``` -Update-ScriptFileInfo [-Path] [-Version ] [-Author ] [-Guid ] - [-Description ] [-CompanyName ] [-Copyright ] [-RequiredModules ] - [-ExternalModuleDependencies ] [-RequiredScripts ] - [-ExternalScriptDependencies ] [-Tags ] [-ProjectUri ] [-LicenseUri ] - [-IconUri ] [-ReleaseNotes ] [-PrivateData ] [-PassThru] [-Force] [-WhatIf] - [-Confirm] [] -``` - -### LiteralPathParameterSet - -``` -Update-ScriptFileInfo [-LiteralPath] [-Version ] [-Author ] [-Guid ] - [-Description ] [-CompanyName ] [-Copyright ] [-RequiredModules ] - [-ExternalModuleDependencies ] [-RequiredScripts ] - [-ExternalScriptDependencies ] [-Tags ] [-ProjectUri ] [-LicenseUri ] - [-IconUri ] [-ReleaseNotes ] [-PrivateData ] [-PassThru] [-Force] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION - -The `Update-ScriptFileInfo` cmdlet updates a script's property values. For example, the values for -version, author, or description. - -This is a proxy cmdlet for the `Update-PSScriptFileInfo` cmdlet in the -**Microsoft.PowerShell.PSResourceGet**. For more information, see -[Update-PSScriptFileInfo](../Microsoft.PowerShell.PSResourceGet/Update-PSScriptFileInfo.md). - -## EXAMPLES - -### Example 1: Update the version of a script file - -In this example, an existing script file is updated with new property values. - -Splatting is used to pass parameters to the `Update-ScriptFileInfo` cmdlet. For more information, -see [about_Splatting](/powershell/module/Microsoft.PowerShell.Core/About/about_splatting). - -```powershell -$Parms = @{ - Path = "C:\Test\Temp-Scriptfile.ps1" - Version = "2.0" - Author = "bob@contoso.com" - CompanyName = "Contoso" - Description = "This is the updated description" - } -Update-ScriptFileInfo @Parms -PassThru -``` - -```Output -<#PSScriptInfo - -.VERSION 2.0 - -.GUID 4609f00c-e850-4d3f-9c69-3741e56e4133 - -.AUTHOR bob@contoso.com - -.COMPANYNAME Contoso - -.COPYRIGHT - -.TAGS - -.LICENSEURI - -.PROJECTURI - -.ICONURI - -.EXTERNALMODULEDEPENDENCIES - -.REQUIREDSCRIPTS - -.EXTERNALSCRIPTDEPENDENCIES - -.RELEASENOTES - -.PRIVATEDATA - -#> - -<# - -.DESCRIPTION -This is the updated description - -#> -Param() -``` - -`$Parms` stores the parameter values for **Path**, **Version**, **Author**, **CompanyName**, and -**Description**. `Update-ScriptFileInfo` gets the parameter values from `@Parms` and updates the -script. The **PassThru** parameter displays the script's contents in the PowerShell console. - -## PARAMETERS - -### -Author - -Specifies the script author. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CompanyName - -Specifies the company or vendor who created the script. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Copyright - -Specifies a copyright statement for the script. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description - -Specifies a description for the script. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExternalModuleDependencies - -Specifies an array of external module dependencies. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExternalScriptDependencies - -Specifies an array of external script dependencies. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Force - -The proxy cmdlet ignores this parameter since it's not supported by `Update-PSScriptFileInfo`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Guid - -Specifies a unique ID for a script. - -```yaml -Type: System.Guid -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IconUri - -Specifies the URL of an icon for the script. The specified icon is displayed on the gallery web page -for the script. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LicenseUri - -Specifies the URL of licensing terms. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LiteralPath - -Specifies a path to one or more locations. The **LiteralPath** parameter's value is used exactly as -it's entered. No characters are interpreted as wildcards. If the path includes escape characters, -enclose them in single quotation marks. Single quotation marks tell PowerShell not to interpret any -characters as escape sequences. - -The proxy cmdlet maps this parameter to the **Path** parameter of `Update-PSScriptFileInfo`. - -```yaml -Type: System.String -Parameter Sets: LiteralPathParameterSet -Aliases: PSPath - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PassThru - -The proxy cmdlet ignores this parameter since it's not supported by `Update-PSScriptFileInfo`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Path - -Specifies the script file's location. Wildcards are permitted. - -```yaml -Type: System.String -Parameter Sets: PathParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: True -``` - -### -PrivateData - -Specifies the private data for the script. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProjectUri - -Specifies the URL of a web page about this project. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReleaseNotes - -Specifies a string array that contains release notes or comments that you want available for this -version of the script. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredModules - -Specifies modules that must be in the global session state. If the required modules aren't in the -global session state, PowerShell imports them. - -```yaml -Type: System.Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredScripts - -Specifies an array of required scripts. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -Specifies an array of tags. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Version - -Specifies the script's version. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm - -The proxy cmdlet ignores this parameter since it's not supported by `Update-PSScriptFileInfo`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf - -The proxy cmdlet ignores this parameter since it's not supported by `Update-PSScriptFileInfo`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -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 - -## OUTPUTS - -### System.Object - -## NOTES - -Use the `Test-ScriptFileInfo` cmdlet to validate a script's metadata. Scripts must include values -for **Version**, **GUID**, **Description**, and **Author**. - -## RELATED LINKS - -[New-ScriptFileInfo](New-ScriptFileInfo.md) - -[Test-ScriptFileInfo](Test-ScriptFileInfo.md)