-
Notifications
You must be signed in to change notification settings - Fork 34
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
dsc resource list
with --adapter
flag returns with Exit code 1
#714
Comments
dsc resource list
with --adapter
flag returns powershell with Exit code 1dsc resource list
with --adapter
flag returns with Exit code 1
So basically it is a bit hidden in the trace message @lescx and hasn't directly something to do with cannot be loaded because running scripts is disabled on this system. For more ... If you open a Windows PowerShell session and type in |
Setting the ExecutionPolicy to bypass does indead remove the error Set-ExecutionPolicy Bypass -Scope Process
dsc resource list --adapter Microsoft.Windows/WindowsPowerShell
Type Kind Version Caps RequireAdapter Description
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PSDesiredStateConfiguration/Archive Resource 1.1 gs--t--- Microsoft.Windows/WindowsPowerShell
PSDesiredStateConfiguration/Environment Resource 1.1 gs--t--- Microsoft.Windows/WindowsPowerShell
...
|
I'm not 100% sure, but I think these scripts that are builtin, so the |
You should set the execution policy to Actually, that won't work for CI or local testing since the script won't be signed until we release. |
Discussed internally my proposal to explicitly set execution policy to |
Prerequisites
Summary
I am completely new to DSC and pretty new to Windows so please be kind if I'm missing something pretty obvious. I try my best.
Following the PowerShell team Getting Started devblog post, I'm experiencing the following issue:
I saw the error message with
pwsh
instead ofpowershell
in #639 which links to #539I'm working on a freshly installed Windows 11 Enterprise VM with DSC installed via winget:
I saw the same issue on the stable release but switched to the preview version to see if it has been fixed.
Get-ExecutionPolicy RemoteSigned
Recursively calling
Unblock-File
did not seem to help me here:Not sure if this would be even required. Am I missing something?
Steps to reproduce
Expected behavior
Actual behavior
Error details
Environment data
Version
3.0.0-preview.12
Visuals
No response
The text was updated successfully, but these errors were encountered: