Summary of the new feature / enhancement
See: #7845
microsoft-github-policy-service bot
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of
PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
Putting words into action:
This is still an issue for us for two reasons:
- We use a ModuleBuilder to create a single
.psm1 file to get the best performance
- Therefore it would be nice to also be able to embed
FormatData (ps1xml file contents) directly in the module
- Besides, we want sign our modules (
.psm1 files)
- In which case it shouldn't be necessarily to sign these
ps1xml files separately (or first export the xml and than re-import it🙄)
Proposed technical implementation details (optional)
In other words, I would like to be able to prepend the actual XML content (from an embedded in-memory ps1xml string):
Wishful thinking:
$Xml = [Xml]'
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<ViewDefinitions>
<View>
<Name>XdnName</Name>
<OutOfBand />
<ViewSelectedBy>
<TypeName>XdnName</TypeName>
</ViewSelectedBy>
<CustomControl>
<CustomEntries>
<CustomEntry>
<CustomItem>
<ExpressionBinding>
<ScriptBlock>
$_.ToColoredString()
</ScriptBlock>
</ExpressionBinding>
</CustomItem>
</CustomEntry>
</CustomEntries>
</CustomControl>
</View>
</ViewDefinitions>
</Configuration>
'
Update-FormatData -PrependXml $Xml
Summary of the new feature / enhancement
See: #7845
Putting words into action:
This is still an issue for us for two reasons:
.psm1file to get the best performanceFormatData(ps1xmlfile contents) directly in the module.psm1files)ps1xmlfiles separately (or first export thexmland than re-import it🙄)Proposed technical implementation details (optional)
In other words, I would like to be able to prepend the actual XML content (from an embedded in-memory
ps1xmlstring):Wishful thinking: