< Back

Update-CTypeFormatData

Mon Jan 13, 2020 8:22 am

NAME Update-CTypeFormatData



SYNOPSIS

Add the specified formatting metadata to the current runspace.





SYNTAX

Update-CTypeFormatData [-TypeName] <String> -FormatDataString <String> [<CommonParameters>]





DESCRIPTION





PARAMETERS

-TypeName <String>

Full typename for the type including namespace



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-FormatDataString <String>

Format data string from Get-CTypeFormatPS1XML



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$tableProperties = ConvertFrom-Csv @'



PropertyType,PropertyName,PropertyTableWidth

string,Name,20

string,HostName,20

DateTime,WhenCreated,25

DateTime,WhenDeleted,25

'@

$text = $tableProperties | Get-CTypeFormatPS1XML -TypeName "$Namespace.$TypeName"

Update-CTypeFormatData -TypeName "$Namespace.$TypeName" -FormatDataString $text











RELATED LINKS

Get-CTypeFormatPS1XML

Add-CType

Update-FormatData