Install-Modules with WinGet Configuration file #5271
Replies: 2 comments 2 replies
-
|
When you store the output of a command in a variable, it's an Object of the System.Array type. When you query the module directly, it's a version type. This is because you're storing the result from |
Beta Was this translation helpful? Give feedback.
-
|
Hi everyone, I wanted to express my gratitude to @Trenly for helping me refine my understanding of the issue we were discussing. In the process, I've stumbled upon a new, peculiar behavior that I'm hoping someone in the community might be able to shed some light on. I'll describe it below. When using the |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I have a simple
configuration.dsc.yamlfile that attempts to setup the Windows PowerShell on a brand new machine. The script should update the PowerShellGet module to the lasted version and install a few other modules. Nothing fancy really!However, this simple task does not work. It seems like each resource block in my configuration file creates a dedicated PowerShell session and, therefore, run commands on Windows PowerShell need to be done as follow:
configuration.dsc.yaml
But unfortunately this code does not work! It always gets into the
ifclause even though when the PowerShellGet module is greater than the specified version. Any idea about what is going on here?Beta Was this translation helpful? Give feedback.
All reactions