Skip to content

Commit

Permalink
Fixes MicrosoftDocs#7016 - requires assembly is deprecated (Microsoft…
Browse files Browse the repository at this point in the history
sdwheeler authored Dec 14, 2020
1 parent 65152e4 commit f589ec6
Showing 4 changed files with 27 additions and 16 deletions.
11 changes: 7 additions & 4 deletions reference/5.1/Microsoft.PowerShell.Core/About/about_Requires.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
description: Prevents a script from running without the required elements.
keywords: powershell,cmdlet
description: Prevents a script from running without the required elements.
Locale: en-US
ms.date: 07/01/2019
ms.date: 12/14/2020
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_requires?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Requires
@@ -23,7 +22,6 @@ the script.
### Syntax

```
#Requires -Assembly { <Path to .dll> | <.NET assembly specification> }
#Requires -Version <N>[.<n>]
#Requires -PSSnapin <PSSnapin-Name> [-Version <N>[.<n>]]
#Requires -Modules { <Module-Name> | <Hashtable> }
@@ -66,6 +64,11 @@ script invalidated the required state.

#### -Assembly \<Assembly path> | \<.NET assembly specification>

> [!IMPORTANT]
> The `-Assembly` syntax is deprecated. It serves no function. The syntax was
> added in PowerShell 5.1 but the supporting code was never implemented. The
> syntax is still accepted for backward compatibility.
Specifies the path to the assembly DLL file or a .NET assembly name. The
**Assembly** parameter was introduced in PowerShell 5.0. For more information
about .NET assemblies, see [Assembly names](/dotnet/standard/assembly/names).
11 changes: 7 additions & 4 deletions reference/7.0/Microsoft.PowerShell.Core/About/about_Requires.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
description: Prevents a script from running without the required elements.
keywords: powershell,cmdlet
description: Prevents a script from running without the required elements.
Locale: en-US
ms.date: 07/01/2019
ms.date: 12/14/2020
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_requires?view=powershell-7&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Requires
@@ -23,7 +22,6 @@ the script.
### Syntax

```
#Requires -Assembly { <Path to .dll> | <.NET assembly specification> }
#Requires -Version <N>[.<n>]
#Requires -PSSnapin <PSSnapin-Name> [-Version <N>[.<n>]]
#Requires -Modules { <Module-Name> | <Hashtable> }
@@ -66,6 +64,11 @@ script invalidated the required state.

#### -Assembly \<Assembly path> | \<.NET assembly specification>

> [!IMPORTANT]
> The `-Assembly` syntax is deprecated. It serves no function. The syntax was
> added in PowerShell 5.1 but the supporting code was never implemented. The
> syntax is still accepted for backward compatibility.
Specifies the path to the assembly DLL file or a .NET assembly name. The
**Assembly** parameter was introduced in PowerShell 5.0. For more information
about .NET assemblies, see [Assembly names](/dotnet/standard/assembly/names).
12 changes: 7 additions & 5 deletions reference/7.1/Microsoft.PowerShell.Core/About/about_Requires.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
description: Prevents a script from running without the required elements.
keywords: powershell,cmdlet
description: Prevents a script from running without the required elements.
Locale: en-US
ms.date: 07/01/2019
ms.date: 12/14/2020
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_requires?view=powershell-7.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Requires
@@ -23,7 +22,6 @@ the script.
### Syntax

```
#Requires -Assembly { <Path to .dll> | <.NET assembly specification> }
#Requires -Version <N>[.<n>]
#Requires -PSSnapin <PSSnapin-Name> [-Version <N>[.<n>]]
#Requires -Modules { <Module-Name> | <Hashtable> }
@@ -66,6 +64,11 @@ script invalidated the required state.

#### -Assembly \<Assembly path> | \<.NET assembly specification>

> [!IMPORTANT]
> The `-Assembly` syntax is deprecated. It serves no function. The syntax was
> added in PowerShell 5.1 but the supporting code was never implemented. The
> syntax is still accepted for backward compatibility.
Specifies the path to the assembly DLL file or a .NET assembly name. The
**Assembly** parameter was introduced in PowerShell 5.0. For more information
about .NET assemblies, see [Assembly names](/dotnet/standard/assembly/names).
@@ -238,4 +241,3 @@ Param
[about_Automatic_Variables](about_Automatic_Variables.md)

[about_Language_Keywords](about_Language_Keywords.md)

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Prevents a script from running without the required elements.
Locale: en-US
ms.date: 07/01/2019
ms.date: 12/14/2020
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_requires?view=powershell-7.2&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Requires
@@ -22,7 +22,6 @@ the script.
### Syntax

```
#Requires -Assembly { <Path to .dll> | <.NET assembly specification> }
#Requires -Version <N>[.<n>]
#Requires -PSSnapin <PSSnapin-Name> [-Version <N>[.<n>]]
#Requires -Modules { <Module-Name> | <Hashtable> }
@@ -65,6 +64,11 @@ script invalidated the required state.

#### -Assembly \<Assembly path> | \<.NET assembly specification>

> [!IMPORTANT]
> The `-Assembly` syntax is deprecated. It serves no function. The syntax was
> added in PowerShell 5.1 but the supporting code was never implemented. The
> syntax is still accepted for backward compatibility.
Specifies the path to the assembly DLL file or a .NET assembly name. The
**Assembly** parameter was introduced in PowerShell 5.0. For more information
about .NET assemblies, see [Assembly names](/dotnet/standard/assembly/names).
@@ -237,4 +241,3 @@ Param
[about_Automatic_Variables](about_Automatic_Variables.md)

[about_Language_Keywords](about_Language_Keywords.md)

0 comments on commit f589ec6

Please sign in to comment.