-
Notifications
You must be signed in to change notification settings - Fork 290
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
24.06.2 - 2_createParentDisks.ps1 fails in PowerShell 7 #602
Comments
doing the same Terminal > PS 5.1 works fine. |
can confirm this in a different OS (W11). |
Also confirm the same on WS 2022 Using Windows Terminal / PS 7.4.5 fails Tested OS If you see the same I believe it might be good opening an issue in PowerShell 7 repo. I would care about this. |
Yeah, it never worked with PS7 |
Sad to hear. 1 and deploy and other Script work well. |
Does not make sense. It's incompatible with PowerShell DSC. It's a "feature" |
OK. Thanks Jaromir. I have no insights so if you say they cannot fix this it's not worth trying. If I run createparentdisks from the subfolder there is no warning and termination Can I assume that only 2_createparentdisk is affected? |
Bug understood - this is a breaking change in PowerShell 7.2. I went ahead and coded up a fix, please try it out. |
@michbern-ms i added you as admin. Feel free to discuss internally with @machv what's needed. Thank you for your contributions! |
Thanks, Jaromir - I'm honored. I think my fix should cover the PS7 issue. If there are other things we should look at together, please let me know. |
Don't see why
repro:
run Windows Server Insider b26296
install mslab 24.05.2
open Terminal > PowerShell 7.4.5
execute 1_Prereq
execute 2_CreateParentDisks
error:
PS H:\mslab_v24.06.2-2408-prod> .\2_CreateParentDisks.ps1
ParserError: H:\mslab_v24.06.2-2408-prod\2_CreateParentDisks.ps1:1056 Line | 1056 | … Import-DscResource -ModuleName PSDesiredStateConfiguratio … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Could not find the module 'PSDesiredStateConfiguration'.
The text was updated successfully, but these errors were encountered: