public PSAzureSubscription(AzureSubscription subscription, AzureSMProfile profile) { SubscriptionId = subscription.Id.ToString(); SubscriptionName = subscription.Name; Environment = subscription.Environment; DefaultAccount = subscription.Account; Accounts = profile.Accounts.Values.Where(a => a.HasSubscription(subscription.Id)).ToArray(); IsDefault = subscription.IsPropertySet(AzureSubscription.Property.Default); IsCurrent = profile.Context != null && profile.Context.Subscription.Id == subscription.Id; CurrentStorageAccountName = subscription.GetProperty(AzureSubscription.Property.StorageAccount); TenantId = subscription.GetPropertyAsArray(AzureSubscription.Property.Tenants).FirstOrDefault(); }