You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to have a switch that would allow skipping prompts for parameters that have default values defined. I'm currently using Plaster as a part of a large workflow to generate necessary files out of template and having such a capability would make it much easier to run the cmdlet unattended and make me worry less about updating the code if the manifest gets updated new properties with defaults.
For example, suppose there's a manifest like this:
<?xml version="1.0" encoding="utf-8"?>
<plasterManifestschemaVersion="1.1"templateType="Item"xmlns="http://www.microsoft.com/schemas/PowerShell/Plaster/v1">
<metadata>
<name>IssueRepro</name>
<id>8245a80e-f39b-49e8-97cc-9676b6f19294</id>
<version>1.0.0</version>
<title>IssueRepro</title>
<description></description>
<author></author>
<tags></tags>
</metadata>
<parameters>
<parametername='CompanyName'type='text'prompt='Please specify the name for your company'default='MyCompany'/>
<parametername='SomethingUnique'type='text'prompt='Please specify some very unique value'/>
</parameters>
<content></content>
</plasterManifest>
And here's the usage scenario:
Invoke-Plaster-TemplatePath .\MyTemplate -DestinationPath .\OutputFolder -UseDefaultParameterValues
#Prompt for value for 'SomethingUnique'Invoke-Plaster-TemplatePath .\MyTemplate -DestinationPath .\OutputFolder -SomethingUnique '123'-UseDefaultParameterValues
# will not show any prompts at all
Activity