Skip to content
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

TeamsMeetingPolicy: Get-TargetResource doesn't show Identity of a non-existent policy #5550

Closed
WavingReader opened this issue Dec 13, 2024 · 0 comments · Fixed by #5551 or #5584
Closed

Comments

@WavingReader
Copy link
Contributor

WavingReader commented Dec 13, 2024

Description of the issue

Get-TargetResource doesn't show Identity of a non-existent policy in verbose output.
Because of '$' typo.

$policy = Get-CsTeamsMeetingPolicy -Identity $Identity `
-ErrorAction 'SilentlyContinue'

if ($null -eq $policy)
{
Write-Verbose -Message "Could not find Teams Meeting Policy ${$Identity}"
return $nullReturn
}
Write-Verbose -Message "Found Teams Meeting Policy {$Identity}"

Microsoft 365 DSC Version

1.24.1211.1

Which workloads are affected

Teams

The DSC configuration

Configuration TeamsMeeting
{
    param (
        [Parameter(Mandatory = $true)]
        [System.String]
        $ApplicationId,

        [Parameter(Mandatory = $true)]
        [System.String]
        $TenantId,

        [Parameter(Mandatory = $true)]
        [System.String]
        $CertificateThumbprint
    )

    Import-DscResource -ModuleName 'Microsoft365DSC'

    TeamsMeetingPolicy "TeamsMeetingPolicy-Tag:NotExisting" {
        AllowAnnotations                           = $True
        AllowAnonymousUsersToDialOut               = $False
        AllowAnonymousUsersToJoinMeeting           = $True
        AllowAnonymousUsersToStartMeeting          = $False
        AllowBreakoutRooms                         = $True
        AllowCartCaptionsScheduling                = "DisabledUserOverride"
        AllowChannelMeetingScheduling              = $False
        AllowCloudRecording                        = $False
        AllowDocumentCollaboration                 = "Enabled"
        AllowEngagementReport                      = "Enabled"
        AllowExternalParticipantGiveRequestControl = $False
        AllowIPAudio                               = $True
        AllowIPVideo                               = $True
        AllowMeetingCoach                          = $True
        AllowMeetingReactions                      = $True
        AllowMeetingRegistration                   = $True
        AllowMeetNow                               = $True
        AllowNDIStreaming                          = $False
        AllowNetworkConfigurationSettingsLookup    = $False
        AllowOrganizersToOverrideLobbySettings     = $False
        AllowOutlookAddIn                          = $False
        AllowParticipantGiveRequestControl         = $True
        AllowPowerPointSharing                     = $True
        AllowPrivateMeetingScheduling              = $False
        AllowPrivateMeetNow                        = $True
        AllowPSTNUsersToBypassLobby                = $False
        AllowRecordingStorageOutsideRegion         = $False
        AllowSharedNotes                           = $True
        AllowTranscription                         = $False
        AllowWatermarkForCameraVideo               = $False
        AllowWatermarkForScreenSharing             = $False
        AllowWhiteboard                            = $True
        AutoAdmittedUsers                          = "EveryoneInCompany"
        ChannelRecordingDownload                   = "Allow"
        DesignatedPresenterRoleMode                = "EveryoneUserOverride"
        EnrollUserOverride                         = "Disabled"
        Ensure                                     = "Present"
        ExplicitRecordingConsent                   = "Disabled"
        Identity                                   = "Tag:NotExisting"
        InfoShownInReportMode                      = "FullInformation"
        IPAudioMode                                = "EnabledOutgoingIncoming"
        IPVideoMode                                = "EnabledOutgoingIncoming"
        LiveCaptionsEnabledType                    = "Disabled"
        LiveInterpretationEnabledType              = "DisabledUserOverride"
        LiveStreamingMode                          = "Disabled"
        MediaBitRateKb                             = 50000
        MeetingChatEnabledType                     = "Enabled"
        NewMeetingRecordingExpirationDays          = 120
        PreferredMeetingProviderForIslandsMode     = "TeamsAndSfb"
        QnAEngagementMode                          = "Enabled"
        RoomPeopleNameUserOverride                 = "Off"
        ScreenSharingMode                          = "EntireScreen"
        SpeakerAttributionMode                     = "EnabledUserOverride"
        StreamingAttendeeMode                      = "Disabled"
        TeamsCameraFarEndPTZMode                   = "Disabled"
        VideoFiltersMode                           = "AllFilters"
        WhoCanRegister                             = "Everyone"
        ApplicationId                              = $ApplicationId
        TenantId                                   = $TenantId
        CertificateThumbprint                      = $CertificateThumbprint
    }
}

Verbose logs showing the problem

VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = TestConfiguration,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer ... with user sid ....
VERBOSE: [...]: LCM:  [ Start  Compare  ]
VERBOSE: [...]: LCM:  [ Start  Resource ]  [[TeamsMeetingPolicy]TeamsMeetingPolicy-Tag:NotExisting]
VERBOSE: [...]: LCM:  [ Start  Test     ]  [[TeamsMeetingPolicy]TeamsMeetingPolicy-Tag:NotExisting]
VERBOSE: [...]:                            [[TeamsMeetingPolicy]TeamsMeetingPolicy-Tag:NotExisting] C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.1.29
VERBOSE: [...]:                            [[TeamsMeetingPolicy]TeamsMeetingPolicy-Tag:NotExisting] Testing configuration of Team Meeting Policy {Tag:NotExisting}
VERBOSE: [...]:                            [[TeamsMeetingPolicy]TeamsMeetingPolicy-Tag:NotExisting] Getting the Teams Meeting Policy Tag:NotExisting
VERBOSE: [...]:                            [[TeamsMeetingPolicy]TeamsMeetingPolicy-Tag:NotExisting] Could not find Teams Meeting Policy
VERBOSE: [...]:                            [[TeamsMeetingPolicy]TeamsMeetingPolicy-Tag:NotExisting] Current Values: AllowAnnotations=True
AllowAnonymousUsersToDialOut=False
AllowAnonymousUsersToJoinMeeting=True
AllowAnonymousUsersToStartMeeting=False
AllowBreakoutRooms=True
AllowCartCaptionsScheduling=DisabledUserOverride
AllowChannelMeetingScheduling=False
AllowCloudRecording=False
AllowDocumentCollaboration=Enabled
AllowEngagementReport=Enabled
AllowExternalParticipantGiveRequestControl=False
AllowIPAudio=True
AllowIPVideo=True
AllowMeetingCoach=True
AllowMeetingReactions=True
AllowMeetingRegistration=True
AllowMeetNow=True
AllowNDIStreaming=False
AllowNetworkConfigurationSettingsLookup=False
AllowOrganizersToOverrideLobbySettings=False
AllowOutlookAddIn=False
AllowParticipantGiveRequestControl=True
AllowPowerPointSharing=True
AllowPrivateMeetingScheduling=False
AllowPrivateMeetNow=True
AllowPSTNUsersToBypassLobby=False
AllowRecordingStorageOutsideRegion=False
AllowSharedNotes=True
AllowTranscription=False
AllowWatermarkForCameraVideo=False
AllowWatermarkForScreenSharing=False
AllowWhiteboard=True
ApplicationId=***
AutoAdmittedUsers=EveryoneInCompany
CertificateThumbprint=***
ChannelRecordingDownload=Allow
DesignatedPresenterRoleMode=EveryoneUserOverride
EnrollUserOverride=Disabled
Ensure=Absent
ExplicitRecordingConsent=Disabled
Identity=Tag:NotExisting
InfoShownInReportMode=FullInformation
IPAudioMode=EnabledOutgoingIncoming
IPVideoMode=EnabledOutgoingIncoming
LiveCaptionsEnabledType=Disabled
LiveInterpretationEnabledType=DisabledUserOverride
LiveStreamingMode=Disabled
MediaBitRateKb=50000
MeetingChatEnabledType=Enabled
NewMeetingRecordingExpirationDays=120
PreferredMeetingProviderForIslandsMode=TeamsAndSfb
QnAEngagementMode=Enabled
RoomPeopleNameUserOverride=Off
ScreenSharingMode=EntireScreen
SpeakerAttributionMode=EnabledUserOverride
StreamingAttendeeMode=Disabled
TeamsCameraFarEndPTZMode=Disabled
TenantId=***
Verbose=True
VideoFiltersMode=AllFilters
WhoCanRegister=Everyone
VERBOSE: [...]:                            [[TeamsMeetingPolicy]TeamsMeetingPolicy-Tag:NotExisting] Target Values: AllowAnnotations=True
AllowAnonymousUsersToDialOut=False
AllowAnonymousUsersToJoinMeeting=True
AllowAnonymousUsersToStartMeeting=False
AllowBreakoutRooms=True
AllowCartCaptionsScheduling=DisabledUserOverride
AllowChannelMeetingScheduling=False
AllowCloudRecording=False
AllowDocumentCollaboration=Enabled
AllowEngagementReport=Enabled
AllowExternalParticipantGiveRequestControl=False
AllowIPAudio=True
AllowIPVideo=True
AllowMeetingCoach=True
AllowMeetingReactions=True
AllowMeetingRegistration=True
AllowMeetNow=True
AllowNDIStreaming=False
AllowNetworkConfigurationSettingsLookup=False
AllowOrganizersToOverrideLobbySettings=False
AllowOutlookAddIn=False
AllowParticipantGiveRequestControl=True
AllowPowerPointSharing=True
AllowPrivateMeetingScheduling=False
AllowPrivateMeetNow=True
AllowPSTNUsersToBypassLobby=False
AllowRecordingStorageOutsideRegion=False
AllowSharedNotes=True
AllowTranscription=False
AllowWatermarkForCameraVideo=False
AllowWatermarkForScreenSharing=False
AllowWhiteboard=True
ApplicationId=***
AutoAdmittedUsers=EveryoneInCompany
CertificateThumbprint=***
ChannelRecordingDownload=Allow
DesignatedPresenterRoleMode=EveryoneUserOverride
EnrollUserOverride=Disabled
Ensure=Present
ExplicitRecordingConsent=Disabled
Identity=Tag:NotExisting
InfoShownInReportMode=FullInformation
IPAudioMode=EnabledOutgoingIncoming
IPVideoMode=EnabledOutgoingIncoming
LiveCaptionsEnabledType=Disabled
LiveInterpretationEnabledType=DisabledUserOverride
LiveStreamingMode=Disabled
MediaBitRateKb=50000
MeetingChatEnabledType=Enabled
NewMeetingRecordingExpirationDays=120
PreferredMeetingProviderForIslandsMode=TeamsAndSfb
QnAEngagementMode=Enabled
RoomPeopleNameUserOverride=Off
ScreenSharingMode=EntireScreen
SpeakerAttributionMode=EnabledUserOverride
StreamingAttendeeMode=Disabled
TeamsCameraFarEndPTZMode=Disabled
TenantId=***
Verbose=True
VideoFiltersMode=AllFilters
WhoCanRegister=Everyone
VERBOSE: [...]:                            [[TeamsMeetingPolicy]TeamsMeetingPolicy-Tag:NotExisting] Test-TargetResource returned False
VERBOSE: [...]: LCM:  [ End    Test     ]  [[TeamsMeetingPolicy]TeamsMeetingPolicy-Tag:NotExisting] False in 52.3440 seconds.
VERBOSE: [...]: LCM:  [ End    Resource ]  [[TeamsMeetingPolicy]TeamsMeetingPolicy-Tag:NotExisting]
VERBOSE: [...]: LCM:  [ End    Compare  ]     Completed processing compare operation. The operation returned False.
VERBOSE: [...]: LCM:  [ End    Compare  ]    in  53.0940 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 53.309 seconds

Environment Information + PowerShell Version

PS C:\code\Microsoft365DSC> Get-ComputerInfo -Property @(
>> 'OsName',
>> 'OsOperatingSystemSKU',
>> 'OSArchitecture',
>> 'WindowsVersion',
>> 'WindowsBuildLabEx',
>> 'OsLanguage',
>> 'OsMuiLanguages')


OsName               : Microsoft Windows 10 Enterprise N LTSC
OsOperatingSystemSKU : 126
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage           : en-US
OsMuiLanguages       : {en-US}



PS C:\code\Microsoft365DSC>
PS C:\code\Microsoft365DSC> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.5129
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.5129
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@WavingReader WavingReader changed the title TeamsMeetingPolicy: Test-TargetResource doesn't show Identity of a non-existent policy TeamsMeetingPolicy: Get-TargetResource doesn't show Identity of a non-existent policy Dec 13, 2024
@NikCharlebois NikCharlebois mentioned this issue Dec 18, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant