Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Export always fails on lyncdiscover

Open jcegielsk1 opened this issue 6 years ago • 18 comments

Details of the scenario you tried and the problem that is occurring

Export-M365DSCConfiguration -Quiet -GlobalAdminAccount $creds -Workloads @("TEAMS", "SPO", "EXO", "O365", "OD", "SC") -FileName "Tenant.ps1" -ConfigurationName Tenant -GenerateInfo $true"

Verbose logs showing the problem

[82/99] Extracting [TeamsCallingPolicy]...Get-RTCXml : Exception calling "GetResponse" with "0" argument(s): "The remote name could not be resolved: 'lyncdiscover.domain.com'" At C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.0.32\MSCloudLoginAssistant.psm1:460 char:12

  • $xml = Get-RTCXml -Url $liveIdUrl
    
  •        ~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Get-RTCXml], MethodInvocationException
    • FullyQualifiedErrorId : WebException,Get-RTCXml

Suggested solution to the issue

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# insert configuration here

The operating system the target node is running

OsName : Microsoft Windows 10 Enterprise OsOperatingSystemSKU : EnterpriseEdition OsArchitecture : 64-bit WindowsVersion : 1803 WindowsBuildLabEx : 17134.1.amd64fre.rs4_release.180410-1804 OsLanguage : en-US OsMuiLanguages : {en-US}

Version of the DSC module that was used ('dev' if using current dev branch)

Manifest 1.20.805.1 Microsoft365DSC

jcegielsk1 avatar Sep 16 '20 15:09 jcegielsk1

This is a known issue for older version where you had to use a .onmicrosoft.com account to do an export. It has been fixed starting with 1.20.909.1. Please update your version and try again. Thanks

NikCharlebois avatar Sep 16 '20 15:09 NikCharlebois

Thanks, Nik. I updated the module and still getting the exact same error. Is it worth trying to run using the .onmicrosoft.com account?

Best,

jcegielsk1 avatar Sep 16 '20 16:09 jcegielsk1

Just an fyi, it works successfully after manually importing the Teams module and connecting to it, AND using the .onmicrosoft.com user ID.

Thanks you!

jcegielsk1 avatar Sep 16 '20 17:09 jcegielsk1

@jcegielsk1 the new version of the module should implicitly import and connect to Teams...Can you please try downloading 1.20.916.1 from the gallery and trying it again? Thanks

NikCharlebois avatar Sep 16 '20 19:09 NikCharlebois

Hi Nik. The new version did not seem to make any difference. However, when I used my .onmicrosoft.com ID that allowed me to execute the script to completion. The one thing that was odd, was that I STILL had to manually connect to Teams using the ‘Connect-MicrosoftTeams’ cmdlet. If I did not do that, my script would break and exit when it got to the Teams settings. It would throw a bunch of “cmd is not recognized” errors.

I now have a config file and a Powershell template. I’m trying to run these to create an HTML report but the script seems to hang forever (left it running over night and I can see the HTML file is not changing in size). Should I open a new issue for this?

Here is what I was running,

PS C:\Users\jcegielski\Scripts> New-M365DSCConfigurationToHTML -ConfigurationPath "C:\Users\jcegielski\Scripts\GreyStarTenant.ps1" -OutputPath “.\GreyStarTenant.html”

Thank you!

jcegielsk1 avatar Sep 17 '20 14:09 jcegielsk1

This error happens still at least without .onmicrosoft.com account with latest version of M365DSC module. Error logged during "Extracting [TeamsTenantDialPlan]..." edit: many other parts do this as well.

[2020/10/08 02:50:02] {NotSpecified} Microsoft.PowerShell.Commands.WriteErrorException: Exception calling "GetResponse" with "0" argument(s): "The remote name could not be resolved: 'lyncdiscover.domain.mail.onmicrosoft.com'" ""

TuomasPakkanen avatar Oct 08 '20 12:10 TuomasPakkanen

@TuomasPakkanen I'll test this and follow up with @NikCharlebois.

jeff29922 avatar Oct 15 '20 06:10 jeff29922

@TuomasPakkanen & @jcegielsk1 Folks, still trying to nail this one down. What happens is you try:

$creds = Get-Credential #use a non .onmicrosoft.com account Test-MSCloudLogin -Platform SkypeForBusiness -CloudCredential $creds Get-CSTeamsCallingPolicy

NikCharlebois avatar Oct 27 '20 16:10 NikCharlebois

This has been working for me as long as I login with the *.onmicrosoft.com ID.

