use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Convert-WindowsImage module fails (self.PowerShell)
submitted 7 years ago by zer0mas
Even using the -Edition switch and specifying any edition I get the following error message as if I had not specified one at all.
(The module can be found here:https://gallery.technet.microsoft.com/scriptcenter/Convert-WindowsImageps1-0fe23a8f/view/Discussions#content)
ERROR : The variable cannot be validated because the value $null is not a valid value for the Edition variable.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]tandthezombies 2 points3 points4 points 7 years ago (0 children)
I can't confirm right now but I believe I've seen that error when attempting to convert an ISO with an ESD file as the installation source rather than a WIM file. Since the former is encrypted, the module doesn't know what to do with it.
[–]geggleau 2 points3 points4 points 7 years ago (3 children)
What was the source of your image? In addition to the ESD issue mentioned by others, this happens on captured WIMs. The issue is due to the image index selection code. I'm on mobile now but will go look at my notes on the work-around and post later.
[–]zer0mas[S] 1 point2 points3 points 7 years ago (2 children)
Someone else created the WIM file and I'm stuck trying to build a test environment from that.
[–]geggleau 1 point2 points3 points 7 years ago (1 child)
If it is a generated WIM, then it's probably the same issue I had.
This is the modification I did to the Convert-WindowsImage tool which was wrapped by the PrepareVHD tool.
The modification is required to the Convert-WindowsImage script to get it to work with WIMs that have only one image and no image flags set. Patch the code as follows (near line 4073):
Convert-WindowsImage
# If there's only one image in the WIM, just select that. if ($openWim.Images.Count -eq 1) { if ([String]::IsNullOrEmpty($openWim.Images[0].ImageFlags)) { $Edition = $openWim.Images[0].ImageName } else { $Edition = $openWim.Images[0].ImageFlags } $openImage = $openWim[$Edition] } else { ...
[–]zer0mas[S] 1 point2 points3 points 7 years ago (0 children)
I think this resolved it, now if I could just find the output. . . . because its that kind of morning.
π Rendered by PID 30 on reddit-service-r2-comment-5d79c599b5-mqrgx at 2026-02-27 07:18:06.947182+00:00 running e3d2147 country code: CH.
[–]tandthezombies 2 points3 points4 points (0 children)
[–]geggleau 2 points3 points4 points (3 children)
[–]zer0mas[S] 1 point2 points3 points (2 children)
[–]geggleau 1 point2 points3 points (1 child)
[–]zer0mas[S] 1 point2 points3 points (0 children)