UCLobby Teams PowerShell Module

The module is available in the PowerShell Gallery:
PowerShell Gallery – UCLobbyTeams

Source code available in GitHub:
GitHub – UCLobbyTeams

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

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

Export-UcM365LicenseAssignment

Syntax

Get-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 PaulinoFreydem 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

Get-UcM365LicenseAssignment

Get-UcM365LicenseAssignment -UseFriendlyNames

Get-UcM365LicenseAssignment -SKU "SPE_E5"

Get-UcM365LicenseAssignment -UseFriendlyNames -SKU "Microsoft 365 E5"

Get-UcM365LicenseAssignment -UseFriendlyNames -DuplicateServicePlansOnly 

Get-UcEntraObjectsOwnedByUser

Syntax

Get-UcObjectsOwnedByUser
-User
-Type

Description

This function returns the list of Entra Objects associated with the specified user.
Contributors: Jimmy Vincent and David Paulino

Requirements

  • EntraAuth PowerShell Module (Install-Module EntraAuth)
    or
    Microsoft Graph Auth PowerShell Module (Install-Module Microsoft.Graph.Authentication)
  • Microsoft Graph Permissions:
    • User.Read.All
    • Or
      • Directory.Read.All

Parameters

  • User – Specifies the user UPN or User Object ID.
  • Type – Filter by Object Type:
    • Application
    • ServicePrincipal
    • TokenLifetimePolicy
    • SecurityGroup
    • DistributionGroup
    • Microsoft365Group
    • Team
    • Yammer

Example

Get-UcObjectsOwnedByUser -User user@uclobby.com

Export-UcOneDriveWithMultiplePermissions

Syntax

Get-UcOneDriveWithMultiplePermissions
-MultiGeo
-OutputPath

Description

This cmdlet will check all OneDrives and return the OneDrive that have additional users with permissions.

Requirements

  • EntraAuth PowerShell Module (Install-Module EntraAuth)
    or
    Microsoft Graph Auth PowerShell Module (Install-Module Microsoft.Graph.Authentication)
  • Microsoft Graph Permissions:
    • Sites.Read.All
    • Or
      • Sites.ReadWrite.All

Note: Currently the SharePoint Sites requires to authenticate to Graph API with Application – Authentication and authorization basics – Microsoft Graph

Parameters

  • MultiGeo – Required if Tenant is MultiGeo.
  • OutputPath – Allows to specify the path where we want to save the results. By default, it will save on current user Download folder.

Example

Get-UcOneDriveWithMultiplePermissions
Get-UcOneDriveWithMultiplePermissions -MultiGeo

Get-UcTeamsWithSingleOwner

Syntax

Get-UcTeamsWithSingleOwner

Description

This function returns a list of Teams that only have a single owner.

Requirements

Microsoft Teams PowerShell Module (Install-Module MicrosoftTeams)

Example

Get-UcTeamsWithSingleOwner

Get-UcTeamUsersEmail

Syntax

Get-UcTeamUsersEmail
[-TeamName]
[-Role]
[<CommonParameters>]

Description

This function returns a list of users email address that are part of a Team.

Requirements

Microsoft Teams PowerShell Module (Install-Module MicrosoftTeams)

Parameters

  • TeamName – Specifies Team Name.
  • Role – Specifies which roles to filter:
    • Owner
    • User
    • Guest

Example

Get-UcTeamUsersEmail
Get-UcTeamUsersEmail -TeamName "Test Team"
Get-UcTeamUsersEmail -Role Owner

Get-UcTeamsVersion

Syntax

Get-UcTeamsVersion
[-Path]
[-Computer]
[-Credential]

Description

The Get-UcTeamsVersion returns the installed Microsoft Teams desktop version for each user profile.

Parameters

  • Path- Get Teams Version from previously downloaded log files
  • Computer – Specify the computer we want to collect the version from. Requires Admin Shares to be enabled.
  • Credential – Credential to be used to connect to the remote computer

