October 2017
Intermediate to advanced
440 pages
11h 47m
English
The Convert-String command may be used to simplify some string conversion operations. The conversion is performed based on an example that must be supplied. For example, Convert-String can generate account names from a list of users:
'Michael Caine', 'Benny Hill', 'Raf Vallone' | Convert-String -Example 'Michael Caine=MCaine'
The example parameter uses the generalized syntax:
<Before>=<After>
This example text does not have to be one of the set being converted, for example, the following will work:
'Michael Caine', 'Benny Hill', 'Raf Vallone' | Convert-String -Example 'First Second=FSecond'
The following alternate syntax is also supported:
'Michael Caine', 'Benny Hill', 'Raf Vallone' | Convert-String -Example @{ Before = ...Read now
Unlock full access