---
title: "Discussion on \"Import new (or update existing) PowerShell module (including its dependencies!) into Azure Automation Account using PowerShell\" | Hashnode"
description: "Discussion on \"Import new (or update existing) PowerShell module (including its dependencies!) into Azure Automation Account using PowerShell\". I bet you would agree that importing PowerShell modules to Azure Automation Account using GUI is super annoying.\nMoreover, if such a module has some dependencies, you have to import them one by one beforehand and often in the correct order too. Not t..."
url: "https://hashnode.com/posts/import-new-or-update-existing-powershell-module-including-its-dependencies-into-azure-automation-account-using-powershell/65afddd7c2dd0c6f6b7cf2e9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Import new (or update existing) PowerShell module (including its dependencies!) into Azure Automation Account using PowerShell](https://doitpshway.com/import-new-or-update-existing-powershell-module-including-its-dependencies-into-azure-automation-account-using-powershell?utm_source=hashnode&utm_medium=feed)

I bet you would agree that importing PowerShell modules to Azure Automation Account using GUI is super annoying. Moreover, if such a module has some dependencies, you have to import them one by one beforehand and often in the correct order too. Not t...

Jan 23, 2024 · 5 min read · doitpshway.com  
Updated Jan 25, 2024  
Read the article

-   [#powershell](https://hashnode.com/tag/powershell)
-   [#dependencies](https://hashnode.com/tag/dependencies)
-   [#ast](https://hashnode.com/tag/ast)
-   [#azure](https://hashnode.com/tag/azure)

## Written by

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

@AndrewZtrhgf · Czech Republic

  
[View profile](https://hashnode.com/@AndrewZtrhgf)

System Administrator that loves PowerShell

I work as System Administrator for more than 15 years now and I love to make my life easier by automating work &amp; personal stuff via PowerShell (even silly things like food recipes list generation).

## Responses 2

Markdown supported · ⌘↵ to post

[Lewis Thorley](https://hashnode.com/@lewis555)

[Feb 27, 2025](https://hashnode.com/posts/import-new-or-update-existing-powershell-module-including-its-dependencies-into-azure-automation-account-using-powershell/65afddd7c2dd0c6f6b7cf2e9/comment/67c02ea5fcba634156125e4e)

Hello Ondrej,

I know only Runtime Version 5.1 & 7.2 are supported values by Get-AzAutomationModule at time of writing.

https://github\[.\]com/Azure/azure-powershell/issues/27235#issuecomment-2687160833

I raised a feature request for 7.4 and looks like that will be added by 15/05. It would be great if this could be added to your module after general release.

Thanks for your work on creating this function, it works great :).

[Ľuboš Nikolíni](https://hashnode.com/@najki)

[Jan 25, 2024](https://hashnode.com/posts/import-new-or-update-existing-powershell-module-including-its-dependencies-into-azure-automation-account-using-powershell/65afddd7c2dd0c6f6b7cf2e9/comment/65b22eec47a58fab5a592793)

Ahoj Ondreji, I noticed the error message when using "-RuntimeVersion 7.1" parameter as you mentioned in the article (personally I do not need v7.1, but reporting in case you would like to have a look at it).

"New-AzAutomationModule : Cannot validate argument on parameter 'RuntimeVersion'. The argument "7.1" does not belong to the set "5.1,7.2" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again."

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Jan 25, 2024](https://hashnode.com/posts/import-new-or-update-existing-powershell-module-including-its-dependencies-into-azure-automation-account-using-powershell/65afddd7c2dd0c6f6b7cf2e9/comment/65b22eec47a58fab5a592793#reply-65b231c817c2021519ef4c6f)

Thats a funny thing. GUI shows it, but official commands (like Get-AzAutomationModule) don't support it :) So I will remove it too. Thanks for pointing this out

[Ľuboš Nikolíni](https://hashnode.com/@najki)

[Jan 24, 2024](https://hashnode.com/posts/import-new-or-update-existing-powershell-module-including-its-dependencies-into-azure-automation-account-using-powershell/65afddd7c2dd0c6f6b7cf2e9/comment/65b13658e8bbe6e6b8eb3a5d)

Hello Ondrej, when trying your New-AzureAutomationModule example, I am getting the following error:

New-PSGetItemInfo : Cannot convert value "2.0.0-rc3" to type "System.Version". Error: "Input string was not in a correct format."

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Jan 25, 2024](https://hashnode.com/posts/import-new-or-update-existing-powershell-module-including-its-dependencies-into-azure-automation-account-using-powershell/65afddd7c2dd0c6f6b7cf2e9/comment/65b13658e8bbe6e6b8eb3a5d#reply-65b21ca129e57688ef39b85a)

should be fixed in new 1.0.1 module version

[Ľuboš Nikolíni](https://hashnode.com/@najki)

[Jan 25, 2024](https://hashnode.com/posts/import-new-or-update-existing-powershell-module-including-its-dependencies-into-azure-automation-account-using-powershell/65afddd7c2dd0c6f6b7cf2e9/comment/65b13658e8bbe6e6b8eb3a5d#reply-65b22af1739e9d3c7e8ea7b6)

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf) Ahoj Ondreji, I have just tried after updating to 1.0.1 and updating PowerShellGet module locally and it works nicely! Dekuji!

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Jan 25, 2024](https://hashnode.com/posts/import-new-or-update-existing-powershell-module-including-its-dependencies-into-azure-automation-account-using-powershell/65afddd7c2dd0c6f6b7cf2e9/comment/65b13658e8bbe6e6b8eb3a5d#reply-65b22df0431e7707808f98fa)

[Ľuboš Nikolíni](https://hashnode.com/@najki) Super, diky :)
