Last active
July 10, 2018 14:50
-
-
Save Bigtalljosh/771a2c3fcf1e609179a8c8c5f0990c27 to your computer and use it in GitHub Desktop.
Revisions
-
Bigtalljosh renamed this gist
Jul 10, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Bigtalljosh created this gist
Jul 10, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ function Convert-HashToString { param ( [Parameter(Mandatory = $true)] [System.Collections.Hashtable] $Hash ) $hashstr = "@{" $keys = $Hash.keys foreach ($key in $keys) { $v = $Hash[$key] if ($key -match "\s") { $hashstr += "`"$key`"" + "=" + "`"$v`"" + ";" } else { $hashstr += $key + "=" + "`"$v`"" + ";" } } $hashstr += "}" return $hashstr }