Blog post: Teams: Check client version using PowerShell

Example

Get-UcTeamsVersion
Get-UcTeamsVersion -Path C:\Downloads\
Get-UcTeamsVersion -Computer workstation -Credential (Get-Credential)

Get-UcTeamsDevice

Syntax

Get-UcTeamsDevice
[-TACDeviceID]
[-Filter]
[-Detailed]
[-ExportCSV]
[-OutputPath]
[-UseTAC]

Description

This function fetch Teams Devices provisioned in a M365 Tenant using MS Graph.

Contributors: David Paulino, Silvio Schanz, Gonçalo Sepúlveda, Bryan Kendrick, Daniel Jelinek and Traci Herr.

Requirements

  • EntraAuth PowerShell Module (Install-Module EntraAuth)
    or
    Microsoft Graph Auth PowerShell Module (Install-Module Microsoft.Graph.Authentication)
    Note: UseTAC parameter requires EntraAuth PowerShell Module.
  • Microsoft Graph Permissions:
    • TeamworkDevice.Read.All
    • User.Read.All

Parameters

  • TACDeviceID – Allows specifying a single Teams Device using the Device ID used by TAC.
  • Filter
    •     Phone – Teams Native Phones
    •     MTR – Microsoft Teams Rooms running Windows or Android
    •     MTRW – Microsoft Teams Room Running Windows
    •     MTRA – Microsoft Teams Room Running Android
    •     SurfaceHub – Surface Hub
    •     Display – Microsoft Teams Displays
    •     Panel – Microsoft Teams Panels
  • Detailed – When present it will get detailed information from Teams Devices
  • ExportCSV – When present will export the detailed results to a CSV file. By default, will save the file under the current user downloads, unless we specify the OutputPath.
  • OutputPath – Allows to specify the path where we want to save the results.
  • UseTAC – When present it will use the Teams Admin Center API to get the Teams Devices information.

Example

#Using Microsoft Graph
Get-UcTeamsDevice
Get-UcTeamsDevice -Filter MTR
Get-UcTeamsDevice -Detailed
Get-UcTeamsDevice -ExportCSV
Get-UcTeamsDevice -ExportCSV -OutputPath C:\Reports

#Using TAC API
Connect-UcTeamsDeviceTAC
Get-UcTeamsDevice -UseTAC

Update-UcTeamsDevice

Syntax

Update-UcTeamsDevice
[-UpdateType]
[-DeviceType]
[-DeviceID]
[-SoftwareVersion]
[-InputCSV]
[-Subnet]
[-OutputPath]
[-ReportOnly]
[<CommonParameters>]

Description

This allows Teams administrators to send update commands to multiple Teams Android Devices using MS Graph API.

Contributors Eileen Beato, David Paulino and Bryan Kendrick.

Requirements

  • EntraAuth PowerShell Module (Install-Module EntraAuth)
    or
    Microsoft Graph Auth PowerShell Module (Install-Module Microsoft.Graph.Authentication)
  • Microsoft Graph Permissions:
    • TeamworkDevice.ReadWrite.All

Parameters

  • UpdateType
    • Firmware
    • TeamsApp
  • DeviceType
    • Phone – Teams Native Phones
    • MTRA – Microsoft Teams Room Running Android
    • Display – Microsoft Teams Displays
    • Panel – Microsoft Teams Panels
  • DeviceID – Specify the Teams Admin Center Device ID that we want to update.
  • SoftwareVersion – Allow to specify which version we want to update.
  • InputCSV – When present will use this file as Input, we only need a column with Device Id. It supports files exported from Teams Admin Center (TAC).
  • Subnet – Only available when using InputCSV and requires a “IP Address” column, it allows to only send updates to Teams Android devices within a subnet. Format examples: 10.0.0.0/8, 192.168.0.0/24
  • OutputPath – Allows to specify the path where we want to save the output.
  • ReportOnly – Will read Teams Device Android versions info and generate a report.

