Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about limitations of -Force #11168

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions reference/5.1/Microsoft.PowerShell.Core/Import-Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 08/17/2023
ms.date: 06/07/2024
no-loc: [Import-Module, -Scope]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/import-module?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -764,7 +764,10 @@ Accept wildcard characters: False

### -Force

This parameter causes a module to be loaded, or reloaded, over top of the current one.
This parameter causes a module to be loaded, or reloaded, over top of the current one. Some modules
load external assemblies. The import fails if you are importing a module that loads a newer version
of an assembly. The **Force** parameter can't override the error. You must start a new session to
load the new version.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down
7 changes: 5 additions & 2 deletions reference/7.2/Microsoft.PowerShell.Core/Import-Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 08/17/2023
ms.date: 06/07/2024
no-loc: [Import-Module, -Scope]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/import-module?view=powershell-7.2&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -783,7 +783,10 @@ Accept wildcard characters: False

### -Force

This parameter causes a module to be loaded, or reloaded, over top of the current one.
This parameter causes a module to be loaded, or reloaded, over top of the current one. Some modules
load external assemblies. The import fails if you are importing a module that loads a newer version
of an assembly. The **Force** parameter can't override the error. You must start a new session to
load the new version.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down
7 changes: 5 additions & 2 deletions reference/7.4/Microsoft.PowerShell.Core/Import-Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 08/17/2023
ms.date: 06/07/2024
no-loc: [Import-Module, -Scope]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/import-module?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -783,7 +783,10 @@ Accept wildcard characters: False

### -Force

This parameter causes a module to be loaded, or reloaded, over top of the current one.
This parameter causes a module to be loaded, or reloaded, over top of the current one. Some modules
load external assemblies. The import fails if you are importing a module that loads a newer version
of an assembly. The **Force** parameter can't override the error. You must start a new session to
load the new version.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down
7 changes: 5 additions & 2 deletions reference/7.5/Microsoft.PowerShell.Core/Import-Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 08/17/2023
ms.date: 06/07/2024
no-loc: [Import-Module, -Scope]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/import-module?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -783,7 +783,10 @@ Accept wildcard characters: False

### -Force

This parameter causes a module to be loaded, or reloaded, over top of the current one.
This parameter causes a module to be loaded, or reloaded, over top of the current one. Some modules
load external assemblies. The import fails if you are importing a module that loads a newer version
of an assembly. The **Force** parameter can't override the error. You must start a new session to
load the new version.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down