# psd1 manifest - RequiredModules inefficient?

**URL:** <https://forums.powershell.org/t/psd1-manifest-requiredmodules-inefficient/6817>\
**Category:** PowerShell Help\
**Created:** [July 14, 2016, 8:49am UTC](https://forums.powershell.org/t/psd1-manifest-requiredmodules-inefficient/6817 "2016-07-14T08:49:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve-ayers](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@steve-ayers](https://forums.powershell.org/u/steve-ayers)\
**Post date:** [July 14, 2016, 8:49am UTC](https://forums.powershell.org/t/psd1-manifest-requiredmodules-inefficient/6817/1 "2016-07-14T08:49:00Z")

</div>

I have created a module (one cmdlet) for my colleagues to easily process Migrations from Azure Classic to Resource Manager:

> **[MigrateTo-AzureRM 1.2.0.2](https://www.powershellgallery.com/packages/MigrateTo-AzureRM/1.2.0.2/)**
>
> Migrates Azure Classic Virtual Networks, and all dependent resources to Resource Manager.

This cmdlet is dependent on the installation of AzureRM & Azure PSGallery modules. In scripts which depend on modules, I would check for modules like so:

```
"Azure","AzureRM" | % {
    if (!(Get-Module $_))
    {
        "Installing $_ module" ; Install-Module -Name $_ -Repository PSGallery
    }
}
```

However, I thought I’d use a manifest, which you can find a copy of here:  
[https://www.powershellgallery.com/packages/MigrateTo-AzureRM/1.2.0.2/Content/MigrateTo-AzureRM.psd1](https://www.powershellgallery.com/packages/MigrateTo-AzureRM/1.2.0.2/Content/MigrateTo-AzureRM.psd1)

When creating the input for RequiredModules, I found that you had to specify either ‘RequiredVersion’ or ‘ModuleVersion’.

Now, every time I install-module, it will attempt to download the dependency modules, and when it does, it takes quite a while due to the sub-modules linked to the AzureRM & Azure modules.

I’d ideally like to specify that you can use any version of the AzureRM & Azure modules, or any version above, for example, 1.5.0. Otherwise, as the Azure modules are updated, and they are updated on my colleagues’ machines, the module will download a legacy version of the Azure & AzureRM modules.

I may be making a mistake with how I’m writing my manifest file, so any advice is much appreciated!

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [July 26, 2016, 8:15am UTC](https://forums.powershell.org/t/psd1-manifest-requiredmodules-inefficient/6817/2 "2016-07-26T08:15:04Z")

</div>

If I’m understanding that you’re doing and what you’re asking, then “no.” Right now, the versioning doesn’t understand anything but exact numbers - there’s no “minimum level” or anything. I can see where that’d be useful, and you might consider suggesting it in PowerShell’s UserVoice. Or possibly instead look into scripting Update-Module, which has some “grab the latest version or don’t do anything” intelligence.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:40pm UTC](https://forums.powershell.org/t/psd1-manifest-requiredmodules-inefficient/6817/3 "2024-05-16T20:40:47Z")

</div>