Example

Update-UcTeamsDevice
Update-UcTeamsDevice -ReportOnly
Update-UcTeamsDevice -InputCSV C:\UCLobby\DevicesList.csv -Subnet 10.10.0.0/16

Get-UcTeamsDeviceConfigurationProfile

Syntax

Get-UcTeamsDeviceConfigurationProfile
[-Filter]

Description

This function fetch Teams Devices Configuration Profiles using the TAC API.

Requirements

EntraAuth PowerShell Module (Install-Module EntraAuth)

Parameters

  •     Filter
    • Phone – Teams Native Phones
    • MTR – Microsoft Teams Rooms running Android
    • Display – Microsoft Teams Displays
    • Panel – Microsoft Teams Panels

Examples

Get-UcTeamsDeviceConfigurationProfile
Get-UcTeamsDeviceConfigurationProfile -Filter MTR

Set-UcTeamsDeviceConfigurationProfile

Syntax

Set-UcTeamsDeviceConfigurationProfile
-TACDeviceID
-ConfigID

Description

This function will use TAC API to assign a Configuration Profile by sending the Config Update command to the specified device(s).

Requirements

EntraAuth PowerShell Module (Install-Module EntraAuth)

Parameters

  • TACDeviceID – Teams Device ID from Teams Admin Center.
  • ConfigID – Teams Device Configuration Profile ID.

Examples

Set-UcTeamsDeviceConfigurationProfile -TACDeviceID "00000000-0000-0000-0000-000000000000" -ConfigID "00000000-0000-0000-0000-000000000000

Test-UcTeamsOnlyDNSRequirements

Syntax

Test-UcTeamsOnlyDNSRequirements
[-Domain]

Description

This function will check if the DNS entries that were previously required.

If we specify the Domain the cmdlet will query all domains associated to the tenant that domain belongs and check one by one.

If the Domain parameter is not specified, it will use the Get-CsSipDomain. This requires that you already connected using Microsoft Teams PowerShell module using Connect-MicrosoftTeams.

Blog Post: Test-UcTeamsOnlyDNSRequirements

Examples

Test-UcTeamsOnlyDNSRequirements
Test-UcTeamsOnlyDNSRequirements -Domain uclobby.com

Test-UcTeamsDevicesConditionalAccessPolicy

Syntax

Test-UcTeamsDevicesConditionalAccessPolicy
[-PolicyID]
[-UserUPN]
[-DeviceType]
[-Detailed]
[-All]
[-IncludeSupported]
[-ExportCSV]
[-OutputPath]

Description

This function will validate each setting in a Conditional Access Policy to make sure they are in line with the supported settings:

Teams Android Devices – Supported Conditional Access policies

Contributors: Traci Herr, David Paulino, Gonçalo Sepúlveda and Miguel Ferreira

More info:
UCMESS: How to Check Conditional Access Policies unsupported settings for the Teams Android Devices

Requirements

  • Microsoft Graph Auth PowerShell Module (Install-Module Microsoft.Graph.Authentication)
  • Microsoft Graph Permissions:
    • Policy.Read.All

Parameters

  • PolicyID – Specifies a Policy ID that will be checked if is supported by Microsoft Teams Devices.
  • UserUPN – Specifies a UserUPN that we want to check for applied Conditional Access policies.
  • DeviceType – Type of Teams Device:
    • MTRWindows – Microsoft Teams Room Running Windows
    • MTRAndroidAndPanel – Microsoft Teams Room Running Android and Panels
    • PhoneAndDisplay – Microsoft Teams Phone and Displays
  • Detailed – When present it will get detailed configuration information from Conditional Access policy.
  • All – When present it check all Conditional Access policies independently if they are assigned to a User(s)/Group(s).
  • IncludeSupported – Displays results for all settings in each Conditional Access Policy.
  • ExportCSV – When present will export the detailed results to a CSV file. By default, will save the file under the current user downloads, unless we specify the OutputPath.
  • OutputPath – Allows to specify the path where we want to save the results.

