Skip to content

Commit 35b5b4b

Browse files
Update Get-Module to clarify -ListAvailable parameter (MicrosoftDocs#12090)
* Update Get-Module.md for 5.1 * Update Get-Module.md for 7.4 * Update Get-Module.md * Update Get-Module.md * Update Get-Module.md * Update Get-Module.md * Update Get-Module.md * Update Get-Module.md * Update Get-Module.md * Update Get-Module.md * Update Get-Module.md * Update Get-Module.md * Update Get-Module.md * Update Get-Module.md * Update Get-Module.md --------- Co-authored-by: Sean Wheeler <[email protected]>
1 parent 1be328f commit 35b5b4b

File tree

4 files changed

+12
-24
lines changed

4 files changed

+12
-24
lines changed

reference/5.1/Microsoft.PowerShell.Core/Get-Module.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -495,12 +495,9 @@ Accept wildcard characters: False
495495

496496
### -ListAvailable
497497

498-
Indicates that this cmdlet gets all installed modules. `Get-Module` gets modules in paths listed in
499-
the **PSModulePath** environment variable. Without this parameter, `Get-Module` gets only the
500-
modules that are both listed in the **PSModulePath** environment variable, and that are loaded in
501-
the current session. **ListAvailable** does not return information about modules that are not found
502-
in the **PSModulePath** environment variable, even if those modules are loaded in the current
503-
session.
498+
By default, `Get-Module` only returns the modules that have been imported into the current session.
499+
With this parameter the command lists modules installed in any path included in the
500+
`$env:PSModulePath` environment variable.
504501

505502
```yaml
506503
Type: System.Management.Automation.SwitchParameter

reference/7.4/Microsoft.PowerShell.Core/Get-Module.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -496,12 +496,9 @@ Accept wildcard characters: False
496496

497497
### -ListAvailable
498498

499-
Indicates that this cmdlet gets all installed modules. `Get-Module` gets modules in paths listed in
500-
the **PSModulePath** environment variable. Without this parameter, `Get-Module` gets only the
501-
modules that are both listed in the **PSModulePath** environment variable, and that are loaded in
502-
the current session. **ListAvailable** does not return information about modules that are not found
503-
in the **PSModulePath** environment variable, even if those modules are loaded in the current
504-
session.
499+
By default, `Get-Module` only returns the modules that have been imported into the current session.
500+
With this parameter the command lists modules installed in any path included in the
501+
`$env:PSModulePath` environment variable.
505502

506503
```yaml
507504
Type: System.Management.Automation.SwitchParameter

reference/7.5/Microsoft.PowerShell.Core/Get-Module.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -496,12 +496,9 @@ Accept wildcard characters: False
496496

497497
### -ListAvailable
498498

499-
Indicates that this cmdlet gets all installed modules. `Get-Module` gets modules in paths listed in
500-
the **PSModulePath** environment variable. Without this parameter, `Get-Module` gets only the
501-
modules that are both listed in the **PSModulePath** environment variable, and that are loaded in
502-
the current session. **ListAvailable** does not return information about modules that are not found
503-
in the **PSModulePath** environment variable, even if those modules are loaded in the current
504-
session.
499+
By default, `Get-Module` only returns the modules that have been imported into the current session.
500+
With this parameter the command lists modules installed in any path included in the
501+
`$env:PSModulePath` environment variable.
505502

506503
```yaml
507504
Type: System.Management.Automation.SwitchParameter

reference/7.6/Microsoft.PowerShell.Core/Get-Module.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -496,12 +496,9 @@ Accept wildcard characters: False
496496

497497
### -ListAvailable
498498

499-
Indicates that this cmdlet gets all installed modules. `Get-Module` gets modules in paths listed in
500-
the **PSModulePath** environment variable. Without this parameter, `Get-Module` gets only the
501-
modules that are both listed in the **PSModulePath** environment variable, and that are loaded in
502-
the current session. **ListAvailable** does not return information about modules that are not found
503-
in the **PSModulePath** environment variable, even if those modules are loaded in the current
504-
session.
499+
By default, `Get-Module` only returns the modules that have been imported into the current session.
500+
With this parameter the command lists modules installed in any path included in the
501+
`$env:PSModulePath` environment variable.
505502

506503
```yaml
507504
Type: System.Management.Automation.SwitchParameter

0 commit comments

Comments
 (0)