diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs index d179a8c4feb..1de50798b42 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs @@ -204,6 +204,7 @@ private object ProcessValue(object obj, int depth) else { TypeInfo t = obj.GetType().GetTypeInfo(); + WriteVerbose(StringUtil.Format(UtilityCommonStrings.ConvertToJsonProcessValueVerboseMessage, t.Name, depth)); if (t.IsPrimitive) { diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx index 551f0d1fcb8..1cfd4750a3e 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx @@ -174,4 +174,7 @@ Cannot construct a security descriptor from the given SDDL due to the following error: {0} + + Processing object of type [{0}] at depth {1} + diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1 index 198cccf5964..8de65fe9e15 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1 @@ -32,7 +32,7 @@ Describe 'ConvertTo-Json' -tags "CI" { }) $null = $ps.BeginInvoke() # wait for verbose message from ConvertTo-Json to ensure cmdlet is processing - Wait-UntilTrue { $ps.Streams.Verbose.Count -gt 0 } + Wait-UntilTrue { $ps.Streams.Verbose.Count -gt 0 } | Should -BeTrue $null = $ps.BeginStop($null, $null) # wait a bit to ensure state has changed, not using synchronous Stop() to avoid blocking Pester Start-Sleep -Milliseconds 100