Do you want me to try the same and login with my regular @domain.com ID?

Thanks,

jcegielsk1 avatar Oct 27 '20 16:10 jcegielsk1

Yes, please.

NikCharlebois avatar Oct 27 '20 16:10 NikCharlebois

When I run the following,

@{ModuleName="Microsoft365DSC"; RequiredVersion="1.20.1021.1"} Export-M365DSCConfiguration -Quiet -GlobalAdminAccount $creds -Workloads @("TEAMS") -FileName "AllResCoTeamsSettings.ps1" -ConfigurationName AllResCoTeamsSettings -GenerateInfo $true That completes successfully.

But, when I run the .\AllResCoTeamsSettings.ps1 to generate the mof file, I get this error below,

.\AllResCoTeamsSettings.ps1 At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:29 char:5

  • Import-DscResource -ModuleName Microsoft365DSC
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

Multiple versions of the module 'Microsoft365DSC' were found. You can run 'Get-Module -ListAvailable -FullyQualifiedName Microsoft365DSC' to see available versions on the system, and then use the fully qualified name '@{ModuleName="Microsoft365DSC"; RequiredVersion="Version"}'. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:36 char:9

  •     TeamsCallingPolicy 0b556f41-a814-4944-9259-a88bdef404c6
    
  •     ~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsCallingPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:58 char:9

  •     TeamsCallingPolicy 1d856673-632d-4eb0-8eec-97400a405b01
    
  •     ~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsCallingPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:80 char:9

  •     TeamsCallingPolicy b1220084-8678-44f6-91f5-f9eb732fde7e
    
  •     ~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsCallingPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:102 char:9

  •     TeamsCallingPolicy e0923af5-f9e6-44b9-b376-b2bc742b8747
    
  •     ~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsCallingPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:124 char:9

  •     TeamsCallingPolicy 328c2036-1cff-4b53-b1d0-1875fe50d679
    
  •     ~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsCallingPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:149 char:9

  •     TeamsChannelsPolicy 3f1f54dc-b764-4d37-84fb-b66d0c7dc58f
    
  •     ~~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsChannelsPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:158 char:9

  •     TeamsChannelsPolicy 8b612c24-bd6b-4f4d-936e-14152e6474ad
    
  •     ~~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsChannelsPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:170 char:9

  •     TeamsClientConfiguration 510e8cb3-6645-422c-aa59-e9790d1d8e4c
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsClientConfiguration'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:191 char:9

  •     TeamsEmergencyCallingPolicy e1aadf2a-e75a-4e35-bb48-3e5d8e7e0 ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsEmergencyCallingPolicy'. Use Import-DSCResource to import the resource. Not all parse errors were reported. Correct the reported errors and try again. + CategoryInfo : ParserError: (:) [], ParseException + FullyQualifiedErrorId : MultipleModuleEntriesFoundDuringParse

I do not get the lyncdiscover error any longer.

jcegielsk1 avatar Oct 27 '20 17:10 jcegielsk1

Ok, any chances you can go and only keep the latest version of the module in

C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC

Delete the other versions and try recompiling.

NikCharlebois avatar Oct 27 '20 17:10 NikCharlebois

Yep, let me give that a try… I’ll ping you as soon as I can.

jcegielsk1 avatar Oct 27 '20 17:10 jcegielsk1

@TuomasPakkanen & @jcegielsk1 Folks, still trying to nail this one down. What happens is you try:

$creds = Get-Credential #use a non .onmicrosoft.com account Test-MSCloudLogin -Platform SkypeForBusiness -CloudCredential $creds Get-CSTeamsCallingPolicy

Seems to be working OK and it returns the information as expected.

TuomasPakkanen avatar Oct 28 '20 12:10 TuomasPakkanen

After updating to the latest module and uninstalling the previous module and running with my @domain.com admin account (not the .onmicrosoft.com account), it still fails with the same error.

PS D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output> .\AllResCoTeamsSettings.ps1 At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:30 char:5

  • Import-DscResource -ModuleName Microsoft365DSC
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

