diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index a64d22b..5e3861f 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -1,9 +1,14 @@ { "redirections": [ { - "redirect_document_id": true, - "redirect_url": "/powershell/gallery/powershellget/update-powershell-51", + "redirect_document_id": false, + "redirect_url": "/powershell/gallery/powershellget/install-powershellget", "source_path": "powershell-gallery/docs-conceptual/powershellget/install-on-older-systems.md" + }, + { + "redirect_document_id": false, + "redirect_url": "/powershell/gallery/powershellget/install-powershellget", + "source_path": "powershell-gallery/docs-conceptual/powershellget/update-powershell-51.md" } ] } diff --git a/powershell-gallery/docs-conceptual/how-to/getting-support/bootstrapping-nuget.md b/powershell-gallery/docs-conceptual/how-to/getting-support/bootstrapping-nuget.md index 03dd725..4854150 100644 --- a/powershell-gallery/docs-conceptual/how-to/getting-support/bootstrapping-nuget.md +++ b/powershell-gallery/docs-conceptual/how-to/getting-support/bootstrapping-nuget.md @@ -1,6 +1,7 @@ --- -description: This article explains how to install the required NuGet components for Windows PowerShell 5.1. -ms.date: 01/27/2025 +description: >- + This article explains how to manually install the required NuGet components for Windows PowerShell 5.1. +ms.date: 01/26/2026 title: Bootstrapping NuGet --- # Bootstrap the NuGet components for Windows PowerShell 5.1 @@ -10,28 +11,18 @@ components to interact with the PowerShell Gallery. PowerShellGet includes logic components as long as you can connect to the PowerShell Gallery. If the machine isn't connected to the internet, you must copy required files from a trusted source to the disconnected machine. -The required NuGet components are included in PowerShellGet v2+ and PackageManagement v1.1+. Newer -versions of these modules are available from the PowerShell Gallery and included in PowerShell 6 and -higher. These instructions are for Windows PowerShell 5.1. +The updated NuGet provider is required by the commands to work with the PowerShell Gallery. The +`Publish-*` commands use `nuget.exe` to publish resources. -> [!IMPORTANT] -> After bootstrapping the NuGet components, you must install latest versions of the PowerShellGet -> and PackageManagement modules to be supported. +## Install the latest version of PowerShellGet on an internet-connected machine -## Bootstrap on an internet-connected machine - -The following processes assume the machine is connected to the internet and can download files from -a public location. - -### ERROR: NuGet provider is required to continue - -You receive this error when the NuGet provider isn't available on the machine. +To install the latest version of PowerShellGet, run the following command: ```powershell -Find-Module -Repository PSGallery -Verbose -Name Contoso +Install-Module -Name PowerShellGet -Repository PSGallery ``` -Answer the prompt with `Y` to install the NuGet provider. +Answer the prompt with Y to install the NuGet provider. ```Output NuGet provider is required to continue @@ -43,72 +34,71 @@ ame NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to instal ort the NuGet provider now? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y VERBOSE: Installing NuGet provider. - -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Contoso Module PSGallery Contoso module ``` -### ERROR: NuGet.exe is required to continue +When you answer Y, PowerShellGet installs the NuGet provider and the `nuget.exe` +command-line tool (if necessary). -You receive this error when the NuGet provider is available, but the `nuget.exe` binary isn't. +> [!NOTE] +> When you install PowerShellGet, it automatically installs the latest version of +> PackageManagement. -```powershell -Publish-Module -Name Contoso -Repository PSGallery -Verbose -``` +## Copy the required files to the isolated computer -Answer the prompt with `Y` to install `nuget.exe`. +After installing the updates on the internet-connected machine, manually copy the components to the +isolated node through a trusted offline process. -```Output -NuGet.exe is required to continue -PowerShellGet requires NuGet.exe to publish an item to the NuGet-based repositories. NuGe -t.exe must be available under one of the paths specified in PATH environment variable val -ue. Do you want PowerShellGet to install NuGet.exe now? -[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y -VERBOSE: Installing NuGet.exe. -VERBOSE: Successfully published module 'Contoso' to the module publish location 'https:// -www.powershellgallery.com/api/v2/'. -Please allow few minutes for 'Contoso' to show up in the search results. -``` +1. Copy the PowerShellGet and PackageManagement modules to the offline machine. Use the following + command to locate the modules on the source machine: -### ERROR: NuGet.exe and NuGet provider are required to continue + ```powershell + Get-Module PowerShellGet, PackageManagement -ListAvailable | + Sort-Object Version -Descending | + Select-Object Path -First 2 + ``` -You receive this error when both the NuGet provider and `nuget.exe` aren't installed. + The result should look similar to the following output: -```powershell -Publish-Module -Name Contoso -Repository PSGallery -Verbose -``` + ```Output + Path + ---- + C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PowerShellGet.psd1 + C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.4.8.1\PackageManagement.psd1 + ``` -Answer the prompt with `Y` to install both the NuGet provider and `nuget.exe`. + Copy the entire module folders to the same location on the isolated machine. For example, if the + modules are located in `PowerShellGet\2.2.5` and `PackageManagement\1.4.8.1` folders to the + same folder names under `$env:PROGRAMFILES\WindowsPowerShell\Modules` on the target machine. -```Output -NuGet.exe and NuGet provider are required to continue -PowerShellGet requires NuGet.exe and NuGet provider version '2.8.5.201' or newer to inter -act with the NuGet-based repositories. Do you want PowerShellGet to install both NuGet.ex -e and NuGet provider now? -[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y -VERBOSE: Installing NuGet provider. -VERBOSE: Installing NuGet.exe. -VERBOSE: Successfully published module 'Contoso' to the module publish location 'https:// -www.powershellgallery.com/api/v2/'. - Please allow few minutes for 'Contoso' to show up in the search results. -``` + > [!NOTE] + > You need administrative privileges to copy files to `$env:PROGRAMFILES`. -## Bootstrap on a machine not connected to the internet +1. Copy `nuget.exe` to the isolated machine. PowerShellGet installs `nuget.exe` in the following + location: `$env:LOCALAPPDATA\Microsoft\Windows\PowerShell\PowerShellGet\nuget.exe` -The following processes assume the machine isn't connected to the internet. To install the necessary -components, follow the bootstrap process on an internet-connected machine then manually copy the -provider to the isolated node through an offline trusted process. + If the file isn't present at that location it's either installed somewhere else or PowerShellGet + found the .NET CLI (`dotnet.exe`). You can download the latest version of `nuget.exe` from + [https://aka.ms/psget-nugetexe][01]. -1. Copy the NuGet provider files to the offline machine. + Copy `nuget.exe` to `$env:LOCALAPPDATA\Microsoft\Windows\PowerShell\PowerShellGet\nuget.exe` on + the target computer. - Copy the `C:\Program Files\PackageManagement\ProviderAssemblies\NuGet` folder from the connected - machine to the same location on the offline machine. +## Unblock the copied files -1. Copy the PowerShellGet and PackageManagement modules to the offline machine. +When you copy files from another computer, Windows may block the files. To unblock the copied files, +run the following commands on the target machine: - Copy the following module folders from the connected machine to same location on the offline - machine. +```powershell +$getChildItemSplat = @{ + Path = @( + "$env:PROGRAMFILES\WindowsPowerShell\Modules\PowerShellGet" + "$env:PROGRAMFILES\WindowsPowerShell\Modules\PackageManagement" + "$env:LOCALAPPDATA\Microsoft\Windows\PowerShell\PowerShellGet\nuget.exe" + ) + Recurse = $true +} +Get-ChildItem @getChildItemSplat | Unblock-File +``` - - `C:\Program Files\WindowsPowerShell\Modules\PowerShellGet` - - `C:\Program Files\WindowsPowerShell\Modules\PackageManagement` + +[01]: https://aka.ms/psget-nugetexe diff --git a/powershell-gallery/docs-conceptual/overview.md b/powershell-gallery/docs-conceptual/overview.md index d79e884..57fa3c7 100644 --- a/powershell-gallery/docs-conceptual/overview.md +++ b/powershell-gallery/docs-conceptual/overview.md @@ -1,6 +1,6 @@ --- description: The PowerShellGet module provides commands to interact with the PowerShell Gallery, the central repository for PowerShell modules, scripts, and DSC resources. -ms.date: 11/16/2022 +ms.date: 01/26/2026 ms.topic: overview title: PowerShellGet and the PowerShell Gallery --- @@ -11,20 +11,19 @@ PowerShell scripts, modules containing PowerShell cmdlets and Desired State Conf resources. Some of these packages are authored by Microsoft, and others are authored by the PowerShell community. -The [PowerShellGet][07] module contains cmdlets for discovering, installing, updating, and +The [PowerShellGet][02] module contains cmdlets for discovering, installing, updating, and publishing PowerShell packages from the PowerShell Gallery. These packages can contain artifacts such as Modules, DSC Resources, Role Capabilities, and Scripts. Make sure you have the latest version of **PowerShellGet** and **PackageManagement** installed. -The [Microsoft.PowerShell.PSResourceGet][08] module replaces the **PowerShellGet** and +The [Microsoft.PowerShell.PSResourceGet][01] module replaces the **PowerShellGet** and **PackageManagement** modules. **Microsoft.PowerShell.PSResourceGet** version 1.0.1 ships in PowerShell 7.4.0. The latest version is available in the PowerShell Gallery and can be installed on any supported version of PowerShell. For more information see: -- [Install PowerShellGet][01] -- [Update PowerShellGet for Windows PowerShell][02] +- [Install a package manager for PowerShell][07] ## Getting Started with the PowerShell Gallery @@ -38,12 +37,10 @@ Provide feedback and report issues in the [GitHub repository][04]. To see the cu PowerShell Gallery services, see the [PowerShell Gallery Status][05] page on GitHub. -[01]: powershellget/install-powershellget.md -[02]: powershellget/update-powershell-51.md +[01]: /powershell/module/microsoft.powershell.psresourceget +[02]: /powershell/module/powershellget [03]: getting-started.md [04]: https://aka.ms/psgallery-issues [05]: https://aka.ms/psgallery-status [06]: https://www.powershellgallery.com -[07]: /powershell/module/powershellget -[08]: /powershell/module/microsoft.powershell.psresourceget - +[07]: powershellget/install-powershellget.md diff --git a/powershell-gallery/docs-conceptual/powershellget/install-powershellget.md b/powershell-gallery/docs-conceptual/powershellget/install-powershellget.md index e55d50f..2f4a205 100644 --- a/powershell-gallery/docs-conceptual/powershellget/install-powershellget.md +++ b/powershell-gallery/docs-conceptual/powershellget/install-powershellget.md @@ -1,19 +1,27 @@ --- description: This article explains how install PowerShellGet. -ms.date: 01/31/2024 +ms.date: 01/26/2026 ms.topic: install-set-up-deploy -title: How to Install PowerShellGet +title: Install a package manager for PowerShell --- -# How to Install PowerShellGet and PSResourceGet +# Install a package manager for PowerShell -## Prerequisites +If you are running PowerShell 6.0 or later, you already have a newer version of **PowerShellGet** +and **PackageManagement** installed. You should ensure you are running the latest versions of those +modules. -Ensure that you have a version of **PowerShellGet** and **PackageManagement** newer than 1.0.0.1 -installed. The latest stable versions are 2.2.5 for **PowerShellGet** and 1.4.8.1 for -**PackageManagement**. +If you are running PowerShell 7.4 or later, you also have **Microsoft.PowerShell.PSResourceGet** +installed. **Microsoft.PowerShell.PSResourceGet** is the new package management solution for +PowerShell. With this module, you no longer need to use **PowerShellGet** and **PackageManagement**. +It's installed side-by-side with the existing **PowerShellGet** and **PackageManagement** modules. -If you're running Windows PowerShell 5.1 with **PowerShellGet** 1.0.0.1, see -[Update PowerShellGet for Windows PowerShell 5.1](update-powershell-51.md). +Windows PowerShell ships with version 1.0.0.1 of **PowerShellGet** and **PackageManagement**. If +you're running Windows PowerShell 5.1, you must upgrade to the latest version of PowerShellGet and +PackageManagement. All versions of PowerShellGet v1.x are no longer supported. + +Use the following instructions to install or update to the latest versions of these modules. + +## Step 1: Enable TLS 1.2 To access the PowerShell Gallery, you must use Transport Layer Security (TLS) 1.2 or higher. Use the following command to enable TLS 1.2 in your PowerShell session. @@ -27,17 +35,16 @@ following command to enable TLS 1.2 in your PowerShell session. Add this command to your PowerShell profile script to ensure TLS 1.2 is configured for every PowerShell session. For more information about profiles, see [about_Profiles][01]. -If you're running PowerShell 6.0 or later, you already have a newer version of **PowerShellGet** and -**PackageManagement** installed. You can upgrade to a newer version if necessary or install the -preview release. You should always install the latest stable release. +## Step 2: Check the installed versions -Use the following command to see what version is installed. +To check the currently installed versions of the modules, run the following command: ```powershell -Get-Module PowerShellGet, PackageManagement -ListAvailable +$Names = @('PowerShellGet', 'PackageManagement', 'Microsoft.PowerShell.PSResourceGet') +Get-Module -Name $Names -ListAvailable ``` -The following output shows that the latest stable version needs to be installed. +In Windows PowerShell 5.1 on a newly installed Windows system, you should get the following output: ```Output Directory: C:\Program Files\WindowsPowerShell\Modules @@ -49,27 +56,69 @@ Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, ... Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, ... ``` -## Install the latest stable release +If the version of **PowerShellGet** is newer than `1.0.0.1` then you can +[check for updates][02] and [install the latest release][03]. -To install the latest versions of these modules run the following: +If you are still running version `1.0.0.1`, you must follow the steps to let **PowerShellGet** install +an updated NuGet provider and the `nuget.exe` command-line tool. Continue to the next step. + +## Step 3: Check for updates + +To check for the latest versions of the modules available from the PowerShell Gallery, run the +following command: ```powershell -Install-Module PowerShellGet -Force -AllowClobber +$Names = @('PowerShellGet', 'PackageManagement', 'Microsoft.PowerShell.PSResourceGet') +Find-Module -Name $Names -Repository PSGallery +``` + +You should get a result similar to the following output: + +```Output +Version Name Repository Description +------- ---- ---------- ----------- +1.4.8.1 PackageManagement PSGallery PackageManagement (a.k.a. OneGet) is a n… +2.2.5 PowerShellGet PSGallery PowerShell module with commands for disc… +1.1.1 Microsoft.PowerShell.PSResourceGet PSGallery PowerShell module with commands for disc… +``` + +## Step 4: Update NuGet components (if required) + +An updated NuGet provider is required by **PowerShellGet** commands to work with the PowerShell +Gallery. The `Publish-*` commands use `nuget.exe` or `dotnet.exe` to publish resources. If neither +tool is available, PowerShellGet installs `nuget.exe`. If you are still running version `1.0.0.1` of +**PowerShellGet**, `Find-Module` prompts you to install the NuGet provider. Enter Y to +install the provider. + +```Output +NuGet provider is required to continue +PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet +-based repositories. The NuGet provider must be available in 'C:\Program Files\PackageMan +agement\ProviderAssemblies' or 'C:\Users\user1\AppData\Local\PackageManagement\ProviderAs +semblies'. You can also install the NuGet provider by running 'Install-PackageProvider -N +ame NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and imp +ort the NuGet provider now? +[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y +VERBOSE: Installing NuGet provider. ``` -## Install Microsoft.PowerShell.PSResourceGet +When you answer Y, PowerShellGet installs the NuGet provider and the `nuget.exe` +command-line tool (if necessary). -**Microsoft.PowerShell.PSResourceGet** is the new package management solution for PowerShell. With -this module, you no longer need to use **PowerShellGet** and **PackageManagement**. However, it can -be installed side-by-side with the existing **PowerShellGet** module. To install -**Microsoft.PowerShell.PSResourceGet** side-by-side with your existing **PowerShellGet** version, -open any PowerShell console and run: +## Step 5: Install the latest release + +To install the latest versions of these modules run the following: ```powershell +Install-Module PowerShellGet -Repository PSGallery -Force -AllowClobber Install-Module Microsoft.PowerShell.PSResourceGet -Repository PSGallery ``` -**Microsoft.PowerShell.PSResourceGet** is preinstalled with PowerShell 7.4 and later. +> [!NOTE] +> When you install **PowerShellGet**, it automatically installs the latest version of +> **PackageManagement**. [01]: /powershell/module/microsoft.powershell.core/about/about_profiles +[02]: #step-3-check-for-updates +[03]: #step-5-install-the-latest-release diff --git a/powershell-gallery/docs-conceptual/powershellget/overview.md b/powershell-gallery/docs-conceptual/powershellget/overview.md index c834017..5cbd423 100644 --- a/powershell-gallery/docs-conceptual/powershellget/overview.md +++ b/powershell-gallery/docs-conceptual/powershellget/overview.md @@ -1,6 +1,6 @@ --- -description: This article explains the purpose and history of PowerShellGet -ms.date: 05/22/2025 +description: This article explains the purpose and history of PowerShellGet. +ms.date: 01/26/2026 ms.topic: overview title: Package management for PowerShell --- @@ -57,12 +57,12 @@ For best results, use the latest version of the **Microsoft.PowerShell.PSResourc > [!IMPORTANT] > The 1.0.0.1 version of PowerShellGet has limited features and must be updated to work properly - > with the PowerShell Gallery. To be supported, you must update to the latest version. For upgrade - > instructions, see [Update PowerShellGet for Windows PowerShell 5.1][07]. + > with the PowerShell Gallery. To be supported, you must update to the latest version. For more + > information, see [Install a package manager for PowerShell][05]. ## See also -- [Install PowerShellGet][05] +- [Install a package manager for PowerShell][05] - [PowerShellGet][03] cmdlet reference - [Microsoft.PowerShell.PSResourceGet][02] cmdlet reference @@ -73,4 +73,3 @@ For best results, use the latest version of the **Microsoft.PowerShell.PSResourc [04]: https://www.powershellgallery.com [05]: install-powershellget.md [06]: psresourceget-release-notes.md -[07]: update-powershell-51.md diff --git a/powershell-gallery/docs-conceptual/powershellget/toc.yml b/powershell-gallery/docs-conceptual/powershellget/toc.yml index e0084e2..e5c1970 100644 --- a/powershell-gallery/docs-conceptual/powershellget/toc.yml +++ b/powershell-gallery/docs-conceptual/powershellget/toc.yml @@ -1,12 +1,8 @@ items: - name: Overview href: overview.md - - name: Install a package manager - items: - - name: How to Install PowerShellGet and PSResourceGet - href: install-powershellget.md - - name: Update PowerShellGet for Windows PowerShell 5.1 - href: update-powershell-51.md + - name: Install a package manager for PowerShell + href: install-powershellget.md - name: How to items: - name: How to add credentials to repositories with PSResourceGet diff --git a/powershell-gallery/docs-conceptual/powershellget/update-powershell-51.md b/powershell-gallery/docs-conceptual/powershellget/update-powershell-51.md deleted file mode 100644 index 51b5cf2..0000000 --- a/powershell-gallery/docs-conceptual/powershellget/update-powershell-51.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -description: This article explains how to update PowerShellGet for Windows PowerShell. -ms.date: 06/09/2023 -ms.topic: install-set-up-deploy -title: Update PowerShellGet for Windows PowerShell 5.1 ---- -# Update PowerShellGet for Windows PowerShell 5.1 - -Windows PowerShell 5.1 comes with version 1.0.0.1 of the **PowerShellGet** and **PackageManagement** -preinstalled. This version of PowerShellGet has a limited features and must be updated to work -with the PowerShell Gallery. To be supported, you must update to the latest version. - -### Prerequisites - -- **PowerShellGet** requires .NET Framework 4.5 or above. For more information, see - [Install the .NET Framework for developers][01]. - -- To access the PowerShell Gallery, you must use Transport Layer Security (TLS) 1.2 or higher. Use - the following command to enable TLS 1.2 in your PowerShell session. - - ```powershell - [Net.ServicePointManager]::SecurityProtocol = - [Net.ServicePointManager]::SecurityProtocol -bor - [Net.SecurityProtocolType]::Tls12 - ``` - - Add this command to your PowerShell profile script to ensure TLS 1.2 is configured for every - PowerShell session. For more information about profiles, see [about_Profiles][02]. - -### Installing the latest version of PowerShellGet - -The PowerShellGet module includes cmdlets to install and update modules: - -- `Install-Module` installs the latest (non-prerelease) version of a module. -- `Update-Module` installs the latest (non-prerelease) version of a module if it's newer than the - currently installed module. However, this cmdlet only works if the previous version was installed - using `Install-Module`. - -To update the preinstalled module you must use `Install-Module`. After you have installed the new -version from the PowerShell Gallery, you can use `Update-Module` to install newer releases. - -Windows PowerShell 5.1 comes with **PowerShellGet** version 1.0.0.1, which doesn't include the NuGet -provider. The provider is required by **PowerShellGet** when working with the PowerShell Gallery. - -> [!NOTE] -> The following commands must be run from an elevated PowerShell session. Right-click the PowerShell -> icon and choose **Run as administrator** to start an elevated session. - -There are two ways to install the NuGet provider: - -- Use `Install-PackageProvider` to install NuGet before installing other modules - - Run the following command to install the NuGet provider. - - ```powershell - Install-PackageProvider -Name NuGet -Force - ``` - - After you have installed the provider you should be able to use any of the **PowerShellGet** - cmdlets with the PowerShell Gallery. - -- Let `Install-Module` prompt you to install the NuGet provider - - The following command attempts to install the updated PowerShellGet module without the NuGet - provider. - - ```powershell - Install-Module PowerShellGet -AllowClobber -Force - ``` - - `Install-Module` prompts you to install the NuGet provider. Type Y to install the - provider. - - ```Output - NuGet provider is required to continue - PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based - repositories. The NuGet provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' - or 'C:\Users\user1\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the - NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. - Do you want PowerShellGet to install and import the NuGet provider now? - [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y - VERBOSE: Installing NuGet provider. - ``` - -### After installing PowerShellGet - -After you have installed the new version of **PowerShellGet**, you should open a new PowerShell -session. PowerShell automatically loads the newest version of the module when you use a -**PowerShellGet** cmdlet. - -We also recommend that you register the PowerShell Gallery as a trusted repository. Use the -following command: - -```powershell -Set-PSRepository -Name PSGallery -InstallationPolicy Trusted -``` - -For more information, see [Set-PSRepository][03]. - - -[01]: /dotnet/framework/install/guide-for-developers -[02]: /powershell/module/microsoft.powershell.core/about/about_profiles -[03]: xref:PowerShellGet.Set-PSRepository diff --git a/powershell-gallery/mapping/monikerMapping.json b/powershell-gallery/mapping/monikerMapping.json index f218cdb..49bb7ee 100644 --- a/powershell-gallery/mapping/monikerMapping.json +++ b/powershell-gallery/mapping/monikerMapping.json @@ -1,10 +1,4 @@ { - "powershellget-1.x": { - "packageRoot": "powershellget-1.x", - "conceptualToc": "docs-conceptual/toc.yml", - "conceptualTocUrl": "/powershell/gallery/toc.json", - "referenceTocUrl": "/powershell/module/powershellget/toc.json" - }, "powershellget-2.x": { "packageRoot": "powershellget-2.x", "conceptualToc": "docs-conceptual/toc.yml", diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Find-Package.md b/powershell-gallery/powershellget-1.x/PackageManagement/Find-Package.md deleted file mode 100644 index 8826f94..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Find-Package.md +++ /dev/null @@ -1,734 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 07/19/2022 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/find-package?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Find-Package ---- -# Find-Package - -## SYNOPSIS -Finds software packages in available package sources. - -## SYNTAX - -### NuGet - -``` -Find-Package [-IncludeDependencies] [-AllVersions] [-Source ] - [-Credential ] [-Proxy ] [-ProxyCredential ] [[-Name] ] - [-RequiredVersion ] [-MinimumVersion ] [-MaximumVersion ] [-Force] - [-ForceBootstrap] [-ProviderName ] [-ConfigFile ] [-SkipValidate] - [-Headers ] [-FilterOnTag ] [-Contains ] [-AllowPrereleaseVersions] - [] -``` - -### PowerShellGet - -``` -Find-Package [-IncludeDependencies] [-AllVersions] [-Source ] - [-Credential ] [-Proxy ] [-ProxyCredential ] [[-Name] ] - [-RequiredVersion ] [-MinimumVersion ] [-MaximumVersion ] [-Force] - [-ForceBootstrap] [-ProviderName ] [-AllowPrereleaseVersions] - [-PackageManagementProvider ] [-PublishLocation ] [-ScriptSourceLocation ] - [-ScriptPublishLocation ] [-Type ] [-Filter ] [-Tag ] - [-Includes ] [-DscResource ] [-RoleCapability ] - [-Command ] [-AcceptLicense] [] -``` - -## DESCRIPTION - -`Find-Package` finds software packages that are available in package sources. `Get-PackageProvider` -and `Get-PackageSource` display details about your providers. - -[!INCLUDE [nuget-module](../../includes/nuget-module.md)] - -## EXAMPLES - -### Example 1: Find all available packages from a package provider - -This command finds all available PowerShell module packages in a registered gallery. Use -`Get-PackageProvider` to get the provider name. - -``` -Find-Package -ProviderName NuGet -``` - -```Output -Name Version Source Summary ----- ------- ------ ------- -NUnit 3.11.0 MyNuGet NUnit is a unit-testing framework for all .NET langua... -Newtonsoft.Json 12.0.1 MyNuGet Json.NET is a popular high-performance JSON framework... -EntityFramework 6.2.0 MyNuGet Entity Framework is Microsoft's recommended data acce... -MySql.Data 8.0.15 MyNuGet MySql.Data.MySqlClient .Net Core Class Library -bootstrap 4.3.1 MyNuGet Bootstrap framework in CSS. Includes fonts and JavaSc... -NuGet.Core 2.14.0 MyNuGet NuGet.Core is the core framework assembly for NuGet... -``` - -`Find-Package` uses the **Provider** parameter to specify the provider **NuGet**. - -### Example 2: Find a package from a package source - -This command finds the newest version of a package from a specified package source. If a package -source isn't provided, `Find-Package` searches each installed package provider and its package -sources. Use `Get-PackageSource` to get the source name. - -``` -Find-Package -Name NuGet.Core -Source MyNuGet -``` - -```Output -Name Version Source Summary ----- ------- ------ ------- -NuGet.Core 2.14.0 MyNuGet NuGet.Core is the core framework assembly for NuGet... -``` - -`Find-Package` uses the **Name** parameter to specify the package name **NuGet.Core**. The -**Source** parameter specifies to search for the package in **MyNuGet**. - -### Example 3: Find all versions of a package - -This command finds all available package versions from a specified provider. - -``` -Find-Package -Name NuGet.Core -Source MyNuGet -AllVersions -``` - -```Output -Name Version Source Summary ----- ------- ------ ------- -NuGet.Core 2.14.0 MyNuGet NuGet.Core is the core framework assembly for NuGet... -NuGet.Core 2.14.0-rtm-832 MyNuGet NuGet.Core is the core framework assembly for NuGet... -NuGet.Core 2.13.0 MyNuGet NuGet.Core is the core framework assembly for NuGet... -... -NuGet.Core 1.1.229.159 MyNuGet NuGet.Core is the core framework assembly for NuGet... -Nuget.Core 1.0.1120.104 MyNuGet NuGet.Core is the core framework assembly for NuGet... -``` - -`Find-Package` uses the **Name** parameter to specify the package **NuGet.Core**. The -**ProviderName** parameter specifies to search for the package in **MyNuGet**. **AllVersions** -specifies that all available versions are returned. - -### Example 4: Find a package with a specific name and version - -This command finds a specific package version from a specified provider. - -``` -Find-Package -Name NuGet.Core -ProviderName NuGet -RequiredVersion 2.9.0 -``` - -```Output -Name Version Source Summary ----- ------- ------ ------- -NuGet.Core 2.9.0 MyNuGet NuGet.Core is the core framework assembly for NuGet... -``` - -`Find-Package` uses the **Name** parameter to specify the package name **NuGet.Core**. The -**ProviderName** parameter specifies to search for the package in **NuGet**. **RequiredVersion** -specifies that only version **2.9.0** is returned. - -### Example 5: Find packages within a range of versions - -This command finds a range of versions for a specified package. - -``` -Find-Package -Name NuGet.Core -ProviderName NuGet -MinimumVersion 2.7.0 -MaximumVersion 2.9.0 -AllVersions -``` - -```Output -Name Version Source Summary ----- ------- ------ ------- -NuGet.Core 2.9.0 MyNuGet NuGet.Core is the core framework assembly for NuGet... -NuGet.Core 2.8.6 MyNuGet NuGet.Core is the core framework assembly for NuGet... -NuGet.Core 2.8.0 MyNuGet NuGet.Core is the core framework assembly for NuGet... -NuGet.Core 2.7.0 MyNuGet NuGet.Core is the core framework assembly for NuGet... -``` - -`Find-Package` uses the **Name** parameter to specify the package name **NuGet.Core**. The -**ProviderName** parameter specifies to search for the package in **NuGet**. **MinimumVersion** -specifies the lowest version **2.7.0**. **MaximumVersion** specifies the highest version **2.9.0**. -**AllVersions** determines the range is returned as specified by the minimum and maximum. - -### Example 6: Find a package from a file system - -This command finds packages with the file extension `.nupkg` that are stored on the local computer. -The files are packages downloaded from a gallery such as the **NuGet**. - -``` -PS> Find-Package -Source C:\LocalPkg -``` - -```Output -Name Version Source Summary ----- ------- ------ ------- -Microsoft.Web.Xdt 3.0.0 C:\LocalPkg\ Microsoft Xml Document Transformation (XDT)... -NuGet.Core 2.14.0 C:\LocalPkg\ NuGet.Core is the core framework assembly... -``` - -## PARAMETERS - -### -AcceptLicense - -Automatically accepts a license agreement if the package requires it. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowPrereleaseVersions - -Includes packages marked as a prerelease in the results. - -```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 -``` - -### -AllVersions - -Indicates that `Find-Package` returns all available versions of the package. By default, -`Find-Package` only returns the newest available version. - -```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 -``` - -### -Command - -Specifies an array of commands searched by `Find-Package`. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ConfigFile - -Specifies a configuration file. - -```yaml -Type: System.String -Parameter Sets: NuGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Contains - -`Find-Package` gets objects if any item in the object's property values are an exact match for the -specified value. - -```yaml -Type: System.String -Parameter Sets: NuGet -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 search for packages. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DscResource - -Specifies an array of Desired State Configuration (DSC) resources that this cmdlet searches. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies terms to search for within the **Name** and **Description** properties. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FilterOnTag - -Specifies the tag that filters the results. Results that don't contain the specified tag are -excluded. - -```yaml -Type: System.String[] -Parameter Sets: NuGet -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: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ForceBootstrap - -Indicates that `Find-Package` forces **PackageManagement** to automatically install the package -provider. - -```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 -``` - -### -Headers - -Specifies the headers for the package. - -```yaml -Type: System.String[] -Parameter Sets: NuGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IncludeDependencies - -Indicates that this cmdlet includes package dependencies in the results. - -```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 -``` - -### -Includes - -Specifies whether `Find-Package` should find all packages within a category. - -The accepted values are as follows: - -- Cmdlet -- DscResource -- Function -- RoleCapability -- Workflow - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet -Aliases: -Accepted values: Cmdlet, DscResource, Function, RoleCapability, Workflow - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -Specifies the maximum package version that you want to find. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum package version that you want to find. If a higher version is available, that -version is returned. - -```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 one or more package names, or package names with wildcard characters. Separate multiple -package names with commas. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: True -``` - -### -PackageManagementProvider - -Specifies the name of a package management provider. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProviderName - -Specifies one or more package provider names. Separate multiple package provider names with commas. -Use `Get-PackageProvider` to get a list of available package providers. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: Provider -Accepted values: Bootstrap, NuGet, PowerShellGet - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Proxy - -Specifies a proxy server for the request, rather than a direct connection to the internet resource. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PublishLocation - -Specifies a location for publishing the package. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -Specifies an exact package version that you want to find. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RoleCapability - -Specifies an array of role capabilities. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptPublishLocation - -Specifies a script publishing location for the package. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptSourceLocation - -Specifies a script source location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipValidate - -Switch that skips package credential validation. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Source - -Specifies one or more package sources. Use `Get-PackageSource` to get a list of available package -sources. A file system directory can be used as a source for download packages. - -```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 one or more strings to search for in the package metadata. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -Specifies whether to search for packages with a module, a script, or either. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: -Accepted values: Module, Script, All - -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 - -### None - -`Find-Package` doesn't accept input from the pipeline. - -## OUTPUTS - -### SoftwareIdentify[] - -`Find-Package` outputs a **SoftwareIdentity** 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 - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Get-Package](Get-Package.md) - -[Get-PackageProvider](Get-PackageProvider.md) - -[Get-PackageSource](Get-PackageSource.md) - -[Install-Package](Install-Package.md) - -[Save-Package](Save-Package.md) - -[Uninstall-Package](Uninstall-Package.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Find-PackageProvider.md b/powershell-gallery/powershellget-1.x/PackageManagement/Find-PackageProvider.md deleted file mode 100644 index 66c49be..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Find-PackageProvider.md +++ /dev/null @@ -1,306 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 10/04/2021 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/find-packageprovider?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Find-PackageProvider ---- - -# Find-PackageProvider - -## SYNOPSIS -Returns a list of Package Management package providers available for installation. - -## SYNTAX - -``` -Find-PackageProvider [[-Name] ] [-AllVersions] [-Source ] - [-IncludeDependencies] [-Credential ] [-Proxy ] - [-ProxyCredential ] [-RequiredVersion ] [-MinimumVersion ] - [-MaximumVersion ] [-Force] [-ForceBootstrap] [] -``` - -## DESCRIPTION - -The `Find-PackageProvider` cmdlet finds matching PackageManagement providers that are available in -package sources registered with PowerShellGet. These are package providers available for -installation with the Install-PackageProvider cmdlet. By default, this includes modules available in -the PowerShell Gallery with the **PackageManagement** and **Provider** tags. - -`Find-PackageProvider` also finds matching Package Management providers that are available in the -Package Management Azure Blob store. Use the bootstrapper provider to find and install them. - -## EXAMPLES - -### Example 1: Find all available package providers - -```powershell -Find-PackageProvider -``` - -This command gets a list of all package providers that are available on the repositories supported -by Package Management. By default, those package providers are available on the PowerShell Gallery -and by using the Package Management bootstrapping application. - -### Example 2: Find all versions of a provider - -```powershell -Find-PackageProvider -Name "Nuget" -AllVersions -``` - -This command finds all versions of the package provider named Nuget. - -### Example 3: Find a provider from a specified source - -```powershell -Find-PackageProvider -Name "Gistprovider" -Source "PSGallery" -``` - -This command finds a package provider available by using a specified package source. - -## PARAMETERS - -### -AllVersions - -Indicates that this cmdlet returns all available versions of the package provider. By default, -`Find-PackageProvider` only returns the newest available version. - -```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 -``` - -### -Credential - -Specifies a user account that has permission to search for package providers. - -```yaml -Type: System.Management.Automation.PSCredential -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. Currently, this is equivalent to the -**ForceBootstrap** parameter. - -```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 -``` - -### -ForceBootstrap - -Indicates that this cmdlet forces Package Management to automatically install the package provider. - -```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 -``` - -### -IncludeDependencies - -Indicates that this cmdlet includes dependencies. - -```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 -``` - -### -MaximumVersion - -Specifies the maximum allowed version of the package provider that you want to find. If you do not -add this parameter, `Find-PackageProvider` finds the highest available version of the provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum allowed version of the package provider that you want to find. If you do not -add this parameter, `Find-PackageProvider` finds the highest available version of the package that -also satisfies any maximum specified version specified by the **MaximumVersion** parameter. - -```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 one or more package provider module names, or provider names with wildcard characters. -Separate multiple package names with commas. - -```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 - -Specifies a proxy server for the request, rather than connecting directly to the Internet resource. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -Specifies the exact allowed version of the package provider that you want to find. If you do not add -this parameter, `Find-PackageProvider` finds the highest available version of the provider that also -satisfies any maximum version specified by the **MaximumVersion** parameter. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Source - -Specifies one or more package sources. You can get a list of available package sources by using the -`Get-PackageSource` cmdlet. - -```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 - -## OUTPUTS - -### Microsoft.PackageManagement.Packaging.SoftwareIdentity - -This cmdlet returns a **SoftwareIdentity** object. A **SoftwareIdentity** object can be piped into -`Install-PackageProvider` to install the results of `Find-PackageProvider`. - -## 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 - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Unregister-PackageSource](Unregister-PackageSource.md) - -[Get-PackageSource](Get-PackageSource.md) - -[Register-PackageSource](Register-PackageSource.md) - -[Install-PackageProvider](Install-PackageProvider.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Get-Package.md b/powershell-gallery/powershellget-1.x/PackageManagement/Get-Package.md deleted file mode 100644 index cded690..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Get-Package.md +++ /dev/null @@ -1,559 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 12/12/2022 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/get-package?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Get-Package ---- - -# Get-Package - -## SYNOPSIS -Returns a list of all software packages that were installed with **PackageManagement**. - -## SYNTAX - -### Programs -``` -Get-Package [[-Name] ] [-RequiredVersion ] [-MinimumVersion ] - [-MaximumVersion ] [-AllVersions] [-Force] [-ForceBootstrap] [-ProviderName ] - [-IncludeWindowsInstaller] [-IncludeSystemComponent] [] -``` - -### msi -``` -Get-Package [[-Name] ] [-RequiredVersion ] [-MinimumVersion ] - [-MaximumVersion ] [-AllVersions] [-Force] [-ForceBootstrap] [-ProviderName ] - [-AdditionalArguments ] [] -``` - -### NuGet - -``` -Get-Package [[-Name] ] [-RequiredVersion ] [-MinimumVersion ] - [-MaximumVersion ] [-AllVersions] [-Force] [-ForceBootstrap] [-ProviderName ] - [-Destination ] [-ExcludeVersion] [-Scope ] [-SkipDependencies] - [] -``` - -### PowerShellGet - -``` -Get-Package [[-Name] ] [-RequiredVersion ] [-MinimumVersion ] - [-MaximumVersion ] [-AllVersions] [-Force] [-ForceBootstrap] [-ProviderName ] - [-Scope ] [-PackageManagementProvider ] [-Type ] [-AllowClobber] - [-SkipPublisherCheck] [-InstallUpdate] [-NoPathUpdate] [-AllowPrereleaseVersions] - [] -``` - -## DESCRIPTION - -The `Get-Package` cmdlet returns a list of all software packages on the local computer that were -installed with **PackageManagement**. You can run `Get-Package` on remote computers by running it as -part of an `Invoke-Command` or `Enter-PSSession` command or script. - -[!INCLUDE [nuget-module](../../includes/nuget-module.md)] - -## EXAMPLES - -### Example 1: Get all installed packages - -The `Get-Package` cmdlet gets all packages that are installed on the local computer. - -```powershell -Get-Package -``` - -```Output -Name Version Source ProviderName ----- ------- ------ ------------ -posh-git 0.7.3 https://www.powershellgallery.com/api/v2 PowerShellGet -``` - -### Example 2: Get packages that are installed on a remote computer - -This command gets a list of packages that were installed by **PackageManagement** on a remote -computer. This command prompts you to provide the specified user's password. - -``` -PS> Invoke-Command -ComputerName Server01 -Credential CONTOSO\TestUser -ScriptBlock {Get-Package} -``` - -`Invoke-Command` uses the **ComputerName** parameter to specify a remote computer, **Server01**. The -**Credential** parameter specifies a domain and user name with permissions to run commands on the -computer. The **ScriptBlock** parameter runs the `Get-Package` cmdlet on the remote computer. - -### Example 3: Get packages for a specified provider - -This command gets software packages installed on the local computer from a specific provider. - -```powershell -Get-Package -ProviderName PowerShellGet -AllVersions -``` - -```Output -Name Version Source ProviderName ----- ------- ------ ------------ -PackageManagement 1.2.2 https://www.powershellgallery.com/api/v2 PowerShellGet -PackageManagement 1.3.1 https://www.powershellgallery.com/api/v2 PowerShellGet -posh-git 0.7.3 https://www.powershellgallery.com/api/v2 PowerShellGet -PowerShellGet 2.0.1 https://www.powershellgallery.com/api/v2 PowerShellGet -``` - -`Get-Package` uses the **ProviderName** parameter to specify a specific provider, **PowerShellGet**. -The **AllVersions** parameter displays each version that is installed. - -### Example 4: Get an exact version of a specific package - -This command gets a specific version of an installed package. More than one version of a package can -be installed. - -```powershell -Get-Package -Name PackageManagement -ProviderName PowerShellGet -RequiredVersion 1.3.1 -``` - -```Output -Name Version Source ProviderName ----- ------- ------ ------------ -PackageManagement 1.3.1 https://www.powershellgallery.com/api/v2 PowerShellGet -``` - -`Get-Package` uses **Name** parameter to specify the package name, **PackageManagement**. The -**ProviderName** parameter specifies the provider, **PowerShellGet**. The **RequiredVersion** -parameter specifies an installed version. - -### Example 5: Uninstall a package - -This example gets package information and then uninstalls the package. - -```powershell -Get-Package -Name posh-git -RequiredVersion 0.7.3 | Uninstall-Package -``` - -`Get-Package` uses the **Name** parameter to specify the package name, **posh-git**. The -**RequiredVersion** parameter is a specific version of the package. The object is sent down the -pipeline to the `Uninstall-Package` cmdlet. `Uninstall-Package` removes the package. - -## PARAMETERS - -### -AdditionalArguments - -Specifies additional arguments. - -```yaml -Type: System.String[] -Parameter Sets: msi -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowClobber - -Overrides warning messages about conflicts with existing commands. Overwrites existing commands that -have the same name as commands being installed by a module. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowPrereleaseVersions - -Includes packages marked as a prerelease in the results. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllVersions - -Indicates that `Get-Package` returns all available versions of the package. By default, -`Get-Package` only returns the newest available version. - -```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 -``` - -### -Destination - -Specifies the path to a directory that contains extracted package files. - -```yaml -Type: System.String -Parameter Sets: NuGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExcludeVersion - -Switch to exclude the version number in the folder path. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet -Aliases: - -Required: False -Position: Named -Default value: False -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: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ForceBootstrap - -Indicates that `Get-Package` forces **PackageManagement** to automatically install the package -provider. - -```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 -``` - -### -IncludeSystemComponent - -Indicates that this cmdlet includes system components in the results. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: Programs -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IncludeWindowsInstaller - -Indicates that this cmdlet includes the Windows Installer in the results. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: Programs -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InstallUpdate - -Indicates that this cmdlet installs updates. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -Specifies the maximum package version that you want to find. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum package version that you want to find. If a higher version is available, that -version is returned. - -```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 one or more package names, or package names with wildcard characters. Separate multiple -package names with commas. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: True -``` - -### -NoPathUpdate - -**NoPathUpdate** only applies to the `Install-Script` cmdlet. **NoPathUpdate** is a dynamic -parameter added by the provider and isn't supported by `Get-Package`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PackageManagementProvider - -Specifies the name of a package management provider. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProviderName - -Specifies one or more package provider names. Separate multiple package provider names with commas. -Use `Get-PackageProvider` to get a list of available package providers. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: Provider -Accepted values: Bootstrap, NuGet, PowerShellGet - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequiredVersion - -Specifies the exact version of the package to find. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Scope - -Specifies the search scope for the package. - -```yaml -Type: System.String -Parameter Sets: NuGet, PowerShellGet -Aliases: -Accepted values: CurrentUser, AllUsers - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipDependencies - -Switch that specifies to skip finding any package dependencies. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipPublisherCheck - -Allows you to get a package version that is newer than your installed version. For example, an -installed package that is digitally signed by a trusted publisher but a new version isn't digitally -signed. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -Specifies whether to search for packages with a module, a script, or either. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: -Accepted values: Module, Script, All - -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 - -### Microsoft.PackageManagement.Packaging.SoftwareIdentity - -This cmdlet returns a **SoftwareIdentity** object for each installed package that matches the -parameters. By default, it returns every installed package. - -## NOTES - -Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic -parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets -and includes the provider's parameter set. For example, `Get-Package` has the **PowerShellGet** -parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherCheck`. - -> [!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 - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Enter-PSSession](xref:Microsoft.PowerShell.Core.Enter-PSSession) - -[Find-Package](Find-Package.md) - -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) - -[Get-PackageProvider](Get-PackageProvider.md) - -[Get-PackageSource](Get-PackageSource.md) - -[Install-Package](Install-Package.md) - -[Invoke-Command](xref:Microsoft.PowerShell.Core.Invoke-Command) - -[Save-Package](Save-Package.md) - -[Uninstall-Package](Uninstall-Package.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Get-PackageProvider.md b/powershell-gallery/powershellget-1.x/PackageManagement/Get-PackageProvider.md deleted file mode 100644 index 1795a71..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Get-PackageProvider.md +++ /dev/null @@ -1,172 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 12/12/2022 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/get-packageprovider?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Get-PackageProvider ---- - -# Get-PackageProvider - -## SYNOPSIS -Returns a list of package providers that are connected to Package Management. - -## SYNTAX - -``` -Get-PackageProvider [[-Name] ] [-ListAvailable] [-Force] [-ForceBootstrap] - [] -``` - -## DESCRIPTION - -The `Get-PackageProvider` cmdlet returns a list of package providers that are connected to Package -Management. Examples of these providers include PSModule, NuGet, and Chocolatey. You can filter the -results based on all or part of one or more provider names. - -## EXAMPLES - -### Example 1: Get all currently loaded package providers - -```powershell -Get-PackageProvider -``` - -This command gets a list of all the package providers that are currently loaded on the local -computer. - -### Example 2: Get all available package providers - -```powershell -Get-PackageProvider -ListAvailable -``` - -This command gets a list of all package providers that are available on the local computer. - -### Example 3: Dynamically get a package provider - -```powershell -Get-PackageProvider -Name "Chocolatey" -ForceBootstrap -``` - -This command automatically installs the Chocolatey provider if your computer does not have the -Chocolatey provider installed. - -## PARAMETERS - -### -Force - -Indicates that this cmdlet forces all other actions with this cmdlet that can be forced. In -`Get-PackageProvider`, this means the **Force** parameter acts the same as the **ForceBootstrap** -parameter. - -```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 -``` - -### -ForceBootstrap - -Indicates that this cmdlet forces Package Management to automatically install the package provider. - -```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 -``` - -### -ListAvailable - -Gets all installed providers. `Get-PackageProvider` gets provider in paths listed in the -**PSModulePath** environment variable as well as the package provider assembly folders: - -- `$env:ProgramFiles\PackageManagement\ProviderAssemblies` -- `$env:LOCALAPPDATA\PackageManagement\ProviderAssemblies` - -Without this parameter, `Get-PackageProvider` gets only the providers loaded in the current session. - -```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 -``` - -### -Name - -Specifies one or more provider names, or partial provider names. Separate multiple provider names -with commas. Valid values for this parameter include names of providers that you have installed with -packages; PackageManagement ships with a set of default providers, including the **PSModule** and -**MSI** providers. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -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 - -### Microsoft.PackageManagement.Implementation.PackageProvider - -This cmdlet returns a **PackageProvider** object for each installed package provider matching the -parameters. By default, it returns every installed package provider. - -## 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 - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Get-PackageSource](Get-PackageSource.md) - -[Register-PackageSource](Register-PackageSource.md) - -[Unregister-PackageSource](Unregister-PackageSource.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Get-PackageSource.md b/powershell-gallery/powershellget-1.x/PackageManagement/Get-PackageSource.md deleted file mode 100644 index 681c4c8..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Get-PackageSource.md +++ /dev/null @@ -1,318 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 12/12/2022 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/get-packagesource?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Get-PackageSource ---- - -# Get-PackageSource - -## SYNOPSIS -Gets a list of package sources that are registered for a package provider. - -## SYNTAX - -### NuGet - -``` -Get-PackageSource [[-Name] ] [-Location ] [-Force] [-ForceBootstrap] - [-ProviderName ] [-ConfigFile ] [-SkipValidate] [] -``` - -### PowerShellGet - -``` -Get-PackageSource [[-Name] ] [-Location ] [-Force] [-ForceBootstrap] - [-ProviderName ] [-PackageManagementProvider ] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [] -``` - -## DESCRIPTION - -The `Get-PackageSource` cmdlet gets a list of package sources that are registered with -**PackageManagement** on the local computer. If you specify a package provider, `Get-PackageSource` -gets only those sources that are associated with the specified provider. Otherwise, the command -returns all package sources that are registered with **PackageManagement**. - -## EXAMPLES - -### Example 1: Get all package sources - -The `Get-PackageSource` cmdlet gets all package sources that are registered with -**PackageManagement** on the local computer. - -```powershell -Get-PackageSource -``` - -```Output -Name ProviderName IsTrusted Location ----- ------------ --------- -------- -LocalPackages NuGet False C:\LocalPkg\ -MyNuget NuGet False https://www.nuget.org/api/v2 -PSGallery PowerShellGet False https://www.powershellgallery.com/api/v2 -``` - -### Example 2: Get all package sources for a specific provider - -This command gets package sources that are registered for a specific provider. - -```powershell -Get-PackageSource -ProviderName NuGet -``` - -```Output -Name ProviderName IsTrusted Location ----- ------------ --------- -------- -LocalPackages NuGet False C:\LocalPkg\ -MyNuget NuGet False https://www.nuget.org/api/v2 -``` - -`Get-PackageSource` uses the **ProviderName** parameter to get package sources that are registered -for the **NuGet** provider. - -### Example 3: Get sources from a package provider - -This command uses a package provider to get package sources. - -```powershell -Get-PackageProvider -Name NuGet | Get-PackageSource -``` - -```Output -Name ProviderName IsTrusted Location ----- ------------ --------- -------- -LocalPackages NuGet False C:\LocalPkg\ -MyNuget NuGet False https://www.nuget.org/api/v2 -``` - -`Get-PackageProvider` uses the **Name** parameter specify the provider name, **NuGet**. The object -is sent down the pipeline to `Get-PackageSource`. - -## PARAMETERS - -### -ConfigFile - -Specifies a configuration file. - -```yaml -Type: System.String -Parameter Sets: NuGet -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: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ForceBootstrap - -Indicates that this cmdlet forces **PackageManagement** to automatically install a package provider. - -```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 -``` - -### -Location - -Specifies the location of a package management source or repository. - -```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 package management source. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PackageManagementProvider - -Specifies a package management provider. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProviderName - -Specifies one or more package provider names. Separate multiple package provider names with commas. -Use `Get-PackageProvider` to get a list of available package providers. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: Provider -Accepted values: Bootstrap, NuGet, PowerShellGet - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PublishLocation - -Specifies the publish location for the package source. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptPublishLocation - -Specifies the script publish location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptSourceLocation - -Specifies the script source location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipValidate - -Switch that skips validating the credentials of a package source. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet -Aliases: - -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 - -## OUTPUTS - -### Microsoft.PackageManagement.Packaging.PackageSource - -This cmdlet returns a **PackageSource** object for each registered package source that fulfills the -criteria set by the parameters. By default, it returns every registered package source. - -## 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 - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Find-Package](Find-Package.md) - -[Get-Package](Get-Package.md) - -[Get-PackageProvider](Get-PackageProvider.md) - -[Register-PackageSource](Register-PackageSource.md) - -[Set-PackageSource](Set-PackageSource.md) - -[Unregister-PackageSource](Unregister-PackageSource.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Import-PackageProvider.md b/powershell-gallery/powershellget-1.x/PackageManagement/Import-PackageProvider.md deleted file mode 100644 index 7a6ab4e..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Import-PackageProvider.md +++ /dev/null @@ -1,201 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 06/09/2017 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/import-packageprovider?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Import-PackageProvider ---- - -# Import-PackageProvider - -## SYNOPSIS -Adds Package Management package providers to the current session. - -## SYNTAX - -``` -Import-PackageProvider [-Name] [-RequiredVersion ] [-MinimumVersion ] - [-MaximumVersion ] [-Force] [-ForceBootstrap] [] -``` - -## DESCRIPTION - -The `Import-PackageProvider` cmdlet adds one or more package providers to the current session. -The provider that you import must be installed on the local computer. - -To get a list of available providers, run `Get-PackageProvider -ListAvailable`. -Note that a package provider name can be different from its module name. - -Due to security reasons, **PackageManagement** requires C#-based providers to contain a -`provider.manifest`. For more information on how to build a provider with `provider.manifest` -injected, see the `.csproj` project files on -[https://github.com/oneget/oneget](https://github.com/oneget/oneget). - -## EXAMPLES - -### Example 1: Import a package provider from the local computer - -```powershell -PS C:\> Import-PackageProvider -Name "Nuget" -``` - -This command imports the Nuget provider after it has been installed on the local computer. - -### Example 2: Import a specific version of a package provider - -```powershell -PS C:\> Find-PackageProvider -Name "Nuget" -AllVersions -Install-PackageProvider -Name "Nuget" -RequiredVersion "2.8.5.201" -Force -Get-PackageProvider -ListAvailable -Import-PackageProvider -Name "Nuget" -RequiredVersion "2.8.5.201" -Verbose -``` - -This command finds, installs, and imports a specific version of the Nuget package provider. - -## PARAMETERS - -### -Force - -Forces the command to run without asking for user confirmation. -Re-imports a package provider. - -```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 -``` - -### -ForceBootstrap - -Indicates that this cmdlet forces Package Management to automatically install the package provider. - -```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 -``` - -### -MaximumVersion - -Specifies the maximum allowed version of the package provider that you want to import. If you do not -add this parameter, `Import-PackageProvider` imports the highest available version of the provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum allowed version of the package provider that you want to import. If you do not -add this parameter, `Import-PackageProvider` imports the highest available version of the package -that also satisfies any maximum version that is specified using the *MaximumVersion* parameter. - -```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 one or more package provider names. Wildcards are not permitted. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequiredVersion - -Specifies the exact version of the package provider that you want to import. If you do not add this -parameter, `Import-PackageProvider` imports the highest available version of the provider that also -satisfies any maximum version specified using the **MaximumVersion** parameter. - -```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 - -### Microsoft.PackageManagement.Implementation.PackageProvider - -You can pipe a **PackageProvider** object returned by `Get-PackageProvider` into -`Import-PackageProvider`. - -## OUTPUTS - -## 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 - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Unregister-PackageSource](Unregister-PackageSource.md) - -[Get-PackageSource](Get-PackageSource.md) - -[Register-PackageSource](Register-PackageSource.md) - -[Get-PackageProvider](Get-PackageProvider.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Install-Package.md b/powershell-gallery/powershellget-1.x/PackageManagement/Install-Package.md deleted file mode 100644 index 8b82a18..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Install-Package.md +++ /dev/null @@ -1,961 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 12/12/2022 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/install-package?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Install-Package ---- - -# Install-Package - -## SYNOPSIS -Installs one or more software packages. - -## SYNTAX - -### PackageBySearch (Default) - -``` -Install-Package [-Name] [-RequiredVersion ] [-MinimumVersion ] - [-MaximumVersion ] [-Source ] [-Credential ] [-Proxy ] - [-ProxyCredential ] [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-ProviderName ] [] -``` - -### PackageByInputObject - -``` -Install-Package [-InputObject] [-Credential ] [-Proxy ] - [-ProxyCredential ] [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [] -``` - -### Programs:PackageBySearch - -``` -Install-Package [-Credential ] [-Proxy ] [-ProxyCredential ] - [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-IncludeWindowsInstaller] - [-IncludeSystemComponent] [] -``` - -### Programs:PackageByInputObject - -``` -Install-Package [-Credential ] [-Proxy ] [-ProxyCredential ] - [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-IncludeWindowsInstaller] - [-IncludeSystemComponent] [] -``` - -### msi:PackageBySearch - -``` -Install-Package [-Credential ] [-Proxy ] [-ProxyCredential ] - [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-AdditionalArguments ] - [] -``` - -### msi:PackageByInputObject - -``` -Install-Package [-Credential ] [-Proxy ] [-ProxyCredential ] - [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-AdditionalArguments ] - [] -``` - -### NuGet:PackageBySearch - -``` -Install-Package [-Credential ] [-Proxy ] [-ProxyCredential ] - [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-ConfigFile ] - [-SkipValidate] [-Headers ] [-FilterOnTag ] [-Contains ] - [-AllowPrereleaseVersions] [-Destination ] [-ExcludeVersion] [-Scope ] - [-SkipDependencies] [] -``` - -### NuGet:PackageByInputObject - -``` -Install-Package [-Credential ] [-Proxy ] [-ProxyCredential ] - [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-ConfigFile ] - [-SkipValidate] [-Headers ] [-FilterOnTag ] [-Contains ] - [-AllowPrereleaseVersions] [-Destination ] [-ExcludeVersion] [-Scope ] - [-SkipDependencies] [] -``` - -### PowerShellGet:PackageBySearch - -``` -Install-Package [-Credential ] [-Proxy ] [-ProxyCredential ] - [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-AllowPrereleaseVersions] - [-Scope ] [-PackageManagementProvider ] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [-Type ] - [-Filter ] [-Tag ] [-Includes ] [-DscResource ] - [-RoleCapability ] [-Command ] [-AcceptLicense] [-AllowClobber] - [-SkipPublisherCheck] [-InstallUpdate] [-NoPathUpdate] [] -``` - -### PowerShellGet:PackageByInputObject - -``` -Install-Package [-Credential ] [-Proxy ] [-ProxyCredential ] - [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-AllowPrereleaseVersions] - [-Scope ] [-PackageManagementProvider ] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [-Type ] - [-Filter ] [-Tag ] [-Includes ] [-DscResource ] - [-RoleCapability ] [-Command ] [-AcceptLicense] [-AllowClobber] - [-SkipPublisherCheck] [-InstallUpdate] [-NoPathUpdate] [] -``` - -## DESCRIPTION - -The `Install-Package` cmdlet installs one or more software packages on the local computer. If you -have multiple software sources, use `Get-PackageProvider` and `Get-PackageSource` to display details -about your providers. - -[!INCLUDE [nuget-module](../../includes/nuget-module.md)] - -## EXAMPLES - -### Example 1: Install a package by package name - -The `Install-Package` cmdlet installs a software package and its dependencies. - -``` -PS> Install-Package -Name NuGet.Core -Source MyNuGet -Credential Contoso\TestUser -``` - -`Install-Package` uses parameters to specify the packages **Name** and **Source**. The -**Credential** parameter uses a domain user account with permissions to install packages. The -command prompts you for the user account password. - -### Example 2: Use Find-Package to install a package - -In this example, the object returned by `Find-Package` is sent down the pipeline and installed by -`Install-Package`. - -``` -PS> Find-Package -Name NuGet.Core -Source MyNuGet | Install-Package -``` - -`Find-Package` uses the **Name** and **Source** parameters to locate a package. The object is sent -down the pipeline and `Install-Package` installs the package on the local computer. - -### Example 3: Install packages by specifying a range of versions - -`Install-Package` uses the **MinimumVersion** and **MaximumVersion** parameters to specify a range -of software versions. - -``` -PS> Install-Package -Name NuGet.Core -Source MyNuGet -MinimumVersion 2.8.0 -MaximumVersion 2.9.0 -``` - -`Install-Package` uses the **Name** and **Source** parameters to find a package. The -**MinimumVersion** and **MaximumVersion** parameters specify a range of software versions. The -highest version in the range is installed. - -## PARAMETERS - -### -AcceptLicense - - **AcceptLicense** automatically accepts the license agreement during installation. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AdditionalArguments - -Specifies one or more additional arguments for installation. - -```yaml -Type: System.String[] -Parameter Sets: msi:PackageBySearch, msi:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowClobber - -Overrides warning messages about conflicts with existing commands. Overwrites existing commands that -have the same name as commands being installed. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowPrereleaseVersions - -Allows the installation of packages marked as prerelease. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet:PackageBySearch, NuGet:PackageByInputObject, PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllVersions - -`Install-Package` installs all available versions of the package. By default, only the newest -version is installed. - -```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 -``` - -### -Command - -Specifies one or more commands that `Install-Package` searches. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ConfigFile - -Specifies a path that contains a configuration file. - -```yaml -Type: System.String -Parameter Sets: NuGet:PackageBySearch, NuGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Contains - -`Install-Package` gets objects if the **Contains** parameter specifies a value that matches any of -the object's property values. - -```yaml -Type: System.String -Parameter Sets: NuGet:PackageBySearch, NuGet:PackageByInputObject -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 computer and run commands. Type a user -name, such as **User01**, **Domain01\User01**, or enter a **PSCredential** object, generated by the -`Get-Credential` cmdlet. If you type a user name, you're prompted for a password. - -When the **Credential** parameter isn't specified, `Install-Package` uses the current user. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Destination - -Specifies a path to an input object. - -```yaml -Type: System.String -Parameter Sets: NuGet:PackageBySearch, NuGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DscResource - -Specifies one or more Desired State Configuration (DSC) resources that are searched by -`Install-Package`. Use the `Find-DscResource` cmdlet to find DSC resources. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExcludeVersion - -Switch to exclude the version number in the folder path. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet:PackageBySearch, NuGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies terms to search for within the **Name** and **Description** properties. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FilterOnTag - -Specifies a tag that filters results and excludes results that don't contain the specified tag. - -```yaml -Type: System.String[] -Parameter Sets: NuGet:PackageBySearch, NuGet:PackageByInputObject -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. Overrides restrictions that prevent -`Install-Package` from succeeding, with the exception of security. - -```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 -``` - -### -ForceBootstrap - -Forces **PackageManagement** to automatically install the package provider for the specified -package. - -```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 -``` - -### -Headers - -Specifies the package headers. - -```yaml -Type: System.String[] -Parameter Sets: NuGet:PackageBySearch, NuGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Includes - -Specifies whether `Install-Package` should find all package types. The acceptable values for this -parameter are as follows: - -- Cmdlet -- DscResource -- Function -- RoleCapability -- Workflow - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: -Accepted values: Cmdlet, DscResource, Function, RoleCapability, Workflow - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IncludeSystemComponent - -Indicates that this cmdlet includes system components in the results. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: Programs:PackageBySearch, Programs:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IncludeWindowsInstaller - -Indicates that this cmdlet includes the Windows installer in the results. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: Programs:PackageBySearch, Programs:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject - -Accepts pipeline input. Specifies a package by using the package's **SoftwareIdentity** type. -`Find-Package` outputs a **SoftwareIdentity** object. - -```yaml -Type: Microsoft.PackageManagement.Packaging.SoftwareIdentity[] -Parameter Sets: PackageByInputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -InstallUpdate - -Indicates that `Install-Package` installs updates. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -Specifies the maximum allowed package version that you want to install. If you don't specify this -parameter, `Install-Package` installs the package's newest version. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum allowed package version that you want to install. If you don't add this -parameter, `Install-Package` installs the package's newest version that satisfies any version -specified by the **MaximumVersion** parameter. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies one or more package names. Multiple package names must be separated by commas. - -```yaml -Type: System.String[] -Parameter Sets: PackageBySearch -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NoPathUpdate - -**NoPathUpdate** only applies to the `Install-Script` cmdlet. **NoPathUpdate** is a dynamic -parameter added by the provider and isn't supported by `Install-Package`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PackageManagementProvider - -Specifies the name of the **PackageManagement** provider. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProviderName - -Specifies one or more package provider names to which to scope your package search. You can get -package provider names by running the `Get-PackageProvider` cmdlet. - -```yaml -Type: System.String[] -Parameter Sets: PackageBySearch -Aliases: Provider -Accepted values: Bootstrap, NuGet, PowerShellGet - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Proxy - -Specifies a proxy server for the request, rather than connecting directly to an internet resource. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential - -Specifies a user account that has permission to use the proxy server specified by the **Proxy** -parameter. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PublishLocation - -Specifies the path to a package's published location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -Specifies the exact allowed version of the package that you want to install. If you don't add this -parameter, `Install-Package` installs the package's newest version that satisfies any version -specified by the **MaximumVersion** parameter. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RoleCapability - -Specifies an array of role capabilities. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Scope - -Specifies the scope for which to install the package. The acceptable values for this parameter are -as follows: - -- CurrentUser -- AllUsers - -```yaml -Type: System.String -Parameter Sets: NuGet:PackageBySearch, NuGet:PackageByInputObject, PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: -Accepted values: CurrentUser, AllUsers - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptPublishLocation - -Specifies the path to a script's published location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptSourceLocation - -Specifies the script source location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipDependencies - -Skips the installation of software dependencies. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet:PackageBySearch, NuGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipPublisherCheck - -Allows you to get a package version that is newer than your installed version. For example, an -installed package that is digitally signed by a trusted publisher but a new version isn't digitally -signed. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipValidate - -Switch that skips validating the credentials of a package. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet:PackageBySearch, NuGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Source - -Specifies one or more package sources. Multiple package source names must be separated by commas. -You can get package source names by running the `Get-PackageSource` cmdlet. - -```yaml -Type: System.String[] -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Tag - -Specifies one or more strings to search for in the package metadata. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -Specifies whether to search for packages with a module, a script, or both. The acceptable values for -this parameter are as follows: - -- Module -- Script -- All - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageBySearch, PowerShellGet:PackageByInputObject -Aliases: -Accepted values: Module, Script, All - -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 `Install-Package` cmdlet is run. 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 - -### Microsoft.PackageManagement.Packaging.SoftwareIdentity - -You can pipe a **SoftwareIdentity** object to this cmdlet. - -## OUTPUTS - -### Microsoft.PackageManagement.Packaging.SoftwareIdentity - -This cmdlet returns a **SoftwareIdentity** object for each package it installs. - -## NOTES - -Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic -parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets -and includes the provider's parameter set. For example, `Install-Package` has the **PowerShellGet** -parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherCheck`. - -> [!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 - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Find-DscResource](../PowershellGet/Find-DscResource.md) - -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) - -[Get-Package](Get-Package.md) - -[Get-PackageProvider](Get-PackageProvider.md) - -[Get-PackageSource](Get-PackageSource.md) - -[Find-Package](Find-Package.md) - -[Save-Package](Save-Package.md) - -[Uninstall-Package](Uninstall-Package.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Install-PackageProvider.md b/powershell-gallery/powershellget-1.x/PackageManagement/Install-PackageProvider.md deleted file mode 100644 index 2b4736e..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Install-PackageProvider.md +++ /dev/null @@ -1,400 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 06/16/2025 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/install-packageprovider?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Install-PackageProvider ---- -# Install-PackageProvider - -## SYNOPSIS -Installs one or more Package Management package providers. - -## SYNTAX - -### PackageBySearch (Default) - -``` -Install-PackageProvider [-Name] [-RequiredVersion ] [-MinimumVersion ] - [-MaximumVersion ] [-Credential ] [-Scope ] [-Source ] - [-Proxy ] [-ProxyCredential ] [-AllVersions] [-Force] [-ForceBootstrap] - [-WhatIf] [-Confirm] [] -``` - -### PackageByInputObject - -``` -Install-PackageProvider [-Scope ] [-InputObject] [-Proxy ] - [-ProxyCredential ] [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION - -The `Install-PackageProvider` cmdlet installs matching Package Management providers that are -available in package sources registered with **PowerShellGet**. By default, this includes modules -available in the Windows PowerShell Gallery with the **PackageManagement** tag. The -**PowerShellGet** Package Management provider is used for finding providers in these repositories. - -This cmdlet also installs matching Package Management providers that are available using the Package -Management bootstrapping application. Use the bootstrapper provider to find and install them. - -In order to execute the first time, PackageManagement requires an internet connection to download -the NuGet package provider. However, if your computer does not have an internet connection and you -need to use the NuGet or PowerShellGet provider, you can download them on another computer and copy -them to your target computer. Use the following steps to do this: - -1. Run `Install-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201 -Force` to install the - provider from a computer with an internet connection. -1. After the install, you can find the provider installed in - `$env:ProgramFiles\PackageManagement\ProviderAssemblies\\` or - `$env:LOCALAPPDATA\PackageManagement\ProviderAssemblies\\`. -1. Place the `` folder, which in this case is the NuGet folder, in the corresponding - location on your target computer. If your target computer is a Nano server, you need to run - `Install-PackageProvider` from Nano Server to download the correct NuGet binaries. -1. Restart PowerShell to auto-load the package provider. Alternatively, run - `Get-PackageProvider -ListAvailable` to list all the package providers available on the computer. - Then use `Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201` to import the provider - to the current Windows PowerShell session. - -## EXAMPLES - -### Example 1: Install a package provider from the PowerShell Gallery - -This command installs the GistProvider package provider from the PowerShell Gallery. - -```powershell -Install-PackageProvider -Name "GistProvider" -Verbose -``` - -### Example 2: Install a specified version of a package provider - -This example installs a specified version of the NuGet package provider. - -The first command finds all versions of the package provider named NuGet. -The second command installs a specified version of the NuGet package provider. - -```powershell -Find-PackageProvider -Name "NuGet" -AllVersions -Install-PackageProvider -Name "NuGet" -RequiredVersion "2.8.5.216" -Force -``` - -### Example 3: Find a provider and install it - -This example uses `Find-PackageProvider` and the pipeline to search for the Gist provider and -install it. - -```powershell -Find-PackageProvider -Name "GistProvider" | Install-PackageProvider -Verbose -``` - -### Example 4: Install a provider to the current user's module folder - -This command installs a package provider to `$env:LOCALAPPDATA\PackageManagement\ProviderAssemblies` -so that only the current user can use it. - -```powershell -Install-PackageProvider -Name GistProvider -Verbose -Scope CurrentUser -``` - -## PARAMETERS - -### -AllVersions - -Indicates that this cmdlet installs all available versions of the package provider. By default, -`Install-PackageProvider` only returns the highest available version. - -```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 -``` - -### -Credential - -Specifies a user account that has permission to install package providers. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Force - -Indicates that this cmdlet forces all actions with this cmdlet that can be forced. Currently, this -means the **Force** parameter acts the same as the **ForceBootstrap** parameter. - -```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 -``` - -### -ForceBootstrap - -Indicates that this cmdlet automatically installs the package provider. - -```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 -``` - -### -InputObject - -Specifies a **SoftwareIdentity** object. Use the `Find-PackageProvider` cmdlet to obtain a -**SoftwareIdentity** object to pipe into `Install-PackageProvider`. - -```yaml -Type: Microsoft.PackageManagement.Packaging.SoftwareIdentity[] -Parameter Sets: PackageByInputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -MaximumVersion - -Specifies the maximum allowed version of the package provider that you want to install. If you do -not add this parameter, `Install-PackageProvider` installs the highest available version of the -provider. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum allowed version of the package provider that you want to install. If you do -not add this parameter, `Install-PackageProvider` installs the highest available version of the -package that also satisfies any requirement specified by the *MaximumVersion* parameter. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies one or more package provider module names. Separate multiple package names with commas. -Wildcard characters are not supported. - -```yaml -Type: System.String[] -Parameter Sets: PackageBySearch -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -Specifies a proxy server for the request, rather than connecting directly to the Internet resource. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -Specifies the exact allowed version of the package provider that you want to install. If you do not -add this parameter, `Install-PackageProvider` installs the highest available version of the provider -that also satisfies any maximum version specified by the **MaximumVersion** parameter. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Scope - -Specifies the installation scope of the provider. The acceptable values for this parameter -are: - -- **AllUsers** - installs providers in a location that is accessible to all users of the computer. - By default, this is **$env:ProgramFiles\PackageManagement\ProviderAssemblies.** - -- **CurrentUser** - installs providers in a location where they are only accessible to the current - user. By default, this is **$env:LOCALAPPDATA\PackageManagement\ProviderAssemblies.** - -```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 -``` - -### -Source - -Specifies one or more package sources. Use the `Get-PackageSource` cmdlet to get a list of available -package sources. - -```yaml -Type: System.String[] -Parameter Sets: PackageBySearch -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 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 - -### Microsoft.PackageManagement.Packaging.SoftwareIdentity - -You can pipe a **SoftwareIdentity** object to this cmdlet. Use `Find-PackageProvider` to get a -**SoftwareIdentity** object that can be piped into `Install-PackageProvider`. - -## OUTPUTS - -## 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-PackageProvider](Find-PackageProvider.md) - -[Get-PackageProvider](Get-PackageProvider.md) - -[Import-PackageProvider](Import-PackageProvider.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/PackageManagement.md b/powershell-gallery/powershellget-1.x/PackageManagement/PackageManagement.md deleted file mode 100644 index 482b01c..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/PackageManagement.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -Download Help Link: https://aka.ms/powershell51-help -Help Version: 5.2.0.0 -Locale: en-US -Module Guid: 4ae9fd46-338a-459c-8186-07f910774cb8 -Module Name: PackageManagement -ms.date: 04/13/2023 -schema: 2.0.0 -title: PackageManagement ---- -# PackageManagement Module - -## Description - -This topic displays help topics for the Package Management Cmdlets. The cmdlet reference -documentation on this site documents the latest version of the module. - -This documentation cover version 1.0.0.1 of the **PackageManagement** module. - -> [!IMPORTANT] -> Windows PowerShell 5.1 comes with version 1.0.0.1 of **PackageManagement** 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. - -[!INCLUDE [nuget-module](../../includes/nuget-module.md)] - -## PackageManagement Cmdlets - -### [Find-Package](Find-Package.md) -Finds software packages in available package sources. - -### [Find-PackageProvider](Find-PackageProvider.md) -Returns a list of Package Management package providers available for installation. - -### [Get-Package](Get-Package.md) -Returns a list of all software packages that were installed with **PackageManagement**. - -### [Get-PackageProvider](Get-PackageProvider.md) -Returns a list of package providers that are connected to Package Management. - -### [Get-PackageSource](Get-PackageSource.md) -Gets a list of package sources that are registered for a package provider. - -### [Import-PackageProvider](Import-PackageProvider.md) -Adds Package Management package providers to the current session. - -### [Install-Package](Install-Package.md) -Installs one or more software packages. - -### [Install-PackageProvider](Install-PackageProvider.md) -Installs one or more Package Management package providers. - -### [Register-PackageSource](Register-PackageSource.md) -Adds a package source for a specified package provider. - -### [Save-Package](Save-Package.md) -Saves packages to the local computer without installing them. - -### [Set-PackageSource](Set-PackageSource.md) -Replaces a package source for a specified package provider. - -### [Uninstall-Package](Uninstall-Package.md) -Uninstalls one or more software packages. - -### [Unregister-PackageSource](Unregister-PackageSource.md) -Removes a registered package source. diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Register-PackageSource.md b/powershell-gallery/powershellget-1.x/PackageManagement/Register-PackageSource.md deleted file mode 100644 index bee181f..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Register-PackageSource.md +++ /dev/null @@ -1,375 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 04/01/2019 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/register-packagesource?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Register-PackageSource ---- - -# Register-PackageSource - -## SYNOPSIS -Adds a package source for a specified package provider. - -## SYNTAX - -### SourceBySearch - -``` -Register-PackageSource [-Proxy ] [-ProxyCredential ] [[-Name] ] - [[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] - [-WhatIf] [-Confirm] [-ProviderName ] [] -``` - -### NuGet - -``` -Register-PackageSource [-Proxy ] [-ProxyCredential ] [[-Name] ] - [[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] - [-WhatIf] [-Confirm] [-ConfigFile ] [-SkipValidate] [] -``` - -### PowerShellGet - -``` -Register-PackageSource [-Proxy ] [-ProxyCredential ] [[-Name] ] - [[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] - [-WhatIf] [-Confirm] [-PackageManagementProvider ] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [] -``` - -## DESCRIPTION - -The `Register-PackageSource` cmdlet adds a package source for a specified package provider. Package -sources are always managed by a package provider. If the package provider cannot add or replace a -package source, the provider generates an error message. - -## EXAMPLES - -### Example 1: Register a package source for the NuGet provider - -This command registers a package source, a web-based location for the **NuGet** provider. By -default, sources aren't trusted. You are prompted to confirm the source is trusted before packages -are installed. To override the default, use the `-Trusted` parameter. - -```powershell -Register-PackageSource -Name MyNuGet -Location https://www.nuget.org/api/v2 -ProviderName NuGet -``` - -```Output -Name ProviderName IsTrusted Location ----- ------------ --------- -------- -MyNuGet NuGet False https://www.nuget.org/api/v2 -``` - -## PARAMETERS - -### -ConfigFile - -Specifies a configuration file. - -```yaml -Type: System.String -Parameter Sets: NuGet -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 authenticated location. - -```yaml -Type: System.Management.Automation.PSCredential -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: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ForceBootstrap - -Indicates that this cmdlet automatically installs the package provider. - -```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 -``` - -### -Location - -Specifies the package source location. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies the name of the package source to register. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PackageManagementProvider - -Specifies the Package Management provider. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProviderName - -Specifies the package provider's name. - -```yaml -Type: System.String -Parameter Sets: SourceBySearch -Aliases: Provider -Accepted values: Bootstrap, NuGet, PowerShellGet - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Proxy - -Specifies a proxy server for the request, rather than a direct connection to the internet resource. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PublishLocation - -Specifies the publish location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptPublishLocation - -Specifies the script publish location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptSourceLocation - -Specifies the script source location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipValidate - -Switch that skips validating the credentials of a package source. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Trusted - -Indicates that the package source is trusted. - -```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 -``` - -### -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 - -## OUTPUTS - -## 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 - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Get-PackageSource](Get-PackageSource.md) - -[Set-PackageSource](Set-PackageSource.md) - -[Unregister-PackageSource](Unregister-PackageSource.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Save-Package.md b/powershell-gallery/powershellget-1.x/PackageManagement/Save-Package.md deleted file mode 100644 index c998ae5..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Save-Package.md +++ /dev/null @@ -1,762 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 12/12/2022 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/save-package?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Save-Package ---- - -# Save-Package - -## SYNOPSIS -Saves packages to the local computer without installing them. - -## SYNTAX - -### PackageBySearch - -``` -Save-Package [-Name] [-RequiredVersion ] [-MinimumVersion ] - [-MaximumVersion ] [-Source ] [-Path ] [-LiteralPath ] - [-Credential ] [-Proxy ] [-ProxyCredential ] [-AllVersions] - [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-ProviderName ] [] -``` - -### PackageByInputObject - -``` -Save-Package [-Path ] [-LiteralPath ] -InputObject - [-Credential ] [-Proxy ] [-ProxyCredential ] [-AllVersions] - [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [] -``` - -### NuGet:PackageByInputObject - -``` -Save-Package [-Path ] [-LiteralPath ] [-Credential ] [-Proxy ] - [-ProxyCredential ] [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-ConfigFile ] [-SkipValidate] [-Headers ] [-FilterOnTag ] - [-Contains ] [-AllowPrereleaseVersions] [] -``` - -### NuGet - -``` -Save-Package [-Path ] [-LiteralPath ] [-Credential ] [-Proxy ] - [-ProxyCredential ] [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-ConfigFile ] [-SkipValidate] [-Headers ] [-FilterOnTag ] - [-Contains ] [-AllowPrereleaseVersions] [] -``` - -### PowerShellGet:PackageByInputObject - -``` -Save-Package [-Path ] [-LiteralPath ] [-Credential ] [-Proxy ] - [-ProxyCredential ] [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-AllowPrereleaseVersions] [-PackageManagementProvider ] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [-Type ] - [-Filter ] [-Tag ] [-Includes ] [-DscResource ] - [-RoleCapability ] [-Command ] [-AcceptLicense] [] -``` - -### PowerShellGet - -``` -Save-Package [-Path ] [-LiteralPath ] [-Credential ] [-Proxy ] - [-ProxyCredential ] [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-AllowPrereleaseVersions] [-PackageManagementProvider ] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [-Type ] [-Filter ] - [-Tag ] [-Includes ] [-DscResource ] [-RoleCapability ] - [-Command ] [-AcceptLicense] [] -``` - -## DESCRIPTION - -The `Save-Package` cmdlet saves packages to the local computer but doesn't install the packages. -This cmdlet saves the newest version of a package unless you specify a **RequiredVerion**. The -**Path** and **LiteralPath** parameters are mutually exclusive, and cannot be added to the same -command. - -## EXAMPLES - -### Example 1: Save a package to the local computer - -This example saves the newest version of the package to a directory on the local computer. The -package's dependencies are download with the package. - -``` -PS> Save-Package -Name NuGet.Core -ProviderName NuGet -Path C:\LocalPkg -``` - -```Output -Name Version Source Summary ----- ------- ------ ------- -Microsoft.Web.Xdt 3.0.0 Nuget Microsoft Xml Document Transformation (XDT) enables... -NuGet.Core 2.14.0 Nuget NuGet.Core is the core framework assembly for NuGet... -``` - -`Save-Package` uses the **Name** parameter to specify the package. The package is downloaded from -the repository specified by the **ProviderName** parameter. The **Path** parameter determines where -the package is saved. - -### Example 2: Save a specific package version - -This example specifies the package version and saves it to a directory on the local computer. - -``` -PS> Save-Package -Name NuGet.Core -RequiredVersion 2.9.0 -ProviderName NuGet -Path C:\LocalPkg -``` - -```Output -Name Version Source Summary ----- ------- ------ ------- -Microsoft.Web.Xdt 3.0.0 Nuget Microsoft Xml Document Transformation (XDT) enables... -NuGet.Core 2.9.0 Nuget NuGet.Core is the core framework assembly for NuGet... -``` - -`Save-Package` uses the **Name** parameter to specify the package. **RequiredVersion** indicates a -specific package version. The package is downloaded from the repository specified by the -**ProviderName** parameter. The **Path** parameter determines where the package is saved. - -### Example 3: Use Find-Package to save a package - -This command uses `Find-Package` to locate the newest version of the package and sends the object to -`Save-Package`. - -``` -PS> Find-Package -Name NuGet.Core -ProviderName NuGet | Save-Package -Path C:\LocalPkg -``` - -`Find-Package` uses the **Name** parameter to specify the package. The package is downloaded from -the repository specified by the **ProviderName** parameter. The object is sent down the pipeline to -`Save-Package`. The **Path** parameter determines where the package is saved. - -### Example 4: Save and install the package - -The newest version of the package and its dependencies are downloaded and installed on the local -computer. - -``` -PS> Save-Package -Name NuGet.Core -ProviderName NuGet -Path C:\LocalPkg -PS> Install-Package C:\LocalPkg\NuGet.Core.2.14.0.nupkg -``` - -`Save-Package` downloads the package file and its dependencies to the local computer. -`Install-Package` installs the package and dependencies from the specified directory. - -## PARAMETERS - -### -AcceptLicense - -Automatically accept the license agreement during installation if the package requires it. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowPrereleaseVersions - -Allows packages marked as Prerelease to be saved. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet:PackageByInputObject, NuGet, PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllVersions - -Indicates that this cmdlet saves all available versions of the package. - -```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 -``` - -### -Command - -Specifies one or more commands included in the package. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ConfigFile - -Specifies a configuration File. - -```yaml -Type: System.String -Parameter Sets: NuGet:PackageByInputObject, NuGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Contains - -`Save-Package` gets objects if any item in the object's property values are an exact match for the -specified value. - -```yaml -Type: System.String -Parameter Sets: NuGet:PackageByInputObject, NuGet -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 package from 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: False -Accept wildcard characters: False -``` - -### -DscResource - -Specifies one or more Desired State Configuration (DSC) resources for the package. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies a filter for the package. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FilterOnTag - -Specifies the tag that filters the results. Results that don't contain the specified tag are excluded. - -```yaml -Type: System.String[] -Parameter Sets: NuGet:PackageByInputObject, NuGet -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: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ForceBootstrap - -Indicates that `Save-Package` forces **PackageManagement** to automatically install the package -provider for the specified package. - -```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 -``` - -### -Headers - -Specifies the headers for the package. - -```yaml -Type: System.String[] -Parameter Sets: NuGet:PackageByInputObject, NuGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Includes - -Indicates the resources that the package includes. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: -Accepted values: DscResource, Cmdlet, Function, Workflow, RoleCapability - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject - -A software ID object that represents the package that you want to save. Software IDs are part of the -results of the `Find-Package` cmdlet. - -```yaml -Type: Microsoft.PackageManagement.Packaging.SoftwareIdentity -Parameter Sets: PackageByInputObject -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -LiteralPath - -Specifies the literal path to which you want to save the package. You cannot add both this parameter -and the **Path** parameter to the same command. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -Specifies the maximum version of the package that you want to save. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of the package that you want to find. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies one or more package names. - -```yaml -Type: System.String[] -Parameter Sets: PackageBySearch -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PackageManagementProvider - -Specifies a package management provider. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Path - -Specifies the location on the local computer to store the package. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProviderName - -Specifies one or more provider names. - -```yaml -Type: System.String[] -Parameter Sets: PackageBySearch -Aliases: Provider -Accepted values: Bootstrap, NuGet, PowerShellGet - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Proxy - -Specifies a proxy server for the request, rather than a direct connection to the internet resource. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PublishLocation - -Specifies the publish location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredVersion - -Specifies the exact version of the package to save. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RoleCapability - -Specifies an array of role capabilities. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptPublishLocation - -Specifies the script publish location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptSourceLocation - -Specifies the script source location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipValidate - -Switch that skips validating the credentials of a package. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet:PackageByInputObject, NuGet -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Source - -Specifies one or more package sources. - -```yaml -Type: System.String[] -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Tag - -Specifies a tag to search for within the package metadata. - -```yaml -Type: System.String[] -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -Specifies whether to search for packages with a module, a script, or either. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet -Aliases: -Accepted values: Module, Script, All - -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 - -### Microsoft.PackageManagement.Packaging.SoftwareIdentity - -You can pipe a **SoftwareIdentity** object to this cmdlet. - -## OUTPUTS - -### None - -This cmdlet returns no output. - -## 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 - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Get-Package](Get-Package.md) - -[Install-Package](Install-Package.md) - -[Save-Package](Save-Package.md) - -[Uninstall-Package](Uninstall-Package.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Set-PackageSource.md b/powershell-gallery/powershellget-1.x/PackageManagement/Set-PackageSource.md deleted file mode 100644 index 7b006fd..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Set-PackageSource.md +++ /dev/null @@ -1,453 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 12/12/2022 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/set-packagesource?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Set-PackageSource ---- - -# Set-PackageSource - -## SYNOPSIS -Replaces a package source for a specified package provider. - -## SYNTAX - -### SourceBySearch (Default) - -``` -Set-PackageSource [-Proxy ] [-ProxyCredential ] [-Credential ] - [[-Name] ] [-Location ] [-NewLocation ] [-NewName ] [-Trusted] - [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-ProviderName ] [] -``` - -### SourceByInputObject - -``` -Set-PackageSource [-Proxy ] [-ProxyCredential ] [-Credential ] - [-NewLocation ] [-NewName ] [-Trusted] -InputObject [-Force] - [-ForceBootstrap] [-WhatIf] [-Confirm] [] -``` - -### NuGet:SourceByInputObject - -``` -Set-PackageSource [-Proxy ] [-ProxyCredential ] [-Credential ] - [-NewLocation ] [-NewName ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] - [-Confirm] [-ConfigFile ] [-SkipValidate] [] -``` - -### NuGet:SourceBySearch - -``` -Set-PackageSource [-Proxy ] [-ProxyCredential ] [-Credential ] - [-NewLocation ] [-NewName ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] - [-Confirm] [-ConfigFile ] [-SkipValidate] [] -``` - -### PowerShellGet:SourceByInputObject - -``` -Set-PackageSource [-Proxy ] [-ProxyCredential ] [-Credential ] - [-NewLocation ] [-NewName ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] - [-Confirm] [-PackageManagementProvider ] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [] -``` - -### PowerShellGet:SourceBySearch - -``` -Set-PackageSource [-Proxy ] [-ProxyCredential ] [-Credential ] - [-NewLocation ] [-NewName ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] - [-Confirm] [-PackageManagementProvider ] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [] -``` - -## DESCRIPTION - -The `Set-PackageSource` replaces a package source for a specified package provider. Package sources -are always managed by a package provider. - -## EXAMPLES - -### Example 1: Change a package source - -This command changes the existing name of a package source. The source is set to **Trusted**, which -eliminates prompts to verify the source when packages are installed. - -``` -PS C:\> Set-PackageSource -Name MyNuget -NewName NewNuGet -Trusted -ProviderName NuGet -``` - -## PARAMETERS - -### -ConfigFile - -Specifies a configuration file. - -```yaml -Type: System.String -Parameter Sets: NuGet:SourceByInputObject, NuGet:SourceBySearch -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 install package providers. - -```yaml -Type: System.Management.Automation.PSCredential -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: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ForceBootstrap - -Indicates that `Set-PackageSource` forces **PackageManagement** to automatically install the package -provider. - -```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 -``` - -### -InputObject - -Specifies a package source ID object that represents the package that you want to change. Package -source IDs are part of the results of the `Get-PackageSource` cmdlet. - -```yaml -Type: Microsoft.PackageManagement.Packaging.PackageSource -Parameter Sets: SourceByInputObject -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Location - -Specifies the current package source location. The value can be a URI, a file path, or any other -destination format supported by the package provider. - -```yaml -Type: System.String -Parameter Sets: SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies a package source's name. - -```yaml -Type: System.String -Parameter Sets: SourceBySearch -Aliases: SourceName - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NewLocation - -Specifies the new location for a package source. The value can be a URI, a file path, or any other -destination format supported by the package provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NewName - -Specifies the new name you assign to a package source. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PackageManagementProvider - -Specifies a package management provider. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:SourceByInputObject, PowerShellGet:SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProviderName - -Specifies a provider name. - -```yaml -Type: System.String -Parameter Sets: SourceBySearch -Aliases: Provider -Accepted values: Bootstrap, NuGet, PowerShellGet - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Proxy - -Specifies a proxy server for the request, rather than connecting directly to the Internet resource. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PublishLocation - -Specifies the publish location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:SourceByInputObject, PowerShellGet:SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptPublishLocation - -Specifies the script publish location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:SourceByInputObject, PowerShellGet:SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptSourceLocation - -Specifies the script source location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:SourceByInputObject, PowerShellGet:SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipValidate - -Switch that skips validating the credentials of a package source. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet:SourceByInputObject, NuGet:SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Trusted - -Indicates that the source is a trusted package provider. Trusted sources don't prompt for -verification to install packages. - -```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 -``` - -### -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 - -### None - -You can't pipe objects to this cmdlet. - -## OUTPUTS - -### None - -This cmdlet returns no output. - -## 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 - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Get-PackageSource](Get-PackageSource.md) - -[Register-PackageSource](Register-PackageSource.md) - -[Unregister-PackageSource](Unregister-PackageSource.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Uninstall-Package.md b/powershell-gallery/powershellget-1.x/PackageManagement/Uninstall-Package.md deleted file mode 100644 index 5df8fc4..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Uninstall-Package.md +++ /dev/null @@ -1,592 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 12/12/2022 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/uninstall-package?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Uninstall-Package ---- - -# Uninstall-Package - -## SYNOPSIS -Uninstalls one or more software packages. - -## SYNTAX - -### PackageByInputObject - -``` -Uninstall-Package [-InputObject] [-AllVersions] [-Force] [-ForceBootstrap] - [-WhatIf] [-Confirm] [] -``` - -### PackageBySearch - -``` -Uninstall-Package [-Name] [-RequiredVersion ] [-MinimumVersion ] - [-MaximumVersion ] [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-ProviderName ] [] -``` - -### Programs:PackageByInputObject - -``` -Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-IncludeWindowsInstaller] [-IncludeSystemComponent] [] -``` - -### Programs:PackageBySearch - -``` -Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-IncludeWindowsInstaller] [-IncludeSystemComponent] [] -``` - -### msi:PackageByInputObject - -``` -Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-AdditionalArguments ] [] -``` - -### msi:PackageBySearch - -``` -Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-AdditionalArguments ] [] -``` - -### NuGet:PackageByInputObject - -``` -Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-Destination ] [-ExcludeVersion] [-Scope ] [-SkipDependencies] - [] -``` - -### NuGet:PackageBySearch - -``` -Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-Destination ] [-ExcludeVersion] [-Scope ] [-SkipDependencies] - [] -``` - -### PowerShellGet:PackageByInputObject - -``` -Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-Scope ] - [-PackageManagementProvider ] [-Type ] [-AllowClobber] [-SkipPublisherCheck] - [-InstallUpdate] [-NoPathUpdate] [-AllowPrereleaseVersions] [] -``` - -### PowerShellGet:PackageBySearch - -``` -Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-Scope ] - [-PackageManagementProvider ] [-Type ] [-AllowClobber] [-SkipPublisherCheck] - [-InstallUpdate] [-NoPathUpdate] [-AllowPrereleaseVersions] [] -``` - -## DESCRIPTION - -The `Uninstall-Package` cmdlet uninstalls one or more software packages from the local computer. To -find installed packages, use the `Get-Package` cmdlet. - -[!INCLUDE [nuget-module](../../includes/nuget-module.md)] - -## EXAMPLES - -### Example 1: Uninstall a package - -The `Uninstall-Package` cmdlet uninstalls packages. The **Name** parameter specifies the package to -uninstall. If multiple versions of a package are installed, the newest version is uninstalled. - -``` -PS> Uninstall-Package -Name NuGet.Core -``` - -### Example 2: Use the pipeline to uninstall a package - -`Get-Package` locates a specific package and sends the **SoftwareIdentity** object down the pipeline -to the `Uninstall-Package` cmdlet. - -``` -PS> Get-Package -Name NuGet.Core -RequiredVersion 2.14.0 | Uninstall-Package -``` - -The `Get-Package` cmdlet uses the **Name** and **RequiredVersion** parameters to specify a package. -A **SoftwareIdentity** object is sent down the pipeline. The `Uninstall-Package` cmdlet receives the -object as an **InputObject** and removes the package. - -As an alternative, the `Uninstall-Package` cmdlet can specify a value for the **InputObject** -parameter: - -`Uninstall-Package -InputObject ( Get-Package -Name NuGet.Core -RequiredVersion 2.14.0 )` - -## PARAMETERS - -### -AdditionalArguments - -Specifies additional arguments. - -```yaml -Type: System.String[] -Parameter Sets: msi:PackageByInputObject, msi:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowClobber - -Overrides warning messages about conflicts with existing commands. Overwrites existing commands that -have the same name as commands being installed. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowPrereleaseVersions - -Allows packages marked as prerelease to be uninstalled. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllVersions - -Indicates that this cmdlet uninstalls all versions of the package. - -```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 -``` - -### -Destination - -Specifies a string of the path to the input object. - -```yaml -Type: System.String -Parameter Sets: NuGet:PackageByInputObject, NuGet:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExcludeVersion - -Switch to exclude the version number in the folder path. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet:PackageByInputObject, NuGet:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: False -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: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ForceBootstrap - -Forces **PackageManagement** to automatically install the package provider for the specified -package. - -```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 -``` - -### -IncludeSystemComponent - -Specifies that this cmdlet uninstalls system components. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: Programs:PackageByInputObject, Programs:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IncludeWindowsInstaller - -Indicates that this cmdlet uninstalls the package through Windows Installer. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: Programs:PackageByInputObject, Programs:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject - -Accepts pipeline input that specifies the package's **SoftwareIdentity** object from the -`Get-Package` cmdlet. **InputObject** accepts the **SoftwareIdentity** object as a `Get-Package` -value or a variable that contains the object. - -```yaml -Type: Microsoft.PackageManagement.Packaging.SoftwareIdentity[] -Parameter Sets: PackageByInputObject -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -InstallUpdate - -Indicates that `Uninstall-Package` uninstalls updates. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -Specifies the maximum allowed package version that you want to uninstall. If you don't specify this -parameter, `Uninstall-Package` uninstalls the package's newest version. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum allowed package version that you want to uninstall. If you don't add this -parameter, `Uninstall-Package` uninstalls the package's newest version that satisfies any version -specified by the **MaximumVersion** parameter. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies one or more package names. Multiple package names must be separated by commas. - -```yaml -Type: System.String[] -Parameter Sets: PackageBySearch -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NoPathUpdate - -**NoPathUpdate** only applies to the `Install-Script` cmdlet. **NoPathUpdate** is a dynamic -parameter added by the provider and isn't supported by `Uninstall-Package`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PackageManagementProvider - -Specifies the **PackageManagement** provider. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProviderName - -Specifies one or more package provider names to search for packages. You can get package provider -names by running the `Get-PackageProvider` cmdlet. - -```yaml -Type: System.String[] -Parameter Sets: PackageBySearch -Aliases: Provider -Accepted values: Bootstrap, NuGet, PowerShellGet - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequiredVersion - -Specifies the exact allowed version of the package that you want to uninstall. If you don't add this -parameter, `Uninstall-Package` uninstalls the package's newest version that satisfies any version -specified by the **MaximumVersion** parameter. - -```yaml -Type: System.String -Parameter Sets: PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Scope - -Specifies the scope for which to uninstall the package. The acceptable values for this parameter are -as follows: - -- CurrentUser -- AllUsers - -```yaml -Type: System.String -Parameter Sets: NuGet:PackageByInputObject, NuGet:PackageBySearch, PowerShellGet:PackageByInputObject, PowerShellGet:PackageBySearch -Aliases: -Accepted values: CurrentUser, AllUsers - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipDependencies - -Skips the uninstallation of software dependencies. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet:PackageByInputObject, NuGet:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipPublisherCheck - -Allows you to get a package version that is newer than your installed version. For example, an -installed package that is digitally signed by a trusted publisher but a new version isn't digitally -signed. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet:PackageBySearch -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -Specifies whether to search for packages with a module, a script, or both. The acceptable values for -this parameter are as follows: - -- Module -- Script -- All - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:PackageByInputObject, PowerShellGet:PackageBySearch -Aliases: -Accepted values: Module, Script, All - -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 `Uninstall-Package` cmdlet is 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 - -### Microsoft.PackageManagement.Packaging.SoftwareIdentity - -You can pipe **SoftwareIdentity** objects to this cmdlet. - -## OUTPUTS - -### Microsoft.PackageManagement.Packaging.SoftwareIdentity - -This cmdlet returns a **SoftwareIdentity** object for each package uninstalled. - -## NOTES - -Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic -parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets -and includes the provider's parameter set. For example, `Uninstall-Package` has the -**PowerShellGet** parameter set that includes `-NoPathUpdate`, `AllowClobber`, and -`SkipPublisherCheck`. - -## RELATED LINKS - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Find-Package](Find-Package.md) - -[Get-Package](Get-Package.md) - -[Install-Package](Install-Package.md) - -[Save-Package](Save-Package.md) diff --git a/powershell-gallery/powershellget-1.x/PackageManagement/Unregister-PackageSource.md b/powershell-gallery/powershellget-1.x/PackageManagement/Unregister-PackageSource.md deleted file mode 100644 index 1664500..0000000 --- a/powershell-gallery/powershellget-1.x/PackageManagement/Unregister-PackageSource.md +++ /dev/null @@ -1,385 +0,0 @@ ---- -external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml -Locale: en-US -Module Name: PackageManagement -ms.date: 12/12/2022 -online version: https://learn.microsoft.com/powershell/module/packagemanagement/unregister-packagesource?view=powershellget-1.x&WT.mc_id=ps-gethelp -schema: 2.0.0 -title: Unregister-PackageSource ---- - -# Unregister-PackageSource - -## SYNOPSIS -Removes a registered package source. - -## SYNTAX - -### SourceBySearch - -``` -Unregister-PackageSource [[-Source] ] [-Location ] [-Credential ] - [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-ProviderName ] [] -``` - -### SourceByInputObject - -``` -Unregister-PackageSource -InputObject [-Credential ] [-Force] - [-ForceBootstrap] [-WhatIf] [-Confirm] [] -``` - -### NuGet:SourceByInputObject - -``` -Unregister-PackageSource [-Credential ] [-Force] [-ForceBootstrap] [-WhatIf] - [-Confirm] [-ConfigFile ] [-SkipValidate] [] -``` - -### NuGet:SourceBySearch - -``` -Unregister-PackageSource [-Credential ] [-Force] [-ForceBootstrap] [-WhatIf] - [-Confirm] [-ConfigFile ] [-SkipValidate] [] -``` - -### PowerShellGet:SourceByInputObject - -``` -Unregister-PackageSource [-Credential ] [-Force] [-ForceBootstrap] [-WhatIf] - [-Confirm] [-PackageManagementProvider ] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [] -``` - -### PowerShellGet:SourceBySearch - -``` -Unregister-PackageSource [-Credential ] [-Force] [-ForceBootstrap] [-WhatIf] - [-Confirm] [-PackageManagementProvider ] [-PublishLocation ] - [-ScriptSourceLocation ] [-ScriptPublishLocation ] [] -``` - -## DESCRIPTION - -The `Unregister-PackageSource` cmdlet removes a registered package source. Package sources are -always managed by a package provider. To find package sources, use the `Get-PackageSource` cmdlet. - -## EXAMPLES - -### Example 1: Unregister a package source for the NuGet provider - -The `Unregister-PackageSource` cmdlet unregisters a package source from the local computer. The -**Location** and **Provider** parameters can be used to further specify the source to remove. - -``` -PS> Unregister-PackageSource -Source MyNuGet -``` - -The `Unregister-PackageSource` cmdlet uses the **Source** parameter to specify which source to -remove. - -### Example 2: Use a PackageSource object to unregister a package - -This example uses the `Get-PackageSource` and `Unregister-PackageSource` to unregister a package -source. The **PackageSource** object is stored in a variable. - -``` -PS> $pkgsource = Get-PackageSource -Name MyNuGet -PS> Unregister-PackageSource -InputObject $pkgsource -``` - -The `$pkgsource` variable stores the **PackageSource** created by the `Get-PackageSource` cmdlet. -`Unregister-PackageSource` uses the `$pkgsource` as input to the **InputObject** parameter. - -As an alternative, the `Unregister-PackageSource` cmdlet can specify a value for the **InputObject** -parameter: - -`Unregister-PackageSource -InputObject ( Get-PackageSource -Name MyNuGet )` - -## PARAMETERS - -### -ConfigFile - -Specifies a configuration file. - -```yaml -Type: System.String -Parameter Sets: NuGet:SourceByInputObject, NuGet:SourceBySearch -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 computer and run commands. Type a user -name, such as **User01**, **Domain01\User01**, or enter a **PSCredential** object, generated by the -`Get-Credential` cmdlet. If you type a user name, you're prompted for a password. - -When the **Credential** parameter isn't specified, the current user account is used. - -```yaml -Type: System.Management.Automation.PSCredential -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. Overrides restrictions that prevent -`Unregister-PackageSource` from succeeding, with the exception of security. - -```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 -``` - -### -ForceBootstrap - -Indicates that `Unregister-PackageSource` forces **PackageManagement** to automatically uninstall -the package provider for the specified package source. - -```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 -``` - -### -InputObject - -Accepts pipeline input that specifies the **PackageSource** object from the `Get-PackageSource` -cmdlet. **InputObject** accepts the **PackageSource** object as a `Get-PackageSource` value or a -variable that contains the object. - -```yaml -Type: Microsoft.PackageManagement.Packaging.PackageSource[] -Parameter Sets: SourceByInputObject -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Location - -Specifies the location to which a package source points. The value of this parameter can be a URI, a -file path, or any other destination format that is supported by the package provider. - -```yaml -Type: System.String -Parameter Sets: SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PackageManagementProvider - -Specifies the **PackageManagement** provider. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:SourceByInputObject, PowerShellGet:SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProviderName - -Specifies the provider name. - -```yaml -Type: System.String -Parameter Sets: SourceBySearch -Aliases: Provider -Accepted values: Bootstrap, NuGet, PowerShellGet - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PublishLocation - -Specifies the publish location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:SourceByInputObject, PowerShellGet:SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptPublishLocation - -Specifies the script publish location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:SourceByInputObject, PowerShellGet:SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptSourceLocation - -Specifies the script source location. - -```yaml -Type: System.String -Parameter Sets: PowerShellGet:SourceByInputObject, PowerShellGet:SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipValidate - -Switch that skips validating the credentials of a package source. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: NuGet:SourceByInputObject, NuGet:SourceBySearch -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Source - -Specifies the friendly name of the package source. - -```yaml -Type: System.String -Parameter Sets: SourceBySearch -Aliases: Name - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm - -Prompts you for confirmation before `Unregister-PackageSource` is run. - -```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 `Unregister-PackageSource` cmdlet is 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 - -### Microsoft.PackageManagement.Packaging.PackageSource - -You can pipe a **PackageSource** object to this cmdlet - -## OUTPUTS - -### None - -This cmdlet returns no output. - -## NOTES - -Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic -parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets -and includes the provider's parameter set. - -## RELATED LINKS - -[about_PackageManagement](/powershell/module/Microsoft.PowerShell.Core/About/about_PackageManagement) - -[Get-Credential](xref:Microsoft.PowerShell.Security.Get-Credential) - -[Get-PackageSource](Get-PackageSource.md) - -[Register-PackageSource](Register-PackageSource.md) - -[Set-PackageSource](Set-PackageSource.md) diff --git a/powershell-gallery/powershellget-1.x/PowerShellGet/Find-Command.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Find-Command.md deleted file mode 100644 index 58ff3e6..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Find-Command.md +++ /dev/null @@ -1,351 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 10/04/2021 -online version: https://learn.microsoft.com/powershell/module/powershellget/find-command?view=powershellget-1.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] [-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. - -For each command found by `Find-Command`, a **PSGetCommandInfo** object is returned. The -**PSGetCommandInfo** object can be sent down the pipeline to the `Install-Module` cmdlet. -`Install-Module` installs the module that contains the command. - -## EXAMPLES - -### Example 1: Find all commands in a specified repository - -The `Find-Command` cmdlet searches a registered repository for modules. - -```powershell -Find-Command -Repository PSGallery | Select-Object -First 10 -``` - -```output -Name Version ModuleName Repository ----- ------- ---------- ---------- -Disable-AzureRmDataCollection 5.8.3 AzureRM.profile PSGallery -Disable-AzureRmContextAutosave 5.8.3 AzureRM.profile PSGallery -Enable-AzureRmDataCollection 5.8.3 AzureRM.profile PSGallery -Enable-AzureRmContextAutosave 5.8.3 AzureRM.profile PSGallery -Remove-AzureRmEnvironment 5.8.3 AzureRM.profile PSGallery -Get-AzureRmEnvironment 5.8.3 AzureRM.profile PSGallery -Set-AzureRmEnvironment 5.8.3 AzureRM.profile PSGallery -Add-AzureRmEnvironment 5.8.3 AzureRM.profile PSGallery -Get-AzureRmSubscription 5.8.3 AzureRM.profile PSGallery -Connect-AzureRmAccount 5.8.3 AzureRM.profile PSGallery -``` - -`Find-Command` uses the **Repository** parameter to specify a registered repository's name. The -objects are sent down the pipeline. `Select-Object` receives the objects and uses the **First** -parameter to display the first 10 results. - -### Example 2: 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 3: 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 -PS> Find-Command -Name Get-TargetResource -Repository PSGallery -ModuleName SystemLocaleDsc | - Install-Module - -PS> Get-InstalledModule - -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 4: Find a command and save its module - -``` -PS> Find-Command -Name Invoke-ScriptAnalyzer -Repository PSGallery | Save-Module -Path C:\Test\Modules -Verbose - -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 - -### -AllVersions - -Indicates that this cmdlet gets all versions of a 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 -``` - -### -Filter - -Finds modules based on the **PackageManagement** provider's search syntax. For example, specify -words to search for within the **ModuleName** and **Description** properties. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -Specifies the maximum version of the module to include in results. The **MaximumVersion** and the -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of the module to include in results. The **MinimumVersion** and the -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName - -Specifies the name of a module to search for commands. The default is all modules. - -```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. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -Specifies a proxy server for the request, rather than a direct connection to the internet resource. - -```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 - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```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 - -Specifies the version of the module to include in the results. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag - -Specifies tags that categorize modules in a repository. Use commas to separate 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.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### PSCustomObject[] - -`Find-Command` outputs a **PSCustomObject** 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 - -[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-1.x/PowerShellGet/Find-DscResource.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Find-DscResource.md deleted file mode 100644 index 52c231c..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Find-DscResource.md +++ /dev/null @@ -1,388 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 06/04/2019 -online version: https://learn.microsoft.com/powershell/module/powershellget/find-dscresource?view=powershellget-1.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] [-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. - -For each module found by `Find-DscResource`, a **PSGetDscResourceInfo** object is returned. -**PSGetDscResourceInfo** objects can be sent down the pipeline to the `Install-Module` cmdlet. -`Install-Module` installs the module. - -## EXAMPLES - -### Example 1: Find all DSC resources - -`Find-DscResource` returns DSC resources from registered repositories. To search a specific -repository, use the **Repository** parameter. - -```powershell -Find-DscResource -``` - -```Output -Name Version ModuleName Repository ----- ------- ---------- ---------- -Carbon_Privilege 2.8.1 Carbon PSGallery -Carbon_ScheduledTask 2.8.1 Carbon PSGallery -Carbon_Service 2.8.1 Carbon PSGallery -PackageManagement 1.4 PackageManagement PSGallery -PackageManagementSource 1.4 PackageManagement PSGallery -PSModule 2.1.4 PowerShellGet PSGallery -PSRepository 2.1.4 PowerShellGet PSGallery -xArchive 8.7.0.0 xPSDesiredStateConfiguration PSGallery -xDSCWebService 8.7.0.0 xPSDesiredStateConfiguration PSGallery -xEnvironment 8.7.0.0 xPSDesiredStateConfiguration PSGallery -``` - -### Example 2: 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 3: 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. - -### Example 4: Find all DSC resources in a module - -`Find-DscResource` finds all the DSC resources contained in a specified module. By default, the -current version is displayed. To display other versions, use the **AllVersions** or -**RequiredVersions** parameters. - -```powershell -Find-DscResource -ModuleName xWebAdministration -``` - -```Output -Name Version ModuleName Repository ----- ------- ---------- ---------- -WebApplicationHandler 2.6.0.0 xWebAdministration PSGallery -xIisFeatureDelegation 2.6.0.0 xWebAdministration PSGallery -xIisHandler 2.6.0.0 xWebAdministration PSGallery -xIisLogging 2.6.0.0 xWebAdministration PSGallery -``` - -`Find-DscResource` uses the **ModuleName** parameter to specify the **xWebAdministration** and find -the DSC resources contained in the module. The current version of each resource is displayed. - -### Example 5: Find a DSC resource by tag and required version - -DSC resources can be located using the parameters **Tag** and **RequiredVersion**. **Tag** displays -the current version of every resource that contains the specified tag in the repository. -**RequiredVersion** needs the **ModuleName** parameter and the **Name** parameter is optional. The -**Name** and **ModuleName** parameters limit the output. Use the **AllVersions** parameter to -display a DSC resource's available versions. - -```powershell -Find-DscResource -ModuleName xWebAdministration -Tag DSC -RequiredVersion 1.20 -``` - -```output -Name Version ModuleName Repository ----- ------- ---------- ---------- -xIisFeatureDelegation 1.20.0.0 xWebAdministration PSGallery -xIisHandler 1.20.0.0 xWebAdministration PSGallery -xIisLogging 1.20.0.0 xWebAdministration PSGallery -xIisMimeTypeMapping 1.20.0.0 xWebAdministration PSGallery -``` - -### Example 6: Find a resource by using a filter - -`Find-DscResource` finds all resources and uses the **Filter** parameter to specify the results by -**Domain**. The **Filter** parameter finds the filter value in the object's description or module -name. Use the `Select-Object` cmdlet to view an object's properties. - -```powershell -Find-DscResource -Filter Domain -``` - -```output -Name Version ModuleName Repository ----- ------- ---------- --------- -xComputer 4.1.0.0 xComputerManagement PSGallery -Computer 6.4.0.0 ComputerManagementDsc PSGallery -xDSCDomainjoin 1.1 xDSCDomainjoin PSGallery -xDisk 1.0 xDisk PSGallery -xDSCFirewall 1.6.21 xDSCFirewall PSGallery -dmAwsTagInstance 1.0.1 domainAwsDSCResources PSGallery -``` - -## PARAMETERS - -### -AllVersions - -The **AllVersions** parameter displays each of a DSC resource's available versions. You can't use -the **AllVersions** parameter with the **MinimumVersion**, **MaximumVersion**, or -**RequiredVersion** parameters. - -```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 - -Finds resources based on the **PackageManagement** provider's search syntax. For example, specify -words to search for within the **ModuleName** and **Description** properties. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -Specifies the maximum version of the resource to include in results. The **MaximumVersion** and the -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of the resource to include in results. The **MinimumVersion** and the -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName - -Specifies a module that contains the DSC resource. - -```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. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -Specifies a proxy server for the request, rather than a direct connection to the internet resource. - -```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 - -Specifies a user account with permission to use the proxy server specified in the **Proxy** -parameter. - -```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 - -Specifies the module's exact version number to include in the results. The **RequiredVersion** and -the **MinimumVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag - -Specifies tags that categorize modules in a repository. Use commas to separate 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.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### PSCustomObject[] - -`Find-DscResource` returns a **PSCustomObject** 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 - -[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-1.x/PowerShellGet/Find-Module.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Find-Module.md deleted file mode 100644 index 2bca2ce..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Find-Module.md +++ /dev/null @@ -1,580 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 01/17/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/find-module?view=powershellget-1.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 ] [] -``` - -## 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`. - -The first time `Find-Module` attempts to use a repository, you might be prompted to install updates. -If the repository source is not registered with `Register-PSRepository` cmdlet, an error is -returned. - -`Find-Module` returns the newest version of a module if no parameters are used that limit the -version. To get a repository's list of a module's versions, use the parameter **AllVersions**. - -If the **MinimumVersion** parameter is specified, `Find-Module` returns the module's version that is -equal to or greater than the minimum. If there is a newer version available in the repository, the -newer version is returned. - -If the **MaximumVersion** parameter is specified, `Find-Module` returns the newest version of the -module that does not exceed the version specified. - -If the **RequiredVersion** parameter is specified, `Find-Module` only returns the module version -that is an exact match to the specified version. `Find-Module` searches through all available -modules, because name conflicts between sources can occur. - -The parameters that take module version numbers expect strings formatted as version numbers. - -- Standard version numbers have a format of `x.y.z` where x, y, and z are numbers -- Prerelease versions have a format of `x.y.z-` where the `` is - arbitrary string assigned to that release. - -The following examples use the [PowerShell Gallery](https://www.powershellgallery.com/) as the only -registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple -registered repositories, use the `-Repository` parameter to specify the repository's name. - -## 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. - -```powershell -Find-Module PSReadLine -RequiredVersion 2.2.6 -``` - -```Output -Version Name Repository Description -------- ---- ---------- ----------- -2.2.6 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 - -### -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. - -```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 - -Specifies an array of commands to find in modules. A command can be a function or workflow. - -```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 - -Specifies the name, or part of the name, of modules that contain DSC resources. Per PowerShell -conventions, performs an **OR** search when you provide multiple arguments. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies a filter based on the **PackageManagement** provider-specific search syntax. For NuGet -modules, this parameter is the equivalent of searching using the Search bar on the -[PowerShell Gallery](https://www.powershellgallery.com/) website. - -```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 - -Returns only those modules that include specific kinds of PowerShell functionality. For example, you -might only want to find modules that include **DSCResource**. The acceptable values for this -parameter are as follows: - -- Cmdlet -- DscResource -- Function -- RoleCapability - -```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 - -Specifies the maximum, or latest, version of the module to include in the search results. -**MaximumVersion** and **RequiredVersion** cannot be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of the module to include in results. **MinimumVersion** and -**RequiredVersion** cannot be used in the same command. - -```yaml -Type: System.Version -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 - -Specifies a proxy server for the request, rather than connecting directly to the Internet resource. - -```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 - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```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 - -Specifies the exact version number of the module to include in the results. **RequiredVersion** -cannot be used in the same command as **MinimumVersion** or **MaximumVersion**. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RoleCapability - -Specifies an array of role capabilities. - -```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.Version - -### System.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### PSCustomObject[] - -`Find-Module` creates **PSCustomObject** objects that can be sent down the pipeline to cmdlets -such as `Install-Module`. - -## NOTES - -Windows PowerShell includes the following aliases for `Find-Module`: - -- `fimo` - -> [!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 - -[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-1.x/PowerShellGet/Find-RoleCapability.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Find-RoleCapability.md deleted file mode 100644 index 9204220..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Find-RoleCapability.md +++ /dev/null @@ -1,358 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 10/04/2021 -online version: https://learn.microsoft.com/powershell/module/powershellget/find-rolecapability?view=powershellget-1.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 [[-Name] ] [-ModuleName ] [-MinimumVersion ] - [-MaximumVersion ] [-RequiredVersion ] [-AllVersions] [-Tag ] - [-Filter ] [-Proxy ] [-ProxyCredential ] [-Repository ] - [] -``` - -## DESCRIPTION - -The `Find-RoleCapability` cmdlet searches registered repositories to find PowerShell role -capabilities and modules. - -For each role capability found by `Find-RoleCapability`, a **PSGetRoleCapabilityInfo** object is -returned. **PSGetRoleCapabilityInfo** objects can be sent down the pipeline to the `Install-Module` -or `Save-Module` cmdlets. - -PowerShell role capabilities define which commands and applications are available to a user at a -Just Enough Administration (JEA) endpoint. Role capabilities are defined by files with a `.psrc` -extension. - -## EXAMPLES - -### Example 1: Find role capabilities - -`Find-RoleCapability` finds role capabilities in each registered repository. To search a specific -repository, use the **Repository** parameter. - -```powershell -Find-RoleCapability -``` - -```output -Name Version ModuleName Repository ----- ------- ---------- ---------- -General-Lev1 1.0 JeaExamples PSGallery -General-Lev2 1.0 JeaExamples PSGallery -IIS-Lev1 1.0 JeaExamples PSGallery -IIS-Lev2 1.0 JeaExamples PSGallery -``` - -### Example 2: Find role capabilities by name - -`Find-RoleCapability` finds role capabilities by name. Use commas to separate an array of names. - -```powershell -Find-RoleCapability -Name General-Lev1, IIS-Lev2 -``` - -```output -Name Version ModuleName Repository ----- ------- ---------- ---------- -General-Lev1 1.0 JeaExamples PSGallery -IIS-Lev2 1.0 JeaExamples PSGallery -``` - -### Example 3: Find and save a role capability's module - -The `Find-RoleCapability` cmdlet finds a role capability and sends the object down the pipeline. -`Save-Module` saves the role capability's module to a file system. `Get-ChildItem` displays the -contents of the module's directory. - -``` -PS> Find-RoleCapability -Name General-Lev1 | Save-Module -Path C:\Test\Modules - -PS> Get-ChildItem -Path C:\Test\Modules\JeaExamples\1.0\ - - Directory: C:\Test\Modules\JeaExamples\1.0 - -Mode LastWriteTime Length Name ----- ------------- ------ ---- -d----- 6/4/2019 16:37 RoleCapabilities --a---- 2/5/2019 18:46 1702 CreateRegisterPSSC.ps1 --a---- 2/5/2019 18:46 7656 JeaExamples.psd1 --a---- 10/1/2018 08:16 595 JeaExamples.psm1 -``` - -`Find-RoleCapability` uses the **Name** parameter to specify the **General-Lev1** role capability. -The object is sent down the pipeline. `Save-Module` uses the **Path** parameter for the file system -location to save the module. After the module is saved, `Get-ChildItem` specifies the module's -**Path** and displays the contents of the **JeaExamples** module's directory. - -### Example 4: Find and install a role capability's module - -`Find-RoleCapability` finds the module and sends the object down the pipeline. `Install-Module` -installs the module. After the installation, use `Get-InstalledModule` to see the results. - -```powershell -Find-RoleCapability -Name General-Lev1 | Install-Module -Verbose -``` - -```Output -VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/JeaExamples/1.0.0'. -VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/JeaExamples/1.0.0'. -VERBOSE: Completed downloading 'JeaExamples'. -VERBOSE: InstallPackageLocal' - name='JeaExamples', version='1.0', -VERBOSE: Validating the 'JeaExamples' module contents -VERBOSE: Test-ModuleManifest successfully validated the module manifest file -VERBOSE: Module 'JeaExamples' was installed successfully to path -``` - -```powershell -Get-InstalledModule -``` - -`Find-RoleCapability` uses the **Name** parameter to specify the **General-Lev1** role capability. -The object is sent down the pipeline. `Install-Module` uses the **Verbose** parameter to display -status messages during the installation. After the install is finished, the `Get-InstalledModule` -output confirms that the **JeaExamples** module was installed. - -## PARAMETERS - -### -AllVersions - -Indicates that this cmdlet gets all versions of a module. The **AllVersions** parameter displays -each of a module's available versions. - -```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 - -Finds resources based on the **PackageManagement** provider's search syntax. For example, specify -words to search for within the **ModuleName** and **Description** properties. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -Specifies the maximum version of the module to include in results. The **MaximumVersion** and the -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of the module to include in results. The **MinimumVersion** and the -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName - -Specifies the name of the module in which to search for role capabilities. The default is all -modules. - -```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 role capability. The default is all role capabilities. Use commas to -separate an array of resource names. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -Specifies a proxy server for the request, rather than a direct connection to the internet resource. - -```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 - -Specifies a user account with permission to use the proxy server specified in the **Proxy** -parameter. - -```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 role capabilities. 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 - -Specifies the module's exact version number to include in the results. The **RequiredVersion** and -the **MinimumVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag - -Specifies tags that categorize modules in a repository. Use commas to separate 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.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### PSCustomObject[] - -The `Find-RoleCapability` cmdlet returns a **PSCustomObject** 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 - -[Get-ChildItem](xref:Microsoft.PowerShell.Management.Get-ChildItem) - -[Get-InstalledModule](Get-InstalledModule.md) - -[Install-Module](Install-Module.md) - -[New-PSRoleCapabilityFile](xref:Microsoft.PowerShell.Core.New-PSRoleCapabilityFile) - -[Save-Module](Save-Module.md) diff --git a/powershell-gallery/powershellget-1.x/PowerShellGet/Find-Script.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Find-Script.md deleted file mode 100644 index 29c34ee..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Find-Script.md +++ /dev/null @@ -1,445 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 10/04/2021 -online version: https://learn.microsoft.com/powershell/module/powershellget/find-script?view=powershellget-1.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 ] - [] -``` - -## DESCRIPTION - -The `Find-Script` cmdlet finds a specified script in registered repositories. - -## EXAMPLES - -### Example 1: Find all available scripts - -```powershell -Find-Script -``` - -This command finds all available scripts. - -### Example 2: Find a script by name - -```powershell -Find-Script -Name "Start-WFContosoServer" -``` - -This command find the script named Start-WFContosoServer. - -### Example 3: 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 4: Find a script and format the output as a list - -```powershell -Find-Script -Name "Required-Script2" -RequiredVersion 2.0 -Repository "LocalRepo1" | Format-List * -Force -``` - -This command finds Required-Script2 in the LocalRepo1 repository, and then passes the resulting -**PSRepositoryItemInfo** object to the `Format-List` cmdlet. - -### Example 5: 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 6: 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 7: 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 8: 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 9: 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 10: Find scripts with workflows - -```powershell -Find-Script -Includes "Workflow" -Repository "LocalRepo1" -``` - -```Output -Version Name Type Repository Description -------- ---- ---- ---------- ----------- -2.5 Fabrikam-ClientScript Script LocalRepo1 Description for the Fabrikam-ClientScript script -1.0 Fabrikam-Script Script LocalRepo1 Description for the Fabrikam-Script script -``` - -This command finds workflow scripts in the LocalRepo1 repository. - -### Example 11: 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 - -### -AllVersions - -Indicates that this operation finds all script versions. - -```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 - -Specifies an array of commands to find in scripts. A command can be a function or workflow. - -```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 - -Finds scripts based on the **PackageManagement** provider-specific search syntax. - -```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 - -Specifies type of script to get. The acceptable values for this parameter are: -- `Function` -- `Workflow` - -```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 - -Specifies the maximum, or newest, version of the script to find. The **MaximumVersion** and -**RequiredVersion** parameters are mutually exclusive; you cannot use both parameters in the same -command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of the script to find. The **MinimumVersion** and **RequiredVersion** -parameters are mutually exclusive; you cannot use both parameters in the same command. - -```yaml -Type: System.Version -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 - -Specifies a proxy server for the request, rather than connecting directly to the Internet resource. - -```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 - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```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 - -Specifies the exact version number of the script to find. - -```yaml -Type: System.Version -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.Version - -### System.Uri - -### System.Management.Automation.PSCredential - -## OUTPUTS - -### PSCustomObject[] - -## 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 - -[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-1.x/PowerShellGet/Get-InstalledModule.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Get-InstalledModule.md deleted file mode 100644 index a92630d..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Get-InstalledModule.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 02/27/2020 -online version: https://learn.microsoft.com/powershell/module/powershellget/get-installedmodule?view=powershellget-1.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] [] -``` - -## 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. - -## 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 - -### -AllVersions - -Indicates that you want to get all available versions of a module. -You cannot use the **AllVersions** parameter with the **MinimumVersion**, **MaximumVersion**, or -**RequiredVersion** parameters. - -```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 - -Specifies the maximum, or newest, version of a module to get. The **MaximumVersion** and -**RequiredVersion** parameters are mutually exclusive; you cannot use both parameters in the same -command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of a single module to get. The **MinimumVersion** and -**RequiredVersion** parameters are mutually exclusive; you cannot use both parameters in the same -command. - -```yaml -Type: System.Version -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 - -Specifies the exact version of a module to get. - -```yaml -Type: System.Version -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.Version - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS diff --git a/powershell-gallery/powershellget-1.x/PowerShellGet/Get-InstalledScript.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Get-InstalledScript.md deleted file mode 100644 index 3e225d4..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Get-InstalledScript.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 10/04/2021 -online version: https://learn.microsoft.com/powershell/module/powershellget/get-installedscript?view=powershellget-1.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 ] [] -``` - -## DESCRIPTION - -The `Get-InstalledScript` cmdlet gets installed scripts for **CurrentUser** and **AllUsers** scopes. - -## 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 - -### -MaximumVersion - -Specifies the maximum, or latest, version of a script to get. The **MaximumVersion** and -**RequiredVersion** parameters are mutually exclusive; you cannot use both parameters in the same -command. - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of a script to get. The **MinimumVersion** and **RequiredVersion** -parameters are mutually exclusive; you cannot use both parameters in the same command. - -```yaml -Type: System.Version -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 - -Specifies the exact version of a script to get. - -```yaml -Type: System.Version -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.Version - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS - -[Install-Script](Install-Script.md) - -[Uninstall-Script](Uninstall-Script.md) diff --git a/powershell-gallery/powershellget-1.x/PowerShellGet/Get-PSRepository.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Get-PSRepository.md deleted file mode 100644 index 410d8d7..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Get-PSRepository.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 10/04/2021 -online version: https://learn.microsoft.com/powershell/module/powershellget/get-psrepository?view=powershellget-1.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. - -## 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-1.x/PowerShellGet/Install-Module.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Install-Module.md deleted file mode 100644 index 94f5c86..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Install-Module.md +++ /dev/null @@ -1,502 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 01/17/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/install-module?view=powershellget-1.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] [-WhatIf] [-Confirm] [] -``` - -### InputObject - -``` -Install-Module [-InputObject] [-Credential ] [-Scope ] - [-Proxy ] [-ProxyCredential ] [-AllowClobber] [-SkipPublisherCheck] [-Force] - [-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. - -If the module being installed has the same name or version, or contains commands in an existing -module, warning messages are displayed. After you confirm that you want to install the module and -override the warnings, use the `-Force` and `-AllowClobber` parameters. Dependent upon your -repository settings, you might need to answer a prompt for the module installation to continue. - -The parameters that take module version numbers expect strings formatted as version numbers. - -- Standard version numbers have a format of `x.y.z` where x, y, and z are numbers -- Prerelease versions have a format of `x.y.z-` where the `` is - arbitrary string assigned to that release. - -These examples use the [PowerShell Gallery](https://www.powershellgallery.com/) as the only -registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple -registered repositories, use the `-Repository` parameter to specify the repository's name. - -## 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\WindowsPowerShell\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\WindowsPowerShell\Modules`. - -## PARAMETERS - -### -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. - -```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 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 - -Installs a module and overrides warning messages about module installation conflicts. If a module -with the same name already exists on the computer, **Force** allows for multiple versions to be -installed. If there is an existing module with the same name and version, **Force** overwrites that -version. **Force** and **AllowClobber** can be used together in an `Install-Module` command. - -```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 - -Specifies the maximum version of a single module to install. The version installed must be less than -or equal to **MaximumVersion**. If you want to install multiple modules, you can't use -**MaximumVersion**. **MaximumVersion** and **RequiredVersion** can't be used in the same -`Install-Module` command. - -```yaml -Type: System.Version -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of a single module to install. The version installed must be greater than -or equal to **MinimumVersion**. If there is a newer version of the module available, the newer -version is installed. If you want to install multiple modules, you can't use **MinimumVersion**. -**MinimumVersion** and **RequiredVersion** can't be used in the same `Install-Module` command. - -```yaml -Type: System.Version -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 -``` - -### -Proxy - -Specifies a proxy server for the request, rather than connecting directly to the Internet resource. - -```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 - -Specifies a user account that has permission to use the proxy server that's specified by the -**Proxy** parameter. - -```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 the repository to download and -install a module from. 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 - -Specifies the exact version of a single module to install. If there is no match in the repository -for the specified version, an error is displayed. If you want to install multiple modules, you -can't use **RequiredVersion**. **RequiredVersion** can't be used in the same `Install-Module` -command as **MinimumVersion** or **MaximumVersion**. - -```yaml -Type: System.Version -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\WindowsPowerShell\Modules` - -The **CurrentUser** installs modules in a location that's accessible only to the current user of -the computer. For example: - -`$HOME\Documents\WindowsPowerShell\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 doesn't 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: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipPublisherCheck - -Allows you to install a newer version of a module that already exists on your computer. For example, -when an existing module is digitally signed by a trusted publisher but the new version isn't -digitally signed by a trusted publisher. - -```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 - -### System.String[] - -### System.Management.Automation.PSObject[] - -### System.Version - -### System.Management.Automation.PSCredential - -### System.Uri - -## OUTPUTS - -### System.Object - -## NOTES - -Windows PowerShell includes the following aliases for `Install-Module`: - -- `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\WindowsPowerShell\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-1.x/PowerShellGet/Install-Script.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Install-Script.md deleted file mode 100644 index 45fb7ac..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Install-Script.md +++ /dev/null @@ -1,510 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 06/23/2021 -online version: https://learn.microsoft.com/powershell/module/powershellget/install-script?view=powershellget-1.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] [-WhatIf] - [-Confirm] [] -``` - -### InputObject - -``` -Install-Script [-InputObject] [-Scope ] [-NoPathUpdate] [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-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. - -The default repositories `Install-Script` operates against are configurable through the -`Register-PSRepository`, `Set-PSRepository`, `Unregister-PSRepository`, and `Get-PSRepository` -cmdlets. When operating against multiple repositories, `Install-Script` installs the first script -that matches the specified search criteria (**Name**, **MinimumVersion**, or **MaximumVersion**) -from the first repository without any error. - -## 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 - -### -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 - -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 -``` - -### -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 - -Specifies the maximum version of a single scripts to install. You cannot add this parameter if you -are attempting to install multiple scripts. The **MaximumVersion** and the **RequiredVersion** -parameters are mutually exclusive; you cannot use both parameters in the same command. - -```yaml -Type: System.Version -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of a single script to install. You cannot add this parameter if you -are attempting to install multiple scripts. The **MinimumVersion** and the **RequiredVersion** -parameters are mutually exclusive; you cannot use both parameters in the same command. - -```yaml -Type: System.Version -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 - -By default, this command adds the install location of the script to the `$env:PATH` environment -variable. When you use the **NoPathUpdate** switch, the command doesn't update the `$env:PATH` -variable. - -```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 - -Specifies a proxy server for the request, rather than connecting directly to the Internet resource. - -```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 - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```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 - -Specifies the exact version number of the script to install. - -```yaml -Type: System.Version -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.Version - -### 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-1.x/PowerShellGet/New-ScriptFileInfo.md b/powershell-gallery/powershellget-1.x/PowerShellGet/New-ScriptFileInfo.md deleted file mode 100644 index 19d34c5..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/New-ScriptFileInfo.md +++ /dev/null @@ -1,566 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 07/01/2019 -online version: https://learn.microsoft.com/powershell/module/powershellget/new-scriptfileinfo?view=powershellget-1.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 ] [-PassThru] [-Force] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION - -The `New-ScriptFileInfo` cmdlet creates a PowerShell script file, including metadata about the -script. - -The examples use splatting to pass parameters to the `New-ScriptFileInfo` cmdlet. For more -information, see [about_Splatting](/powershell/module/Microsoft.PowerShell.Core/About/about_splatting). - -## 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 - -Returns an object that represents the item with which you're working. By default, -`New-ScriptFileInfo` 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 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 -``` - -### -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-1.x/PowerShellGet/PowerShellGet.md b/powershell-gallery/powershellget-1.x/PowerShellGet/PowerShellGet.md deleted file mode 100644 index c7729cb..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/PowerShellGet.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -Download Help Link: https://aka.ms/powershell51-help -Help Version: 5.2.0.0 -Locale: en-US -Module Guid: 1d73a601-4a6c-43c5-ba3f-619b18bbb404 -Module Name: PowerShellGet -ms.date: 04/10/2023 -schema: 2.0.0 -title: PowerShellGet ---- -# PowerShellGet Module - -## Description - -PowerShellGet is a module with commands for discovering, installing, updating and publishing -PowerShell artifacts like Modules, DSC Resources, Role Capabilities, and Scripts. - -This documentation covers version 1.0.0.1 of the **PowerShellGet** module. - -> [!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-1.x/PowerShellGet/Publish-Module.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Publish-Module.md deleted file mode 100644 index 11baaa5..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Publish-Module.md +++ /dev/null @@ -1,418 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 01/17/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/publish-module?view=powershellget-1.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 ] [-Force] [-WhatIf] [-Confirm] [] -``` - -### ModulePathParameterSet - -``` -Publish-Module -Path [-NuGetApiKey ] [-Repository ] - [-Credential ] [-FormatVersion ] [-ReleaseNotes ] - [-Tags ] [-LicenseUri ] [-IconUri ] [-ProjectUri ] [-Force] [-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. - -When you specify a module by name, `Publish-Module` publishes the first module that would be found -by running `Get-Module -ListAvailable `. If you specify a minimum version of a module to -publish, `Publish-Module` publishes the first module with a version that is greater than or equal to -the minimum version that you have specified. - -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. Although most metadata is taken -from the module manifest, some metadata must be specified in `Publish-Module` parameters, such as -**Tag**, **ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**, because these parameters -match fields in a NuGet-based gallery. - -The parameters that take module version numbers expect strings formatted as version numbers. - -- Standard version numbers have a format of `x.y.z` where x, y, and z are numbers -- Prerelease versions have a format of `x.y.z-` where the `` is - arbitrary string assigned to that release. - -## 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 -Name "MyDscModule" -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 = @{ - Name = "MyDscModule" - 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 - -### -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 -``` - -### -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: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FormatVersion - -Accepts only valid values specified by the **ValidateSet** attribute. - -For more information, see [ValidateSet Attribute Declaration](/powershell/scripting/developer/cmdlet/validateset-attribute-declaration) -and [ValidateSetAttribute](/dotnet/api/system.management.automation.validatesetattribute). - -```yaml -Type: System.Version -Parameter Sets: (All) -Aliases: -Accepted values: 1.0 - -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 webpage -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 you want to publish. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies the name of the module that you want to publish. `Publish-Module` searches for the -specified module name in `$Env:PSModulePath`. - -```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. - -```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 - -Specifies the URL of a webpage 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 containing release notes or comments that you want to be available to users of -this version 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 -``` - -### -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 - -Specifies the exact version of a single module to publish. - -```yaml -Type: System.Version -Parameter Sets: ModuleNameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkipAutomaticTags - -Removes commands and resources from being included as tags. Skips automatically adding tags to a -module. **SkipAutomaticTags** parameter support is added in **PowerShellGet** version 2.0.0 - -```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 - -Adds one or more tags to the module that you are publishing. Example tags include -DesiredStateConfiguration, DSC, DSCResourceKit, or PSModule. Separate multiple tags with commas. - -```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 - -Windows PowerShell includes the following aliases for `Publish-Module`: - -- `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. - -> [!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. - -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. Most metadata is taken from the -module manifest, but some metadata can be specified in `Publish-Module` parameters, such as **Tag**, -**ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**. 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-1.x/PowerShellGet/Publish-Script.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Publish-Script.md deleted file mode 100644 index 49c1fa9..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Publish-Script.md +++ /dev/null @@ -1,300 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 03/27/2020 -online version: https://learn.microsoft.com/powershell/module/powershellget/publish-script?view=powershellget-1.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. - -## 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 - -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 -``` - -### -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. - -```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). - -```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: None -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 - -> [!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) - -[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-1.x/PowerShellGet/Register-PSRepository.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Register-PSRepository.md deleted file mode 100644 index 1534536..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Register-PSRepository.md +++ /dev/null @@ -1,316 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 12/08/2022 -online version: https://learn.microsoft.com/powershell/module/powershellget/register-psrepository?view=powershellget-1.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. - -Each registered repository is associated with a OneGet package provider, which is specified with the -**PackageManagementProvider** parameter. Each OneGet provider is designed to interact with a -specific type of repository. For example, the NuGet provider is designed to interact with -NuGet-based repositories. If a OneGet provider is not specified during registration, PowerShellGet -attempts to find a OneGet provider that can handle the specified source location. - -## 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 - -Specifies credentials of an account that has rights to register a repository. - -```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 - -The parameter is used to register the **PSGallery**. You only need to do this if you removed the -**PSGallery** repository. - -```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. - -You can set the **InstallationPolicy** with the `Set-PSRepository` cmdlet. - -```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 - -Specifies a OneGet package provider. If you don't specify a value for this parameter, PowerShellGet -polls available package providers and associates this repository with the first package provider -that indicates it can handle the repository. - -```yaml -Type: System.String -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -Specifies a proxy server for the request, rather than connecting directly to the Internet resource. - -```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 - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```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 - -Specifies the URI of the publish location for modules. For example, for NuGet-based repositories, -the publish location is similar to `https://someNuGetUrl.com/api/v2/package`. - -```yaml -Type: System.Uri -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptPublishLocation - -Specifies the URI of the publish location for scripts. For example, for NuGet-based repositories, -the publish location is similar to `https://someNuGetUrl.com/api/v2/package/`. - -```yaml -Type: System.Uri -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptSourceLocation - -Specifies the URI for discovering and installing scripts 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/items/psscript`. - -```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`. - -```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 - -> [!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 - -[Get-PSRepository](Get-PSRepository.md) - -[Set-PSRepository](Set-PSRepository.md) - -[Unregister-PSRepository](Unregister-PSRepository.md) diff --git a/powershell-gallery/powershellget-1.x/PowerShellGet/Save-Module.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Save-Module.md deleted file mode 100644 index 5555522..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Save-Module.md +++ /dev/null @@ -1,414 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 12/09/2022 -online version: https://learn.microsoft.com/powershell/module/powershellget/save-module?view=powershellget-1.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] [-WhatIf] [-Confirm] - [] -``` - -### NameAndLiteralPathParameterSet - -``` -Save-Module [-Name] [-MinimumVersion ] [-MaximumVersion ] - [-RequiredVersion ] [-Repository ] -LiteralPath [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-WhatIf] [-Confirm] - [] -``` - -### InputOjectAndLiteralPathParameterSet -``` -Save-Module [-InputObject] -LiteralPath [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-WhatIf] [-Confirm] - [] -``` - -### InputOjectAndPathParameterSet -``` -Save-Module [-InputObject] -Path [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-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. - -`Get-PSRepository` displays the local computer's registered repositories. You can use the -`Find-Module` cmdlet to search registered repositories. - -The parameters that take module version numbers expect strings formatted as version numbers. - -- Standard version numbers have a format of `x.y.z` where x, y, and z are numbers -- Prerelease versions have a format of `x.y.z-` where the `` is - arbitrary string assigned to that release. - -## 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 - -### -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 - -If the location specified by the **Path** parameter doesn't exist, the cmdlet returns an error. -Using the **Force** parameter creates the target path. - -```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: InputOjectAndLiteralPathParameterSet, InputOjectAndPathParameterSet -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. - -```yaml -Type: System.String -Parameter Sets: NameAndLiteralPathParameterSet, InputOjectAndLiteralPathParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaximumVersion - -Specifies the maximum, or newest, version of the module to save. The **MaximumVersion** and -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of a single module to save. You cannot add this parameter if you are -attempting to install multiple modules. The **MinimumVersion** and **RequiredVersion** parameters -can't be used in the same command. - -```yaml -Type: System.Version -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, InputOjectAndPathParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: True -``` - -### -Proxy - -Specifies a proxy server for the request, rather than connecting directly to the internet resource. - -```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 - -Specifies a user account that has permission to use the proxy server that is specified by the **Proxy** parameter. - -```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 - -Specifies the exact version number of the module to save. - -```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.Version - -### 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 diff --git a/powershell-gallery/powershellget-1.x/PowerShellGet/Save-Script.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Save-Script.md deleted file mode 100644 index bd5000e..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Save-Script.md +++ /dev/null @@ -1,362 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 07/02/2019 -online version: https://learn.microsoft.com/powershell/module/powershellget/save-script?view=powershellget-1.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] [-WhatIf] [-Confirm] - [] -``` - -### NameAndLiteralPathParameterSet - -``` -Save-Script [-Name] [-MinimumVersion ] [-MaximumVersion ] - [-RequiredVersion ] [-Repository ] -LiteralPath [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-WhatIf] [-Confirm] - [] -``` - -### InputOjectAndLiteralPathParameterSet - -``` -Save-Script [-InputObject] -LiteralPath [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-WhatIf] [-Confirm] - [] -``` - -### InputOjectAndPathParameterSet - -``` -Save-Script [-InputObject] -Path [-Proxy ] - [-ProxyCredential ] [-Credential ] [-Force] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION - -The `Save-Script` cmdlet saves the specified script. - -## 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 - -### -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 - -Forces `Save-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 -``` - -### -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: InputOjectAndLiteralPathParameterSet, InputOjectAndPathParameterSet -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. - -```yaml -Type: System.String -Parameter Sets: NameAndLiteralPathParameterSet, InputOjectAndLiteralPathParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MaximumVersion - -Specifies the maximum, or newest version of the script to save. The **MaximumVersion** and -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: NameAndPathParameterSet, NameAndLiteralPathParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of a script to save. The **MinimumVersion** and **RequiredVersion** -parameters can't be used in the same command. - -```yaml -Type: System.Version -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, InputOjectAndPathParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: True -``` - -### -Proxy - -Specifies a proxy server for the request, rather than connecting directly to an internet resource. - -```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 - -Specifies a user account that has permission to use the proxy server specified by the **Proxy** -parameter. - -```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 - -Specifies the exact version number of the script to save. - -```yaml -Type: System.Version -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.Version - -### 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) - -[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-1.x/PowerShellGet/Set-PSRepository.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Set-PSRepository.md deleted file mode 100644 index a1c8450..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Set-PSRepository.md +++ /dev/null @@ -1,254 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 04/22/2020 -online version: https://learn.microsoft.com/powershell/module/powershellget/set-psrepository?view=powershellget-1.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. - -## 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 - -Specifies a user account that has rights to change the repository settings. - -```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**. - -```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: False -Accept wildcard characters: False -``` - -### -PackageManagementProvider - -Specifies the package management provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy - -Specifies a proxy server for the request, rather than connecting directly to the Internet resource. - -```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 - -Specifies a user account that has permission to use the proxy server that is specified by the -**Proxy** parameter. - -```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 - -Specifies the URI of the publish location. For example, for NuGet-based repositories, the publish -location is similar to `https://someNuGetUrl.com/api/v2/Packages`. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptPublishLocation - -Specifies the script publish location. - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptSourceLocation - -Specifies the script source location. - -```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`. - -```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 - -> [!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 - -[Get-PSRepository](Get-PSRepository.md) - -[Register-PSRepository](Register-PSRepository.md) - -[Unregister-PSRepository](Unregister-PSRepository.md) diff --git a/powershell-gallery/powershellget-1.x/PowerShellGet/Test-ScriptFileInfo.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Test-ScriptFileInfo.md deleted file mode 100644 index daa64a6..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Test-ScriptFileInfo.md +++ /dev/null @@ -1,157 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 10/04/2021 -online version: https://learn.microsoft.com/powershell/module/powershellget/test-scriptfileinfo?view=powershellget-1.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. - -## 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. - -```yaml -Type: System.String -Parameter Sets: LiteralPathParameterSet -Aliases: - -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-1.x/PowerShellGet/Uninstall-Module.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Uninstall-Module.md deleted file mode 100644 index c713a48..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Uninstall-Module.md +++ /dev/null @@ -1,251 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 12/09/2022 -online version: https://learn.microsoft.com/powershell/module/powershellget/uninstall-module?view=powershellget-1.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] [-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. - -You can manually delete module files, but doing so may break any modules that depend on the deleted -module. - -The parameters that take module version numbers expect strings formatted as version numbers. - -- Standard version numbers have a format of `x.y.z` where x, y, and z are numbers -- Prerelease versions have a format of `x.y.z-` where the `` is - arbitrary string assigned to that release. - -## 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 - -### -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. - -```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 - -Forces `Uninstall-Module` 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 -``` - -### -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 - -Specifies the maximum, or newest, version of the module to uninstall. The **MaximumVersion** and -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of the module to uninstall. The **MinimumVersion** and -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -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 - -Specifies the exact version number of the module to uninstall. - -```yaml -Type: System.Version -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.Version - -## 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-1.x/PowerShellGet/Uninstall-Script.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Uninstall-Script.md deleted file mode 100644 index 8095c38..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Uninstall-Script.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 07/03/2019 -online version: https://learn.microsoft.com/powershell/module/powershellget/uninstall-script?view=powershellget-1.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] [-WhatIf] [-Confirm] [] -``` - -### InputObject - -``` -Uninstall-Script [-InputObject] [-Force] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION - -The `Uninstall-Script` cmdlet uninstalls a specified script from the local computer. - -## 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 - -### -Force - -Forces `Uninstall-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 -``` - -### -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 - -Specifies the maximum, or newest, version of the script to uninstall. The **MaximumVersion** and -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -Parameter Sets: NameParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -MinimumVersion - -Specifies the minimum version of the script to uninstall. The **MinimumVersion** and -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -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 - -Specifies the exact version number of the script to uninstall. - -```yaml -Type: System.Version -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[] - -`Uninstall-Script` accepts **PSRepositoryItemInfo** objects from the pipeline. - -### System.Version - -## 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-1.x/PowerShellGet/Unregister-PSRepository.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Unregister-PSRepository.md deleted file mode 100644 index ad6c85a..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Unregister-PSRepository.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 06/09/2017 -online version: https://learn.microsoft.com/powershell/module/powershellget/unregister-psrepository?view=powershellget-1.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. - -## 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-1.x/PowerShellGet/Update-Module.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Update-Module.md deleted file mode 100644 index 31551d9..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Update-Module.md +++ /dev/null @@ -1,350 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 01/17/2023 -online version: https://learn.microsoft.com/powershell/module/powershellget/update-module?view=powershellget-1.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 ] [-Proxy ] [-ProxyCredential ] [-Force] [-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. - -`Update-Module` with no parameters specified updates all installed modules. To specify a module to -update, use the **Name** parameter. You can update to a module's specific version using the -**RequiredVersion** parameter. - -The parameters that take module version numbers expect strings formatted as version numbers. - -- Standard version numbers have a format of `x.y.z` where x, y, and z are numbers -- Prerelease versions have a format of `x.y.z-` where the `` is - arbitrary string assigned to that release. - -If an installed module is already the newest version, the module isn't updated. If the module isn't -found in `$env:PSModulePath`, an error is displayed. - -To display the installed modules, use `Get-InstalledModule`. - -## 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 - -### -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 - -Specifies the maximum version of a single module to update. You can't add this parameter if you're -attempting to update multiple modules. The **MaximumVersion** and the **RequiredVersion** parameters -can't be used in the same command. - -```yaml -Type: System.Version -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. The **PassThru** parameter support was added in **PowerShellGet** 2.0.0 - -```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 - -Specifies a proxy server for the request, rather than connecting directly to an internet resource. - -```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 - -Specifies a user account that has permission to use the proxy server specified by the **Proxy** -parameter. - -```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 - -Specifies the exact version to which the existing installed module will be updated. The version -specified by **RequiredVersion** must exist in the online gallery or an error is displayed. If more -than one module is updated in a single command, you can't use **RequiredVersion**. - -```yaml -Type: System.Version -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-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.Version - -### System.Management.Automation.PSCredential - -### System.Uri - -## OUTPUTS - -### System.Object - -## NOTES - -Windows PowerShell includes the following aliases for `Update-Module`: - -- `upmo` - -For PowerShell 5.1 or below, the default scope in an elevated session is **AllUsers**, and in a -non-elevated session, **CurrentUser**. Module updates for **AllUsers**, -`$env:ProgramFiles\PowerShell\Modules`, need elevated permissions. Module updates for -**CurrentUser**, `$HOME\Documents\PowerShell\Modules`, don't need elevated permissions. - -> [!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. - -`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-1.x/PowerShellGet/Update-ModuleManifest.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Update-ModuleManifest.md deleted file mode 100644 index 2a570ad..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Update-ModuleManifest.md +++ /dev/null @@ -1,860 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 10/19/2022 -online version: https://learn.microsoft.com/powershell/module/powershellget/update-modulemanifest?view=powershellget-1.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 ] - [-HelpInfoUri ] [-PassThru] [-DefaultCommandPrefix ] - [-ExternalModuleDependencies ] [-PackageManagementProviders ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION - -The `Update-ModuleManifest` cmdlet updates a module manifest (`.psd1`) file. - -## 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 -``` - -### -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 -``` - -### -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: False -``` - -### -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 - -> [!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 diff --git a/powershell-gallery/powershellget-1.x/PowerShellGet/Update-Script.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Update-Script.md deleted file mode 100644 index 11a71a9..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Update-Script.md +++ /dev/null @@ -1,245 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 07/09/2019 -online version: https://learn.microsoft.com/powershell/module/powershellget/update-script?view=powershellget-1.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] [-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. - -## 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 - -### -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 - -Specifies the maximum, or newest, version of the script to update. The **MaximumVersion** and -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -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 -``` - -### -Proxy - -Specifies a proxy server for the request rather than connecting directly to an internet resource. - -```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 - -Specifies a user account that has permission to use the proxy server specified by the **Proxy** -parameter. - -```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 - -Specifies the exact version number of the script to update. The **MinimumVersion** and -**RequiredVersion** parameters can't be used in the same command. - -```yaml -Type: System.Version -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.Version - -### 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) - -[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-1.x/PowerShellGet/Update-ScriptFileInfo.md b/powershell-gallery/powershellget-1.x/PowerShellGet/Update-ScriptFileInfo.md deleted file mode 100644 index 9e9efa6..0000000 --- a/powershell-gallery/powershellget-1.x/PowerShellGet/Update-ScriptFileInfo.md +++ /dev/null @@ -1,479 +0,0 @@ ---- -external help file: PSModule-help.xml -Locale: en-US -Module Name: PowerShellGet -ms.date: 07/09/2019 -online version: https://learn.microsoft.com/powershell/module/powershellget/update-scriptfileinfo?view=powershellget-1.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 ] [-PassThru] [-Force] [-WhatIf] [-Confirm] - [] -``` - -### LiteralPathParameterSet - -``` -Update-ScriptFileInfo [-LiteralPath] [-Version ] [-Author ] - [-Guid ] [-Description ] [-CompanyName ] [-Copyright ] - [-RequiredModules ] [-ExternalModuleDependencies ] - [-RequiredScripts ] [-ExternalScriptDependencies ] [-Tags ] - [-ProjectUri ] [-LicenseUri ] [-IconUri ] [-ReleaseNotes ] [-PassThru] - [-Force] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION - -The `Update-ScriptFileInfo` cmdlet updates a script's property values. For example, the values for -version, author, or description. - -## 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 - -Forces `Update-ScriptFileInfo` 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 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. - -```yaml -Type: System.String -Parameter Sets: LiteralPathParameterSet -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PassThru - -Returns an object that represents the item with which you're working. By default, -`Update-ScriptFileInfo` 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 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: 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.Version -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 `Update-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 `Update-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 - -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)