< Back

ConvertTo-NamingArray

Mon Jan 13, 2020 4:23 am

NAME ConvertTo-NamingArray



SYNOPSIS

Takes the supplied scheme string and resolves it to an array of values.





SYNTAX

ConvertTo-NamingArray -SchemeString <String> -NamingData <NamingData> [<CommonParameters>]



ConvertTo-NamingArray -SchemeString <String> -InputObject <PSObject> [<CommonParameters>]





DESCRIPTION

With ConvertTo-NamingArray the scheme string is evaluated like described in

(link). It replaces all placeholders with the actual data supplied.





PARAMETERS

-SchemeString <String>

Format to resolve data into



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-NamingData <NamingData>

Data to use for substitution of placeholders



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-InputObject <PSObject>

Data to use for substitution of placeholders



Required? true

Position? named

Default value

Accept pipeline input? false

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

System.String[]





NOTES





If a placeholder can not be substituted a terminating error is going to be thrown.



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



PS C:\\>ConvertTo-NamingArray -SchemeString "{givenName(?countUP)} {surName}"" -InputObject

@{"givenName"="Torben";"surName"="Soennecken"}



[

"Torben Soennecken",

"Torben1 Soennecken",

"Torben2 Soennecken",

...

"Torben9 Soennecken"

]











RELATED LINKS