-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path03 az-module-installation.ps1
49 lines (35 loc) · 1.18 KB
/
03 az-module-installation.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# INSTALLING POWERSHELL AZ MODULE
#Check your current PS Version
$PSVersionTable
# INSTALL the AZ PowerShell Module
# See cmdlets that work with Modules
Get-Command -Noun Module
# Have a look at the AZ module in PSGallery (https://www.powershellgallery.com/)
Find-Module *AZ*
#Find-Module *AZ.*
Find-Module AZ #EXACTLY AZ
# Install AZ module
Install-Module AZ #as Admin or with -Scope CurrentUser
# To stay current, update the AZ module to the latest version
Update-Module AZ
# See installed modules
Get-Module -ListAvailable
# See imported (in session) modules
Get-Module
#Import the module
Import-Module AZ
# Explore the commands in the AZ module. How many are there?
Get-Command -Module AZ.* | Measure-Object
# Look in each AZ module for commands
Get-Module Az.* # only shows those modules loaded into session
Get-Module Az.* -ListAvailable
# Get all commands for all AZ modules (long)
Get-Module AZ.* | ForEach-Object { Get-Command -Module $PSItem }
# See the verbs
Get-Module AZ.* |
ForEach-Object { Get-Command -Module $PSItem } |
Group-Object -Property Verb
# See the nouns
Get-Module AZ.* |
ForEach-Object { Get-Command -Module $PSItem } |
Group-Object -Property Noun