New-CsTeamsRemoteLogCollectionDevice
This cmdlet allows you to create a new TeamsRemoteLogCollectionDevice instance and set it's properties.
Syntax
Default (Default)
New-CsTeamsRemoteLogCollectionDevice
[-Identity <Guid>]
[-UserId <String>]
[-DeviceId <String>]
[-ExpireAfter <String>]
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
This cmdlet allows you to create a TeamsRemoteLogCollectionDevice instance.
Remote log collection is a feature in Microsoft Teams that allows IT administrators to remotely trigger the collection of diagnostic logs from user devices through the Teams Admin Center (TAC). Instead of relying on manual user intervention, admins can initiate log collection for troubleshooting directly from the TAC portal.
TeamsRemoteLogCollectionConfiguration is updated with a list of devices when an administrator wants to initiate a request for remote log collection for a user's device. Each device has a unique GUID identity, userId, deviceId and expiry date.
Examples
Example 1
PS C:\> New-CsTeamsRemoteLogCollectionDevice -UserId "765267a2-aa73-4984-a37e-43470f5e21a7" -DeviceId "765267a2-aa73-4984-a37e-43470f5e21a7" -ExpireAfter "06/07/2025 15:30:45"
Creates a new instance of TeamsRemoteLogCollectionDevice. Each Identity, userId and deviceId must be a valid GUID.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DeviceId
Applicable: Microsoft Teams
Indicates the deviceId of the device for which an admin is requesting logs for. This deviceId must be a valid GUID.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ExpireAfter
Applicable: Microsoft Teams
Indicates the expiry date after which the remote log collection request will expire. This expire after date should be set to now() + 3 days. This expiry date should be in ISO 8601 UTC format.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Identity
Applicable: Microsoft Teams
Policy instance name.
Parameter properties
Type: | XdsIdentity |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-UserId
Applicable: Microsoft Teams
Indicates the userId of the user for which an admin is requesting logs for. This userId must be a valid GUID.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.