Private/Get-InfrastructureDataFromStorage.ps1
# Will be called in VM function Global:Get-InfrastructureDataFromStorage { [CmdletBinding()] <# .SYNOPSIS ... maybe obsolete .DESCRIPTION ... #> param( [Parameter(Mandatory = $true)] $StorageAccountContext, [Parameter(Mandatory = $true)] [string] $TableNameInfrastructureData ) process { Write-CustomHost -Message "Loading infrastructure-data from Storage-table $TableNameInfrastructureData..." $environments = @() $storageAccountTable = Get-AzStorageTable -Name $TableNameInfrastructureData -Context $StorageAccountContext $cloudTable = $storageAccountTable.CloudTable $row = Get-AzTableRow -Table $cloudTable $infrastructure = [pscustomobject]@{ ApplicationServerLoadBalancerIP = $row.ApplicationServerLoadBalancerIP; DnsIdentity = $row.DnsIdentity; } $environments += $instance $infrastructure } } |