Convert HashtableToString - PPOSHGROUP/PPoShTools GitHub Wiki

Convert-HashtableToString

PPoShTools -> Convert-HashtableToString.ps1

Synopsis

Converts hashtable or any other dictionary to a serializable string. It also supports nested hashtables.

Syntax

Convert-HashtableToString [-Hashtable] <IDictionary> [<CommonParameters>]

Parameters

-Hashtable<IDictionary>

Hashtable to convert.

  • PipelineInput: true (ByValue)
  • Required: true

Examples

Example 1

Convert-HashtableToString -Hashtable @{'key' = 'value'; 'keyNested' = @{'a' = 'b'}}

@{'key'='value'; 'keyNested'=@{'a'='b'; }; }

⚠️ **GitHub.com Fallback** ⚠️