Skip to content

Commit 2422d90

Browse files
guillermooosdwheelermichaeltlombardi
authored
Add details to 'about_Modules' topic (#11276)
* Add details to 'about_Modules' topic * Apply suggestions from code review Co-authored-by: Mikey Lombardi (He/Him) <[email protected]> * Minor edits and copy to all versions --------- Co-authored-by: Sean Wheeler <[email protected]> Co-authored-by: Mikey Lombardi (He/Him) <[email protected]>
1 parent 6d52633 commit 2422d90

File tree

4 files changed

+108
-88
lines changed

4 files changed

+108
-88
lines changed

reference/5.1/Microsoft.PowerShell.Core/About/about_Modules.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Explains how to install, import, and use PowerShell modules.
33
Locale: en-US
4-
ms.date: 03/18/2024
4+
ms.date: 08/09/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_modules?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Modules
@@ -13,29 +13,34 @@ Explains how to install, import, and use PowerShell modules.
1313

1414
## Long description
1515

16-
PowerShell is a scripting language and a command shell. The language is
17-
comprised of [keywords][07], which provide the structure and logic of
18-
processing, and commands that perform the work. Commands in PowerShell are
19-
implemented as scripts, functions, or cmdlets.
16+
PowerShell is both a command shell and a scripting language. Commands in
17+
PowerShell are implemented as scripts, functions, or cmdlets. The language
18+
includes [keywords][07], which provide the structure and logic of processing,
19+
and other resources, such as variables, providers, aliases.
2020

21-
A module is a self-contained reusable unit that can contain cmdlets, providers,
22-
functions, variables, and other types of resources that can be imported as a
23-
single unit.
21+
A module is a self-contained, reusable unit that can include cmdlets, providers,
22+
functions, variables, and other resources that can be imported into a PowerShell
23+
session or any custom PowerShell program.
2424

25-
PowerShell comes with a base set of modules. You can also install more modules
26-
as needed. By default, installed modules are loaded automatically the first
27-
time you use a command from a module. Use the `$PSModuleAutoloadingPreference`
28-
variable to enable, disable and configure automatic loading of modules. For
29-
more information, see [about_Preference_Variables][08].
25+
Before the functionality contained in a module is usable, the module must be
26+
loaded into the PowerShell session. By default, PowerShell automatically loads
27+
an installed module the first time you use a command from the module. You can
28+
configure automatic module loading behavior using the variable
29+
`$PSModuleAutoloadingPreference`. For more information, see
30+
[about_Preference_Variables][08].
3031

31-
You can unload or reload during a session. Use the `Remove-Module` cmdlet to
32-
unload a module from your session. Use the `Import-Module` cmdlet to load a
33-
module.
32+
You can also manually unload or reload modules during a PowerShell session. To
33+
unload a module, use the `Remove-Module` cmdlet. To load or reload a module,
34+
use `Import-Module`.
3435

35-
Modules can be created as compiled .NET assemblies written in C#, or
36-
script-based modules written in PowerShell. This topic explains how to use
37-
PowerShell modules. For information about how to write PowerShell modules, see
38-
[Writing a PowerShell Module][02].
36+
PowerShell comes with a base set of modules. Anyone can create new PowerShell
37+
commands or other resources, and publish them as modules that users can install
38+
as needed.
39+
40+
You can write modules in C# as compiled .NET assemblies, known as native
41+
modules, or in plain PowerShell, known as script modules. This topic explains
42+
how to use PowerShell modules. For information about how to create PowerShell
43+
modules, see [Writing a PowerShell Module][02].
3944

4045
> [!NOTE]
4146
> Prior to PowerShell 3.0, cmdlets and providers were packaged in PowerShell
@@ -92,8 +97,8 @@ Use the following command to create a `Modules` folder for the current user:
9297
$folder = New-Item -Type Directory -Path $HOME\Documents\WindowsPowerShell\Modules
9398
```
9499

95-
Copy the entire module folder into the new created folder. In PowerShell use the
96-
`Copy-Item` cmdlet. For example, run the following command to copy the
100+
Copy the entire module folder into the new created folder. In PowerShell use
101+
the `Copy-Item` cmdlet. For example, run the following command to copy the
97102
`MyModule` folder from `C:\PSTest` to the folder you just created:
98103

99104
```powershell

reference/7.2/Microsoft.PowerShell.Core/About/about_Modules.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Explains how to install, import, and use PowerShell modules.
33
Locale: en-US
4-
ms.date: 03/18/2024
4+
ms.date: 08/09/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_modules?view=powershell-7.2&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Modules
@@ -13,29 +13,34 @@ Explains how to install, import, and use PowerShell modules.
1313

1414
## Long description
1515

16-
PowerShell is a scripting language and a command shell. The language is
17-
comprised of [keywords][07], which provide the structure and logic of
18-
processing, and commands that perform the work. Commands in PowerShell are
19-
implemented as scripts, functions, or cmdlets.
16+
PowerShell is both a command shell and a scripting language. Commands in
17+
PowerShell are implemented as scripts, functions, or cmdlets. The language
18+
includes [keywords][07], which provide the structure and logic of processing,
19+
and other resources, such as variables, providers, aliases.
2020

21-
A module is a self-contained reusable unit that can contain cmdlets, providers,
22-
functions, variables, and other types of resources that can be imported as a
23-
single unit.
21+
A module is a self-contained, reusable unit that can include cmdlets, providers,
22+
functions, variables, and other resources that can be imported into a PowerShell
23+
session or any custom PowerShell program.
2424

25-
PowerShell comes with a base set of modules. You can also install more modules
26-
as needed. By default, installed modules are loaded automatically the first
27-
time you use a command from a module. Use the `$PSModuleAutoloadingPreference`
28-
variable to enable, disable and configure automatic loading of modules. For
29-
more information, see [about_Preference_Variables][08].
25+
Before the functionality contained in a module is usable, the module must be
26+
loaded into the PowerShell session. By default, PowerShell automatically loads
27+
an installed module the first time you use a command from the module. You can
28+
configure automatic module loading behavior using the variable
29+
`$PSModuleAutoloadingPreference`. For more information, see
30+
[about_Preference_Variables][08].
3031

31-
You can unload or reload during a session. Use the `Remove-Module` cmdlet to
32-
unload a module from your session. Use the `Import-Module` cmdlet to load a
33-
module.
32+
You can also manually unload or reload modules during a PowerShell session. To
33+
unload a module, use the `Remove-Module` cmdlet. To load or reload a module,
34+
use `Import-Module`.
3435

35-
Modules can be created as compiled .NET assemblies written in C#, or
36-
script-based modules written in PowerShell. This topic explains how to use
37-
PowerShell modules. For information about how to write PowerShell modules, see
38-
[Writing a PowerShell Module][02].
36+
PowerShell comes with a base set of modules. Anyone can create new PowerShell
37+
commands or other resources, and publish them as modules that users can install
38+
as needed.
39+
40+
You can write modules in C# as compiled .NET assemblies, known as native
41+
modules, or in plain PowerShell, known as script modules. This topic explains
42+
how to use PowerShell modules. For information about how to create PowerShell
43+
modules, see [Writing a PowerShell Module][02].
3944

4045
> [!NOTE]
4146
> Prior to PowerShell 3.0, cmdlets and providers were packaged in PowerShell
@@ -92,8 +97,8 @@ Use the following command to create a `Modules` folder for the current user:
9297
$folder = New-Item -Type Directory -Path $HOME\Documents\PowerShell\Modules
9398
```
9499

95-
Copy the entire module folder into the new created folder. In PowerShell use the
96-
`Copy-Item` cmdlet. For example, run the following command to copy the
100+
Copy the entire module folder into the new created folder. In PowerShell use
101+
the `Copy-Item` cmdlet. For example, run the following command to copy the
97102
`MyModule` folder from `C:\PSTest` to the folder you just created:
98103

99104
```powershell

reference/7.4/Microsoft.PowerShell.Core/About/about_Modules.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Explains how to install, import, and use PowerShell modules.
33
Locale: en-US
4-
ms.date: 03/18/2024
4+
ms.date: 08/09/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_modules?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Modules
@@ -13,29 +13,34 @@ Explains how to install, import, and use PowerShell modules.
1313

1414
## Long description
1515

16-
PowerShell is a scripting language and a command shell. The language is
17-
comprised of [keywords][07], which provide the structure and logic of
18-
processing, and commands that perform the work. Commands in PowerShell are
19-
implemented as scripts, functions, or cmdlets.
16+
PowerShell is both a command shell and a scripting language. Commands in
17+
PowerShell are implemented as scripts, functions, or cmdlets. The language
18+
includes [keywords][07], which provide the structure and logic of processing,
19+
and other resources, such as variables, providers, aliases.
2020

21-
A module is a self-contained reusable unit that can contain cmdlets, providers,
22-
functions, variables, and other types of resources that can be imported as a
23-
single unit.
21+
A module is a self-contained, reusable unit that can include cmdlets, providers,
22+
functions, variables, and other resources that can be imported into a PowerShell
23+
session or any custom PowerShell program.
2424

25-
PowerShell comes with a base set of modules. You can also install more modules
26-
as needed. By default, installed modules are loaded automatically the first
27-
time you use a command from a module. Use the `$PSModuleAutoloadingPreference`
28-
variable to enable, disable and configure automatic loading of modules. For
29-
more information, see [about_Preference_Variables][08].
25+
Before the functionality contained in a module is usable, the module must be
26+
loaded into the PowerShell session. By default, PowerShell automatically loads
27+
an installed module the first time you use a command from the module. You can
28+
configure automatic module loading behavior using the variable
29+
`$PSModuleAutoloadingPreference`. For more information, see
30+
[about_Preference_Variables][08].
3031

31-
You can unload or reload during a session. Use the `Remove-Module` cmdlet to
32-
unload a module from your session. Use the `Import-Module` cmdlet to load a
33-
module.
32+
You can also manually unload or reload modules during a PowerShell session. To
33+
unload a module, use the `Remove-Module` cmdlet. To load or reload a module,
34+
use `Import-Module`.
3435

35-
Modules can be created as compiled .NET assemblies written in C#, or
36-
script-based modules written in PowerShell. This topic explains how to use
37-
PowerShell modules. For information about how to write PowerShell modules, see
38-
[Writing a PowerShell Module][02].
36+
PowerShell comes with a base set of modules. Anyone can create new PowerShell
37+
commands or other resources, and publish them as modules that users can install
38+
as needed.
39+
40+
You can write modules in C# as compiled .NET assemblies, known as native
41+
modules, or in plain PowerShell, known as script modules. This topic explains
42+
how to use PowerShell modules. For information about how to create PowerShell
43+
modules, see [Writing a PowerShell Module][02].
3944

4045
> [!NOTE]
4146
> Prior to PowerShell 3.0, cmdlets and providers were packaged in PowerShell
@@ -92,8 +97,8 @@ Use the following command to create a `Modules` folder for the current user:
9297
$folder = New-Item -Type Directory -Path $HOME\Documents\PowerShell\Modules
9398
```
9499

95-
Copy the entire module folder into the new created folder. In PowerShell use the
96-
`Copy-Item` cmdlet. For example, run the following command to copy the
100+
Copy the entire module folder into the new created folder. In PowerShell use
101+
the `Copy-Item` cmdlet. For example, run the following command to copy the
97102
`MyModule` folder from `C:\PSTest` to the folder you just created:
98103

99104
```powershell

reference/7.5/Microsoft.PowerShell.Core/About/about_Modules.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Explains how to install, import, and use PowerShell modules.
33
Locale: en-US
4-
ms.date: 03/18/2024
4+
ms.date: 08/09/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_modules?view=powershell-7.5&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Modules
@@ -13,29 +13,34 @@ Explains how to install, import, and use PowerShell modules.
1313

1414
## Long description
1515

16-
PowerShell is a scripting language and a command shell. The language is
17-
comprised of [keywords][07], which provide the structure and logic of
18-
processing, and commands that perform the work. Commands in PowerShell are
19-
implemented as scripts, functions, or cmdlets.
16+
PowerShell is both a command shell and a scripting language. Commands in
17+
PowerShell are implemented as scripts, functions, or cmdlets. The language
18+
includes [keywords][07], which provide the structure and logic of processing,
19+
and other resources, such as variables, providers, aliases.
2020

21-
A module is a self-contained reusable unit that can contain cmdlets, providers,
22-
functions, variables, and other types of resources that can be imported as a
23-
single unit.
21+
A module is a self-contained, reusable unit that can include cmdlets, providers,
22+
functions, variables, and other resources that can be imported into a PowerShell
23+
session or any custom PowerShell program.
2424

25-
PowerShell comes with a base set of modules. You can also install more modules
26-
as needed. By default, installed modules are loaded automatically the first
27-
time you use a command from a module. Use the `$PSModuleAutoloadingPreference`
28-
variable to enable, disable and configure automatic loading of modules. For
29-
more information, see [about_Preference_Variables][08].
25+
Before the functionality contained in a module is usable, the module must be
26+
loaded into the PowerShell session. By default, PowerShell automatically loads
27+
an installed module the first time you use a command from the module. You can
28+
configure automatic module loading behavior using the variable
29+
`$PSModuleAutoloadingPreference`. For more information, see
30+
[about_Preference_Variables][08].
3031

31-
You can unload or reload during a session. Use the `Remove-Module` cmdlet to
32-
unload a module from your session. Use the `Import-Module` cmdlet to load a
33-
module.
32+
You can also manually unload or reload modules during a PowerShell session. To
33+
unload a module, use the `Remove-Module` cmdlet. To load or reload a module,
34+
use `Import-Module`.
3435

35-
Modules can be created as compiled .NET assemblies written in C#, or
36-
script-based modules written in PowerShell. This topic explains how to use
37-
PowerShell modules. For information about how to write PowerShell modules, see
38-
[Writing a PowerShell Module][02].
36+
PowerShell comes with a base set of modules. Anyone can create new PowerShell
37+
commands or other resources, and publish them as modules that users can install
38+
as needed.
39+
40+
You can write modules in C# as compiled .NET assemblies, known as native
41+
modules, or in plain PowerShell, known as script modules. This topic explains
42+
how to use PowerShell modules. For information about how to create PowerShell
43+
modules, see [Writing a PowerShell Module][02].
3944

4045
> [!NOTE]
4146
> Prior to PowerShell 3.0, cmdlets and providers were packaged in PowerShell
@@ -92,8 +97,8 @@ Use the following command to create a `Modules` folder for the current user:
9297
$folder = New-Item -Type Directory -Path $HOME\Documents\PowerShell\Modules
9398
```
9499

95-
Copy the entire module folder into the new created folder. In PowerShell use the
96-
`Copy-Item` cmdlet. For example, run the following command to copy the
100+
Copy the entire module folder into the new created folder. In PowerShell use
101+
the `Copy-Item` cmdlet. For example, run the following command to copy the
97102
`MyModule` folder from `C:\PSTest` to the folder you just created:
98103

99104
```powershell

0 commit comments

Comments
 (0)