Multiple versions of the module 'Microsoft365DSC' were found. You can run 'Get-Module -ListAvailable -FullyQualifiedName Microsoft365DSC' to see available versions on the system, and then use the fully qualified name '@{ModuleName="Microsoft365DSC"; RequiredVersion="Version"}'. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:37 char:9

  •     TeamsCallingPolicy 4d25cbe0-0655-4c9c-affb-0932d0b08fc5
    
  •     ~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsCallingPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:59 char:9

  •     TeamsCallingPolicy a707247a-ae30-4b42-8b58-ead5bef24c2d
    
  •     ~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsCallingPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:81 char:9

  •     TeamsCallingPolicy ac12a530-d7d5-46ef-9ee6-6eaa80ebbf16
    
  •     ~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsCallingPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:103 char:9

  •     TeamsCallingPolicy 5c7eeeb7-1b23-4e9e-b09d-91e98cd926f8
    
  •     ~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsCallingPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:125 char:9

  •     TeamsCallingPolicy b6b65a25-b73a-4fcd-b6dc-8b7cb5fe2992
    
  •     ~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsCallingPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:150 char:9

  •     TeamsChannelsPolicy 71572dc9-12e7-4972-8ecd-8cf980a134bb
    
  •     ~~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsChannelsPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:159 char:9

  •     TeamsChannelsPolicy a0bc963b-a469-436e-bcd8-d915bdad1f0a
    
  •     ~~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsChannelsPolicy'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:171 char:9

  •     TeamsClientConfiguration 94008082-7147-493a-8d31-c87d2c519028
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsClientConfiguration'. Use Import-DSCResource to import the resource. At D:\OD4B\OneDrive - Buffalo Wings, LLC\Documents\ConvergeOne\Alliance\Scripts\Output\AllResCoTeamsSettings.ps1:192 char:9

  •     TeamsEmergencyCallingPolicy 8864505b-09fc-4f7e-ae41-22b486e61 ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

Undefined DSC resource 'TeamsEmergencyCallingPolicy'. Use Import-DSCResource to import the resource. Not all parse errors were reported. Correct the reported errors and try again. + CategoryInfo : ParserError: (:) [], ParseException + FullyQualifiedErrorId : MultipleModuleEntriesFoundDuringParse

Let me know if you’d like me to try anything else?

Thanks,

Jon

Jon Cegielski 407.519.0968

From: Jon M Cegielski Sent: Tuesday, October 27, 2020 1:44 PM To: microsoft/Microsoft365DSC [email protected]; microsoft/Microsoft365DSC [email protected] Cc: Mention [email protected] Subject: RE: [microsoft/Microsoft365DSC] Export always fails on lyncdiscover (#782)

Yep, let me give that a try… I’ll ping you as soon as I can.

Jon Cegielski 407.519.0968

From: Nik Charlebois <[email protected]mailto:[email protected]> Sent: Tuesday, October 27, 2020 1:17 PM To: microsoft/Microsoft365DSC <[email protected]mailto:[email protected]> Cc: Jon M Cegielski <[email protected]mailto:[email protected]>; Mention <[email protected]mailto:[email protected]> Subject: Re: [microsoft/Microsoft365DSC] Export always fails on lyncdiscover (#782)

Ok, any chances you can go and only keep the latest version of the module in

C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC

Delete the other versions and try recompiling.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/Microsoft365DSC/issues/782#issuecomment-717395919, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARAWW5Z6DAEJZXO6WGFROK3SM36B5ANCNFSM4RPAZF4A.

jcegielsk1 avatar Oct 28 '20 13:10 jcegielsk1

It seems to be complaining about multiple versions of M365DSC still.

Make sure that when you run: Get-Module Microsoft365DSC -ListAvailable That you only get the latest version returned. Remove all other instances.

NikCharlebois avatar Nov 02 '20 16:11 NikCharlebois

Ok, let me try to completely close and reboot and try again…

Jon Cegielski 407.519.0968

From: Nik Charlebois [email protected] Sent: Monday, November 2, 2020 11:07 AM To: microsoft/Microsoft365DSC [email protected] Cc: Jon M Cegielski [email protected]; Mention [email protected] Subject: Re: [microsoft/Microsoft365DSC] Export always fails on lyncdiscover (#782)

It seems to be complaining about multiple versions of M365DSC still.

Make sure that when you run: Get-Module Microsoft365DSC -ListAvailable That you only get the latest version returned. Remove all other instances.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/Microsoft365DSC/issues/782#issuecomment-720565810, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARAWW52GZZMZAZLBXSXT7BDSN3KK5ANCNFSM4RPAZF4A.

jcegielsk1 avatar Nov 02 '20 16:11 jcegielsk1

Hi, I am getting the same error but when trying to export the SPO configuration for our tenant. I get the error but with unable to resolve the sharepoint.com URL. [1/16] Extracting [SPOAccessControlSettings]...An error has occurred The remote name could not be resolved: 'metlife-admin.sharepoint.com'

aflopex avatar Sep 01 '21 22:09 aflopex