-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve review feedback, add document for installing modules, other m…
…inor changes
- Loading branch information
1 parent
b484613
commit 0975654
Showing
12 changed files
with
132 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
195 changes: 42 additions & 153 deletions
195
documentation/development-docs/design-guidelines/piping-best-practices.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
documentation/development-docs/examples/get-cmdlet-example.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
documentation/development-docs/examples/new-cmdlet-example.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
documentation/development-docs/examples/remove-cmdlet-example.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
documentation/development-docs/examples/set-cmdlet-example.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
documentation/development-docs/examples/update-cmdlet-example.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Installing `Az` Modules | ||
|
||
## Overview | ||
|
||
By default, modules are installed from the [PowerShell Gallery](https://www.powershellgallery.com/), which is the central repository for accessing published PowerShell modules (equivalent to NuGet for .NET, npm for JavaScript, etc.). With the [`Install-Module`](https://docs.microsoft.com/en-us/powershell/module/powershellget/install-module) cmdlet, users can specify which modules they want to install; in addition, users can provide the `-Repository` parameter to specify which repository they want to install modules from (if this parameter isn't provided, then the cmdlet defaults to using PowerShell Gallery). | ||
|
||
## Removing Modules | ||
|
||
In some cases, existing `Az` modules will need to be removed before a new version can be installed. Since the `Uninstall-Module` cmdlet does not currently remove modules and their dependencies, users will need to manually delete the folders where the modules were installed to. | ||
|
||
To figure out if you have any `Az` modules currently installed, as well as the location they are found, use the following command: | ||
|
||
``` | ||
Get-Module -Name Az* -ListAvailable | ||
``` | ||
|
||
This command will list all modules installed on your machine that are found in your `$env:PSModulePath`. Deleting the corresponding `Az.*` folders in the file explorer will remove these modules from your machine. | ||
|
||
## Registering Repositories | ||
|
||
In some cases, users will need to install modules from a different repository than the PowerShell Gallery -- this can be a new endpoint, or even a local folder containing `.nupkg` files. In either case, the [`Register-PSRepository`](https://docs.microsoft.com/en-us/powershell/module/powershellget/register-psrepository) cmdlet should be used to create a new local repository that can be used to install modules from. | ||
|
||
Below is an example of registering a new repository from a local folder containing `.nupkg` files: | ||
|
||
``` | ||
Register-PSRepository -Name "{{repository_name}}" -SourceLocation "{{folder_with_nupkg_files}}" -PackageManagementProvider NuGet -Installation | ||
``` | ||
|
||
## Installing Modules | ||
|
||
To install a module from the PowerShell Gallery, run the following command: | ||
|
||
``` | ||
Install-Module -Name "{{module_name}}" | ||
``` | ||
|
||
To install a module from a specific repository, run the following command: | ||
|
||
``` | ||
Install-Module -Name "{{module_name}}" -Repository "{{repository_name}}" | ||
``` | ||
|
||
### Installing `Az` Modules | ||
|
||
To install the latest stable `Az` modules from the PowerShell Gallery, run the following command: | ||
|
||
``` | ||
Install-Module -Name Az | ||
``` | ||
|
||
To install a specific `Az` module from the PowerShell Gallery, run the following command: | ||
|
||
``` | ||
Install-Module -Name Az.{{service}} | ||
``` | ||
|
||
To install a preview version of a specific `Az` module, run the following command: | ||
|
||
``` | ||
Install-Module -Name Az.{{service}} -RequiredVersion {{version}} -AllowPrelease | ||
``` | ||
|
||
_Note_: to install preview versions of modules, version 1.6.0 or greater of the `PowerShellGet` module will be needed. Users can run the following command to get the latest version of this module: | ||
|
||
``` | ||
Install-Module -Name PowerShellGet -Force | ||
``` | ||
|
||
Full documentation around installing the `Az` module can be found in the [_Install the Azure PowerShell module_](https://docs.microsoft.com/en-us/powershell/azure/install-az-ps) article. |