Example

Test-UcTeamsDevicesConditionalAccessPolicy
Test-UcTeamsDevicesConditionalAccessPolicy -Detailed

Test-UcTeamsDevicesEnrollmentProfile

Syntax

Test-UcTeamsDevicesEnrollmentProfile
[-UserUPN]
[-PlatformType]
[-Detailed]
[-ExportCSV]
[-OutputPath]
[<CommonParameters>]

Description

This function will validate Intune Enrollment Profile that are supported by Microsoft Teams Android Devices

Contributors: David Paulino, Gonçalo Sepúlveda and Eileen Beato

Requirements

  • Microsoft Graph Auth PowerShell Module (Install-Module Microsoft.Graph.Authentication)
  • Microsoft Graph Permissions:
    • DeviceManagementServiceConfig.Read.All
    • DeviceManagementConfiguration.Read.All
    • Directory.Read.All

Parameters

  • UserUPN – Specifies a UserUPN that we want to check for a user enrollment profiles.
  • PlatformType
    • AndroidDeviceAdministrator
    • AOSP
  • Detailed – Displays test results for unsupported settings in each Intune Enrollment profile.
  • ExportCSV – When present will export the detailed results to a CSV file. By default, will save the file under the current user downloads, unless we specify the OutputPath.
  • OutputPath – Allows to specify the path where we want to save the results.

Example

Test-UcTeamsDevicesEnrollmentProfile
Test-UcTeamsDevicesEnrollmentProfile -UserUPN david@uclobby.com
Test-UcTeamsDevicesEnrollmentProfile -Detailed

Test-UcTeamsDevicesCompliancePolicy

Syntax

Test-UcTeamsDevicesCompliancePolicy
[-PolicyID]
[-PolicyName]
[-UserUPN]
[-DeviceID]
[-Detailed]
[-All]
[-IncludeSupported]
[-ExportCSV]
[-OutputPath]

Description

This function will validate each setting in the Intune Compliance Policy to make sure they are in line with the supported settings:

Teams Android Devices – Supported Intune Compliance policies

Contributors: Traci Herr, David Paulino and Gonçalo Sepúlveda

UCMESS: Checking Intune Compliance Policies for unsupported settings

Requirements

  • Microsoft Graph Auth PowerShell Module (Install-Module Microsoft.Graph.Authentication)
  • Microsoft Graph Permissions:
    • DeviceManagementConfiguration.Read.All

Parameters

  • PolicyID – Specifies a Policy ID that will be checked if is supported by Microsoft Teams Devices.
  • PolicyName – Specifies a Policy Display Name that will be checked if is supported by Microsoft Teams Devices.
  • UserUPN – Specifies a UserUPN that we want to check for applied compliance policies.
  • DeviceID – Specifies DeviceID that we want to check for applied compliance policies.
  • Detailed – When present it will get detailed configuration information from Intune Compliance policy.
  • All – Will check all Intune Compliance policies independently if they are assigned to a User(s)/Group(s).
  • IncludeSupported – Displays results for all settings in each Intune Compliance Policy.
  • ExportCSV – When present will export the detailed results to a CSV file. By default, will save the file under the current user downloads, unless we specify the OutputPath.
  • OutputPath – Allows to specify the path where we want to save the results.

Example

Test-UcTeamsDevicesCompliancePolicy
Test-UcTeamsDevicesCompliancePolicy -Detailed

Get-UcArch

Syntax

Get-UcArch
-FilePath

Description

Based on PowerShell script Get-ExecutableType.ps1 by David Wyatt that was originally posted in:

Identify 16-bit, 32-bit and 64-bit executables with PowerShell
https://gallery.technet.microsoft.com/scriptcenter/Identify-16-bit-32-bit-and-522eae75

