-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New Feature] - Get-PnPTenantInfo - to get tenant info of any tenant #3414
[New Feature] - Get-PnPTenantInfo - to get tenant info of any tenant #3414
Conversation
This reverts commit 5167458.
Hi @NishkalankBezawada - do you need this cmdlet ? We already have Get-PnPTenantId cmdlet which retrieves tenant Id value . What we usually do here is we add only cmdlets which we should need in your day to day life or which complete a story like the one you did PnPFlowOwner Adding more cmdlets means we will have to spend more time in maintaining it. So , need to add only those ones which we absolutely need. |
Hello @gautamdsheth, Agreed. But I did see some scope of enhancement in this command (may be), and took an inspiration from cli-m365-tenant-info-get. Anyways, should i close the PR then? Please suggest Thanks, |
Get-PnPTenantId just gets the tenant Id. We also have Get-PnPTenantInstance but that just gets the URLs and data locations of a tenant. This new cmdlet would allow to retrieve the default domain name. That could be useful and I don't believe we have anything as such today yet. I would say for the scenario where you don't provide any parameters, as I see in your example above, it would return an error. Could that be updated to show the info about the currently connected to tenant instead? That would fall more in line with how other cmdlets work today. @gautamdsheth What do you think? I would say we keep it |
@NishkalankBezawada / @KoenZomers - yeah ok lets keep it. Leaving some review comments. |
Hello @KoenZomers As suggested in this conversation, I have implemented
Thanks, |
Thanks @NishkalankBezawada , nice addition! |
Thanks @KoenZomers For your support. |
Type
What is in this Pull Request ?
Gets information about any tenant
SYNOPSIS
Gets information about any tenant
SYNTAX
By TenantId
By DomainName
Current Tenant
Get-PnPTenantInfo
DESCRIPTION
Gets information about any tenant. If no Domain name or Tenant id is specified, it returns the Tenant Info of the current tenant.
EXAMPLES
EXAMPLE 1
Returns the tenant information of the specified TenantId as shown. A valid connection with Connect-PnPOnline is required either
EXAMPLE 2
Returns the Tenant Information for the tenant contoso.sharepoint.com as shown. A valid connection with Connect-PnPOnline is required either
EXAMPLE 3
Returns Tenant Information of the current tenant.
EXAMPLE 4
Returns Tenant Information of the current tenant.
PARAMETERS
-TenantId
The id of the tenant to retrieve the information. You can use either TenantId or DomainName to fetch the Tenant information of any tenant.
-DomainName
The Domain name of the tenant to lookup. You can use either TenantId or DomainName to fetch the Tenant information of any tenant. Use the full domain name as "contoso.onmicrosoft.com"
-CurrentTenant
Gets the Tenant Information of the current tenant.
RELATED LINKS
tenantRelationship: findTenantInformationByTenantId
tenantRelationship: findTenantInformationByDomainName