utils/HdiUtils.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
26
27
28
29
30
31
32
33
<#
.Synopsis
    Utility function to manubilate HdiCluster
.DESCRIPTION
   This function takes.
    
.EXAMPLE
    ## To be added.
     
.LINK
    https://github.com/mabushaireh/HDICloner
#>



function Get-HdiUtilsClusterDependencies {
    [CmdletBinding()]
    param 
    (
        [Parameter(Mandatory = $true)] [string] $clusterDnsName
    )

    $cluster = Get-AzHDInsightCluster -ClusterName $clusterDnsName

    if (!$cluster){
        Show-Error "Cluster $clusterDnsName doesnt exist!"
    }

    return @{
        Storage = $cluster.DefaultStorageAccount ;
        Network =  $cluster.VirtualNetworkId;
        Submet = $cluster.SubnetName
    }
}