-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update-M365DSCDependencies: ... does not support PowerShell Core #5433
Comments
last working version: 1.24.626.1 |
@fasteiner This is not a problem but expected behavior. Microsoft365DSC only supports the use case where the PowerShell modules are installed under C:\Program Files\WindowsPowerShell\Modules... path. This is due to internal restrictions in using the Cmdlets, but you can still use PowerShell 7 without problems. The only thing you have to take into consideration is to update the modules from inside Windows PowerShell (running as an administrator). We do understand that this might not be beneficial for all, but it's the only supported way to use Microsoft365DSC. |
@FabienTschanz Up to version 1.24.626.1, this module was fully supported in PowerShell Core, which aligned well with our automation environment. However, with its integration into our PowerShell 7-only workflows, we are now faced with the challenge of transitioning away from this module due to the decision to discontinue support for PowerShell Core. This decision is perplexing, given that the module had already achieved full compatibility with PowerShell 7. Moving backward in compatibility undermines advancements and forces us to sunset this module in favor of developing our own implementation—a decision that is both time-consuming and resource-intensive. We encourage reconsideration of this approach to ensure continuity and compatibility for users who rely on modern PowerShell environments. |
@fasteiner As a fellow engineer, I fully understand your situation. I personally am also not happy with that, so I'll take it up on myself and check what we from the community can do to make it fully compatible with PowerShell Core. But this will take time since I'm only working on this module in my own free time as a contributor and not a fully-fledged member. One thing I would like to mention here: I was the one who updated the module to "only" allow installation of the required modules within Windows PowerShell. This is because of some dependencies and statements that Microsoft365DSC requires the modules to be installed in the Windows PowerShell module directory. Why that is, and what this requirement is still a hard dependency, is something I'm not aware of. I will take a look and start my preparations. One question at last: Running |
@FabienTschanz Ok, but the module worked before that requirement was introduced (at least in PowerShell 7), would it make sense to revert back to the state where this was not required to be installed in Windows PowerShell? regarding your question: I tried that unfortunately, running in PowerShell Core still was not possible: Therefore, I switched to an older version. |
@fasteiner Backwards compatibility is essential for modules this big. It's not easy to introduce something new without breaking things in a completely different location. The best example is PnP.PowerShell, the current module version requires PowerShell 5.1 and does not work with PowerShell 7, however if we were to update to a newer version, we would kill support for PowerShell 5.1 and require e.g. 7.2. That has to be done with a breaking change release and is not feasible unless we introduce new major functions... Currently, that's not in sight. What I think could work: If we are running in PowerShell Core and no modules are present, we can install them in the current environment (except of PnP.PowerShell which requires it to be installed in PowerShell 5.1). I'm not sure how that would be handled by PowerShell Core if the modules are both present in 5.1 and Core, that's something that we need to take a look at. Edit: What's the output of |
@fasteiner With the latest release, you'll only have to install the |
Description of the issue
When running the update Dependencies command in PowerShell Core this happens:
14:22:46 WARNING: The dependency {Az.Accounts} does not support PowerShell Core. Please run Update-M365DSCDependencies in Windows PowerShell.
14:22:46 WARNING: The dependency {Az.ResourceGraph} does not support PowerShell Core. Please run Update-M365DSCDependencies in Windows PowerShell.
14:22:46 WARNING: The dependency {Az.Resources} does not support PowerShell Core. Please run Update-M365DSCDependencies in Windows PowerShell.
14:22:46 WARNING: The dependency {Az.SecurityInsights} does not support PowerShell Core. Please run Update-M365DSCDependencies in Windows PowerShell.
14:22:46 WARNING: The dependency {ExchangeOnlineManagement} does not support PowerShell Core. Please run Update-M365DSCDependencies in Windows PowerShell.
14:22:48 WARNING: The dependency {Microsoft.PowerApps.Administration.PowerShell} does not support PowerShell Core. Please run Update-M365DSCDependencies in Windows PowerShell.
14:22:48 WARNING: The dependency {MicrosoftTeams} does not support PowerShell Core. Please run Update-M365DSCDependencies in Windows PowerShell.
All of this modules are PowerShell Core compatible, therefore you must have a mistake in your dependencies.
Also, this requires me to install the module as administrator, which is not favorable and also I wonder why the Scope switch is being ignored again?
I'll try downgrading now, but this needs to be fixed!
Microsoft 365 DSC Version
1.24.1113.1
Which workloads are affected
other
The DSC configuration
n/a
Verbose logs showing the problem
n/a
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: