< Back

ConvertTo-NamingDictionary

Mon Jan 13, 2020 4:24 am

NAME ConvertTo-NamingDictionary



SYNOPSIS

Takes the supplied scheme string and resolves it to a hashtable of values.





SYNTAX

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



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





DESCRIPTION

With ConvertTo-NamingDictionarythe scheme string is evaluated like described in

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

The result is split into :

1. value = placeholders substituted with corresponding value, no failover parameters evaluated

2. failover = all failover possibilites





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.Collections.Hashtable





NOTES





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



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



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

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



@{

"value" = "Torben Soennecken"

"failover" = @(

"Torben1 Soennecken",

"Torben2 Soennecken",

...

"Torben9 Soennecken"

)

}











RELATED LINKS