From 9f861da8014dfc94bd230e46d07603a031e96f66 Mon Sep 17 00:00:00 2001 From: Nithin VR Date: Tue, 28 Nov 2017 11:05:29 +0530 Subject: [PATCH] Removing extra space in the Example 5A script It was highlighting as string in the documentation, I was trying to remove all the extra space. --- .../ConvertFrom-String.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-String.md b/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-String.md index f4179b245f22..f9565abb4b63 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-String.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-String.md @@ -220,23 +220,23 @@ Notice the difference in alignment for the age column between both examples. ### Example 5A: Get to know the generated object ``` - $template = @' - {[string]Name*:Phoebe Cat}, {[string]phone:425-123-6789}, {[int]age:6} - {[string]Name*:Lucky Shot}, {[string]phone:(206) 987-4321}, {[int]age:12} - '@ - - $testText = @' - Phoebe Cat, 425-123-6789, 6 - Lucky Shot, (206) 987-4321, 12 - Elephant Wise, 425-888-7766, 87 - Wild Shrimp, (111) 222-3333, 1 - '@ - - $testText | - ConvertFrom-String -TemplateContent $template -OutVariable PersonalData | - Out-Null - - $PersonalData | Get-Member +$template = @' +{[string]Name*:Phoebe Cat}, {[string]phone:425-123-6789}, {[int]age:6} +{[string]Name*:Lucky Shot}, {[string]phone:(206) 987-4321}, {[int]age:12} +'@ + +$testText = @' +Phoebe Cat, 425-123-6789, 6 +Lucky Shot, (206) 987-4321, 12 +Elephant Wise, 425-888-7766, 87 +Wild Shrimp, (111) 222-3333, 1 +'@ + +$testText | + ConvertFrom-String -TemplateContent $template -OutVariable PersonalData | + Out-Null + +$PersonalData | Get-Member