Skip to content

Instantly share code, notes, and snippets.

Created Jun 16, 2020
What would you like to do?
Use PowerShell PSTypeNames and custom FormatData to limit default properties emitted from objects
$Object = [PSCustomObject]@{
FirstName = 'Trevor'
LastName = 'Sullivan'
$FormatData = @'
<?xml version="1.0" encoding="utf-8" ?>
$FormatData | Set-Content -Path Person.format.ps1xml
Update-FormatData -AppendPath Person.format.ps1xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment