Add a "Compile" verb
PowerShell needs a Compile verb, especially in a world of DevOps. Looking at the approved verb list, there are mediocre subtitutes that could be used in its place (Start-Compilation, Invoke-Compile, etc.), but these all use an inappropriate verb with the a variant of the verb in the noun. When the verb is finding its way into the noun, it's time for a new verb. Please add Compile to the list of approved verbs in an upcoming release.
Thank you for your input. Based on its current ranking compared to other feedback items and product schedule, work on this item is pending (and will be driven by) further customer input.
Robert Simpson commented
One place this would be useful for us is for compiling a Desired State Configuration PowerShell file into a .mof file.
I also agree opening this up to the community for interpretation would be a bad idea. The community (including product teams within Microsoft) have demonstrated that it is very easy to misinterpret how command names should be created, and everyone wants to be an exception. Let's keep the verb list small/regulated, but focus on getting the PowerShell team to add verbs that are missing that would make sense by logging suggestions on UserVoice.
Justin King commented
I personally think dynamic verbs are a bad idea. We don't even have to look that far back, during PS2.0 the cmdlets were so non-standard in their verbs it gave PS a needlessly complex learning curve. I'm all for expanding the list, but this is one area I think MS needs to regulate a bit more so the cmdlets continue to feel intuitive.
I mean, nothing is technically stopping me from writing a custom function right now that follows completely arbitrary guidelines ... but I like that I get a "Warning" to keep things to a standard.
Juho Lehto commented
I believe there is plenty of demand for more verbs, but the bottom line is that the PowerShell team simply cannot cater to all requirements. Which is why I would like to propose an alternative.
Extend the PowerShell module manifest file to include support for custom verbs. Something like Verbs = @('Verb1', 'Verb2'). When importing a module with module manifest, Import-Module would not complain about non-standard verbs.
The downside is that older versions of PowerShell wouldn't support this, but gotta start somewhere I suppose.
@Derp: What if you're sharing what you compile on a web service somewhere? Do you Publish the code into a compiled result, and then you Publish the result to the web service? That's just confusing.
Derp McDerp commented
I think the "Publish" verb could be used instead of "Compile".
@Chris: As a developer I really don't like the idea of ConvertTo-Binary (or ConvertTo-CompiledExe or anything similar). Sure, it's converting the project code to machine code, assembling it into a package, etc. I still wouldn't like ConvertTo-ExecutableMachineCodePackage as a name. There really should just be "Compile" imho, because internally while I may call an exe to do the invocation, if I were to do that I would only do so because a programmatic API to do the same was not available. The verb that best describes what is being done, regardless of the technical details that describe how it is being done internally, is Compile.
Chris Hunt commented
How about ConvertTo-Binary? I would probably use the Complile verb if it existed, but based on what's available, ConvertTo is pretty close.
However, if you are calling some exe to do the compilation, then it is more technically Invoke or Start.
Imagine like you need to compile multiple platform target for same project. It's messy creating Start-CompileiOSBuild, Start-CompileAndroidBuild, Start-CompileWindowsSupport...
Compile verb will let you name as Compile-AndroidBuild, Compile-iOSBuild and so on. Name what you want exactly is what PowerShell stands and it might be much for Cross Platform DevOps.