diff --git a/src/Authentication.ResourceManager/Models/PSAzureContext.cs b/src/Authentication.ResourceManager/Models/PSAzureContext.cs
index c171564aa1..fbede37758 100644
--- a/src/Authentication.ResourceManager/Models/PSAzureContext.cs
+++ b/src/Authentication.ResourceManager/Models/PSAzureContext.cs
@@ -150,30 +150,30 @@ public PSAzureContext(PSObject other)
///
/// The name of the context. The context may be selected by name
///
- [Ps1Xml(Label = "Context Name", Target = ViewControl.Table)]
+ [Ps1Xml(Label = "Name", Target = ViewControl.Table, Position = 0)]
public string Name { get; set; }
///
/// The account used to connect to Azure.
///
- [Ps1Xml(Label = "Account id", Target = ViewControl.Table, ScriptBlock = "$_.Account.Id")]
+ [Ps1Xml(Label = "Account", Target = ViewControl.Table, Position = 1)]
public IAzureAccount Account { get; set; }
///
/// The endpoint and connection metadata for the targeted instance of the Azure cloud.
///
- [Ps1Xml(Label = "Environment Name", Target = ViewControl.Table, ScriptBlock = "$_.Environment.Name")]
+ [Ps1Xml(Label = "Environment", Target = ViewControl.Table, Position = 3)]
public IAzureEnvironment Environment { get; set; }
///
/// The subscription targeted in Azure.
///
- [Ps1Xml(Label = "Subscription Name", Target = ViewControl.Table, ScriptBlock = "$_.Subscription.Name")]
+ [Ps1Xml(Label = "SubscriptionName", Target = ViewControl.Table, ScriptBlock = "$_.Subscription.Name", Position = 2)]
public IAzureSubscription Subscription { get; set; }
///
/// The targeted tenant in Azure.
///
- [Ps1Xml(Label = "Tenant Id", Target = ViewControl.Table, ScriptBlock = "$_.Tenant.Id")]
+ [Ps1Xml(Label = "TenantId", Target = ViewControl.Table, ScriptBlock = "$_.Tenant.ToString()", Position = 4)]
public IAzureTenant Tenant { get; set; }
public IAzureTokenCache TokenCache { get; set; }
diff --git a/src/Authentication.ResourceManager/Models/PSAzureEnvironment.cs b/src/Authentication.ResourceManager/Models/PSAzureEnvironment.cs
index e1cfb14fa1..8341e3358e 100644
--- a/src/Authentication.ResourceManager/Models/PSAzureEnvironment.cs
+++ b/src/Authentication.ResourceManager/Models/PSAzureEnvironment.cs
@@ -14,6 +14,7 @@
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
using Microsoft.Azure.Commands.Profile.Common;
+using Microsoft.WindowsAzure.Commands.Common.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -117,6 +118,7 @@ public PSAzureEnvironment(PSObject other)
///
/// Gets or sets the name of the environment.
///
+ [Ps1Xml(Label = "Name", Target = ViewControl.Table, Position = 0)]
public string Name { get; set; }
///
@@ -170,6 +172,7 @@ public bool OnPremise
///
/// Gets or sets the Uri of the Azure Resource Manager (ARM) service.
///
+ [Ps1Xml(Label = "Resource Manager Url", Target = ViewControl.Table, Position = 1)]
public string ResourceManagerUrl { get; set; }
///
@@ -185,6 +188,7 @@ public bool OnPremise
///
/// Gets or sets the Uri of the Active Directory authentication endpoint.
///
+ [Ps1Xml(Label = "ActiveDirectory Authority", Target = ViewControl.Table, Position = 2)]
public string ActiveDirectoryAuthority { get; set; }
///
diff --git a/src/Authentication.ResourceManager/Models/PSAzureProfile.cs b/src/Authentication.ResourceManager/Models/PSAzureProfile.cs
index 7060e485ed..60b364abd5 100644
--- a/src/Authentication.ResourceManager/Models/PSAzureProfile.cs
+++ b/src/Authentication.ResourceManager/Models/PSAzureProfile.cs
@@ -84,10 +84,10 @@ public IDictionary Environments
///
/// The current credentials and metadata for connecting with the current Azure cloud instance.
///
- [Ps1Xml(Label = "Account Name", Target = ViewControl.Table, ScriptBlock = "$_.Context.Account.Name")]
- [Ps1Xml(Label = "Subscription Name", Target = ViewControl.Table, ScriptBlock = "$_.Context.Subscription.Name")]
- [Ps1Xml(Label = "Tenant Id", Target = ViewControl.Table, ScriptBlock = "$_.Context.Tenant.Name")]
- [Ps1Xml(Label = "Environment Name", Target = ViewControl.Table, ScriptBlock = "$_.Context.Environment.Name")]
+ [Ps1Xml(Label = "Account", Target = ViewControl.Table, ScriptBlock = "$_.Context.Account.ToString()", Position = 0)]
+ [Ps1Xml(Label = "SubscriptionName", Target = ViewControl.Table, ScriptBlock = "$_.Context.Subscription.Name", Position = 1)]
+ [Ps1Xml(Label = "TenantId", Target = ViewControl.Table, ScriptBlock = "$_.Context.Tenant.ToString()", Position = 2)]
+ [Ps1Xml(Label = "Environment", Target = ViewControl.Table, ScriptBlock = "$_.Context.Environment.ToString()", Position = 3)]
public PSAzureContext Context { get; set; }
public override string ToString()
diff --git a/src/Authentication.ResourceManager/Models/PSAzureSubscription.cs b/src/Authentication.ResourceManager/Models/PSAzureSubscription.cs
index d4f4eba17f..a37551d504 100644
--- a/src/Authentication.ResourceManager/Models/PSAzureSubscription.cs
+++ b/src/Authentication.ResourceManager/Models/PSAzureSubscription.cs
@@ -88,15 +88,15 @@ public PSAzureSubscription(PSObject other)
}
///
- [Ps1Xml(Label = "Subscription Id", Target = ViewControl.Table)]
+ [Ps1Xml(Label = "Id", Target = ViewControl.Table, Position = 1)]
public string Id { get; set; }
///
- [Ps1Xml(Label = "Subscription Name", Target = ViewControl.Table)]
+ [Ps1Xml(Label = "Name", Target = ViewControl.Table, Position = 0)]
public string Name { get; set; }
///
- [Ps1Xml]
+ [Ps1Xml(Label = "State", Target = ViewControl.Table, Position = 3)]
public string State { get; set; }
///
@@ -107,7 +107,7 @@ public PSAzureSubscription(PSObject other)
///
/// The tenant home for the subscription.
///
- [Ps1Xml(Label = "Tenant Id", Target = ViewControl.Table)]
+ [Ps1Xml(Label = "TenantId", Target = ViewControl.Table, Position = 2)]
public string TenantId
{
get
diff --git a/src/Authentication.ResourceManager/Models/PSAzureTenant.cs b/src/Authentication.ResourceManager/Models/PSAzureTenant.cs
index 2078dfb2de..260e2e84a3 100644
--- a/src/Authentication.ResourceManager/Models/PSAzureTenant.cs
+++ b/src/Authentication.ResourceManager/Models/PSAzureTenant.cs
@@ -88,13 +88,13 @@ public PSAzureTenant(PSObject other)
///
/// The tenant id.
///
- [Ps1Xml(Label = "Tenant Id", Target = ViewControl.Table)]
+ [Ps1Xml(Label = "Id", Target = ViewControl.Table, Position = 0)]
public string Id { get; set; }
///
/// The name of the subscription.
///
- [Ps1Xml(Label = "Directory Name", Target = ViewControl.Table)]
+ [Ps1Xml(Label = "Directory", Target = ViewControl.Table, Position = 1)]
public string Directory { get; set; }
///