diff --git a/src/Commands/Admin/GetHubSite.cs b/src/Commands/Admin/GetHubSite.cs index 552f83030..ed8496d32 100644 --- a/src/Commands/Admin/GetHubSite.cs +++ b/src/Commands/Admin/GetHubSite.cs @@ -18,7 +18,13 @@ protected override void ExecuteCmdlet() var hubSiteProperties = Identity.GetHubSite(Tenant); AdminContext.Load(hubSiteProperties); AdminContext.ExecuteQueryRetry(); - WriteObject(hubSiteProperties); + if ((bool)hubSiteProperties.ServerObjectIsNull) + { + WriteObject(null); + } + else { + WriteObject(hubSiteProperties); + } } else {