toFormattedString

Converts a list variable to.a string variable with comma-separated values.

Syntax:

$[ScriptVariable]::toFormattedString()

Parameters:

None

Example:

The following example illustrates the syntax for the toFormattedString list method (using the $recipients list variable created in the add example):

$members = $recipients::toFormattedString()

print($members)

Output:

Engineering Group, Building 14, Winston Smythe