Example

Get-UcArch -FilePath "C:\Windows\System32\notepad.exe"

6 thoughts on “UCLobby Teams PowerShell Module

  1. Hello David
    Excellent Modules!!
    How can I get Get-UcTeamsVersion for all users ? Please let me know.

    1. There is another cmdlet Get-UcTeamsVersionBatch that allows to have a CSV file with the computer names, then will go through all the computers and check the versions, this only works if you have admin shares enabled.

      Please note that there is also a Usage Report in Teams Admin Center (TAC), Analytics & Reports > Usage Reports > Teams desktop client usage, that can be used to know which versions are being used.

  2. Hi David,

    Fantastic work – thank you!

    Do you know if Get-UCTeamsVersion should work with New Teams installed via the bootstrapper.exe method? It doesn’t seem to. We’ve been installing via the bootstrapper and New Teams isn’t even seen by the M365 security portal. Lansweeper does report the version, though, so it must be possible.

    Thx!

    1. Thank you for the feedback and reaching out.

      I looked that the cmdlet and the issue was if the settings file was missing no output was generated.

      Just released 0.6.3 that contains the fix for this and please let me know if you have issues with it.

  3. Hi David,

    Always so amazed at the responsiveness of the open source community!

    Below is what I’m getting with version 6.3 (first is PS5, second is PS7). I think there is something special/different with the bootstrapper install and I’m a little embarrassed to say I don’t know what exactly, as we’re installing it on production systems.

    PS C:\Windows\System32> Get-InstalledModule | ?{$_.Name -match “uclobby”}

    Version Name Repository Description
    ——- —- ———- ———–
    0.6.3 UcLobbyTeams PSGallery UC Lobby Teams PowerShell Module

    PS C:\Windows\System32> Get-UcTeamsVersion
    Get-AppPackage: The ‘Get-AppPackage’ command was found in the module ‘Appx’, but the module could not be loaded due to the following error: [Operation is not supported on this
    platform. (0x80131539)] For more information, run ‘Import-Module Appx’.
    Get-AppPackage: The ‘Get-AppPackage’ command was found in the module ‘Appx’, but the module could not be loaded due to the following error: [Operation is not supported on this
    platform. (0x80131539)] For more information, run ‘Import-Module Appx’.
    Get-AppPackage: The ‘Get-AppPackage’ command was found in the module ‘Appx’, but the module could not be loaded due to the following error: [Operation is not supported on this
    platform. (0x80131539)] For more information, run ‘Import-Module Appx’.
    Get-AppPackage: The ‘Get-AppPackage’ command was found in the module ‘Appx’, but the module could not be loaded due to the following error: [Operation is not supported on this
    platform. (0x80131539)] For more information, run ‘Import-Module Appx’.
    Get-AppPackage: The ‘Get-AppPackage’ command was found in the module ‘Appx’, but the module could not be loaded due to the following error: [Operation is not supported on this
    platform. (0x80131539)] For more information, run ‘Import-Module Appx’.
    Get-AppPackage: The ‘Get-AppPackage’ command was found in the module ‘Appx’, but the module could not be loaded due to the following error: [Operation is not supported on this
    platform. (0x80131539)] For more information, run ‘Import-Module Appx’.
    Get-AppPackage: The ‘Get-AppPackage’ command was found in the module ‘Appx’, but the module could not be loaded due to the following error: [Operation is not supported on this
    platform. (0x80131539)] For more information, run ‘Import-Module Appx’.

    PS C:\WINDOWS\system32> Get-InstalledModule | ?{$_.Name -match “uclobby”}

    Version Name Repository Description
    ——- —- ———- ———–
    0.6.3 UcLobbyTeams PSGallery UC Lobby Teams PowerShell Module

    PS C:\WINDOWS\system32> Get-UcTeamsVersion
    PS C:\WINDOWS\system32>

Leave a Reply

Your email address will not be published. Required fields are marked *