diff --git a/scripts/aad-get-tenantid/README.md b/scripts/aad-get-tenantid/README.md index eac74735..4806fe03 100644 --- a/scripts/aad-get-tenantid/README.md +++ b/scripts/aad-get-tenantid/README.md @@ -6,7 +6,7 @@ plugin: add-to-gallery ## Summary -These are 2 practical scripts I have to get Tenant ID from either a domain name or from a Subscriptionis ID. +These are practical scripts I have to get Tenant ID from either a domain name or from a Subscriptionis ID. These are simple, but very useful to be combined in other scripts. @@ -154,6 +154,22 @@ function Get-TenantIdFromSubscriptionId { ``` [!INCLUDE [More about PowerShell](../../docfx/includes/MORE-PS.md)] + +# [PnP PowerShell](#tab/pnpps) + +```powershell +param ( + [Parameter(Mandatory = $true)] + [string] $domain +) + +$adminSiteURL = "https://$domain-Admin.SharePoint.com" +Connect-PnPOnline -Url $adminSiteURL -Interactive -WarningAction SilentlyContinue +Get-PnPTenantId + +``` +[!INCLUDE [More about PnP PowerShell](../../docfx/includes/MORE-PNPPS.md)] + *** ## Source Credit @@ -165,7 +181,7 @@ Sample first appeared on [https://github.com/dkaaven/M365-Scripts](https://githu | Author(s) | |-----------| | [Daniel Kåven](https://github.com/dkaaven)| - +| [Reshmee Auckloo](https://github.com/reshmee011) | [!INCLUDE [DISCLAIMER](../../docfx/includes/DISCLAIMER.md)] - \ No newline at end of file + diff --git a/scripts/aad-get-tenantid/assets/sample.json b/scripts/aad-get-tenantid/assets/sample.json index 5842edc8..5864034b 100644 --- a/scripts/aad-get-tenantid/assets/sample.json +++ b/scripts/aad-get-tenantid/assets/sample.json @@ -9,7 +9,7 @@ "" ], "creationDateTime": "2024-10-14", - "updateDateTime": "2024-10-14", + "updateDateTime": "2024-10-27", "products": [ "Azure" ], @@ -17,6 +17,10 @@ { "key": "POWERSHELL", "value": "7.2.0" + }, + { + "key": "PNP-POWERSHELL", + "value": "1.11.0" } ], "categories": [ @@ -35,6 +39,12 @@ } ], "authors": [ + { + "gitHubAccount": "reshmee011", + "company": "", + "pictureUrl": "https://avatars.githubusercontent.com/u/7693852?v=4", + "name": "Reshmee Auckloo" + }, { "gitHubAccount": "dkaaven", "company": "", @@ -43,7 +53,11 @@ } ], "references": [ - + { + "name": "Want to learn more about PnP PowerShell and the cmdlets", + "description": "Check out the PnP PowerShell site to get started and for the reference to the cmdlets.", + "url": "https://aka.ms/pnp/powershell" + } ] } ]