From deebc02658ec50588a61b6884c286e3b8fe3d79f Mon Sep 17 00:00:00 2001 From: hugocasa Date: Fri, 10 Oct 2025 18:47:52 +0200 Subject: [PATCH] powershell module required version --- docs/advanced/6_imports/index.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/advanced/6_imports/index.mdx b/docs/advanced/6_imports/index.mdx index a967b9efb..687a0f0c5 100644 --- a/docs/advanced/6_imports/index.mdx +++ b/docs/advanced/6_imports/index.mdx @@ -126,6 +126,15 @@ e.g.: Import-Module -Name MyModule ``` +You can specify the version of the module to install by using the `-RequiredVersion` parameter. + +e.g.: + +```powershell +Import-Module -Name MyModule -RequiredVersion 1.0.0 +``` + + ### Private repository (Azure artifacts feed) To setup an Azure artifacts feed as a private PowerShell repository, follow the [Azure documentation](https://learn.microsoft.com/en-us/azure/devops/artifacts/tutorials/private-powershell-library).