utils/StringUtils.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<#
.Synopsis
    Utility function to fetch cluster's hadoop configs based on the cluster type
.DESCRIPTION
   This function takes.
    
.EXAMPLE
    ## To be added.
     
.LINK
    https://github.com/mabushaireh/HDICloner
#>



function Get-StringUtile($obj){
    $temp = $hashtable
    if (($obj.GetType()).Name -eq "Hashtable"){
        $temp = ConvertTo-Json $obj -Depth 100
    }
    if (($obj.GetType()).Name -eq "Object[]"){
        $temp = ConvertTo-Json $obj -Depth 100
    }
     
    return $temp
}