Get-UcM365TenantId
Syntax
Get-UcM365TenantId
-Domain
Description
This function returns the Tenant ID associated with a domain that is part of a Microsoft 365 Tenant.
Parameters
- Domain – Specifies a domain registered with Microsoft 365.
Example
Get-UcM365TenantId -Domain uclobby.com
Get-UcM365Domains
Syntax
Get-UcM365Domains
-Domain
Description
This function returns a list of domains that are associated and validated with a Microsoft 365 Tenant.
Parameters
- Domain – Specifies a domain registered with Microsoft 365.
Example
Get-UcM365Domains -Domain uclobby.com
Export-UcM365LicenseAssignment
Syntax
Export-UcM365LicenseAssignment
-SKU
-UseFriendlyNames
-SkipServicePlan
-OutputPath
-DuplicateServicePlansOnly
Description
This script will get a report of all Service Plans assigned to users and how the license is assigned to the user (Direct, Inherited)
Contributors: David Paulino, Freydem Fernandez Lopez, Gal Naor
Requirements
- EntraAuth PowerShell Module (Install-Module EntraAuth)
or
Microsoft Graph Auth PowerShell Module (Install-Module Microsoft.Graph.Authentication) - Microsoft Graph Permissions:
- Directory.Read.All
- Or
- User.Read.All
- Organization.Read.All
Parameters
- SKU – Filter for a specific license SKU Part Name or if we use the UseFriendlyNames switch we can specify the Product Name.
- UseFriendlyNames – When present will download a csv file containing the License/ServicePlans friendly names – Product names and service plan identifiers for licensing.
- SkipServicePlan – When present will just check the licenses and not the service plans assigned to the user.
- OutputPath – Allows to specify the path where we want to save the results. By default, it will save on current user Download.
- DuplicateServicePlansOnly – When present the report will be the users that have the same service plan from different assigned licenses.
Example
Export-UcM365LicenseAssignment
Export-UcM365LicenseAssignment -UseFriendlyNames
Export-UcM365LicenseAssignment -SKU "SPE_E5"
Export-UcM365LicenseAssignment -UseFriendlyNames -SKU "Microsoft 365 E5"
Export-UcM365LicenseAssignment -UseFriendlyNames -DuplicateServicePlansOnly