timmcmic / DLConversionV2

MIT License
43 stars 9 forks source link

Import-Module: The specified module 'c:\repository\dlconversionv2\dlconversionv2.psd1' was not loaded because no valid module file was found in any module directory. #138

Closed TSideScripting closed 1 year ago

TSideScripting commented 1 year ago

When using the Start-MultipleTestPreMigrations cmdlet a lot of Import-Module errors get thrown up . This is with a fresh install of DLConversionV2 and PowerShell 7 running as administrator. C:\Repository does not exist on the machine the script is running and never has. Snippet of the terminal window below:

Id     Name            PSJobTypeName   State         HasMoreData     Location             Command
--     ----            -------------   -----         -----------     --------             -------
3      MultiplePreMig… BackgroundJob   Running       True            localhost             Test-PreMigration -grou…
[03/07/2023 10:54:35] - ********************************************************************************
@{ParameterName=sleepString; Bound=True; ParameterValue=Sleeping after job provioning.} @{ParameterName=sleepSeconds; Bound=True; ParameterValue=5} @{ParameterName=sleepParentID; Bound=False; ParameterValue=0} @{ParameterName=sleepID; Bound=False; ParameterValue=0} @{ParameterName=Verbose; Bound=False; ParameterValue=} @{ParameterName=Debug; Bound=False; ParameterValue=} @{ParameterName=ErrorAction; Bound=False; ParameterValue=} @{ParameterName=WarningAction; Bound=False; ParameterValue=} @{ParameterName=InformationAction; Bound=False; ParameterValue=} @{ParameterName=ErrorVariable; Bound=False; ParameterValue=} @{ParameterName=WarningVariable; Bound=False; ParameterValue=} @{ParameterName=InformationVariable; Bound=False; ParameterValue=} @{ParameterName=OutVariable; Bound=False; ParameterValue=} @{ParameterName=OutBuffer; Bound=False; ParameterValue=} @{ParameterName=PipelineVariable; Bound=False; ParameterValue=}
[03/07/2023 10:54:35] - ********************************************************************************
[03/07/2023 10:54:35] - ********************************************************************************
[03/07/2023 10:54:35] - BEGIN  start-sleepProgess
[03/07/2023 10:54:35] - ********************************************************************************
Import-Module: The specified module 'c:\repository\dlconversionv2\dlconversionv2.psd1' was not loaded because no valid module file was found in any module directory.
[03/07/2023 10:54:40] - END start-sleepProgess
[03/07/2023 10:54:40] - ********************************************************************************
[03/07/2023 10:54:40] - *******@*******.com
5      MultiplePreMig… BackgroundJob   Running       True            localhost             Test-PreMigration -grou…
[03/07/2023 10:54:41] - *******@*******.com
7      MultiplePreMig… BackgroundJob   Running       True            localhost             Test-PreMigration -grou…
[03/07/2023 10:54:41] - *******@*******.com
Import-Module: The specified module 'c:\repository\dlconversionv2\dlconversionv2.psd1' was not loaded because no valid module file was found in any module directory.
9      MultiplePreMig… BackgroundJob   Running       True            localhost             Test-PreMigration -grou…
[03/07/2023 10:54:41] - *******@*******.com
Import-Module: The specified module 'c:\repository\dlconversionv2\dlconversionv2.psd1' was not loaded because no valid module file was found in any module directory.
11     MultiplePreMig… BackgroundJob   Running       True            localhost             Test-PreMigration -grou…
[03/07/2023 10:54:42] - Jobs are not yet completed in this batch.
[03/07/2023 10:54:42] - Number of jobs that are running = 2
[03/07/2023 10:54:42] - Job ID: 9 State: Running
[03/07/2023 10:54:42] - Job ID: 11 State: Running
[03/07/2023 10:54:42] - ********************************************************************************
@{ParameterName=sleepString; Bound=True; ParameterValue=Sleeping waiting on job completion.} @{ParameterName=sleepSeconds; Bound=True; ParameterValue=30} @{ParameterName=sleepParentID; Bound=False; ParameterValue=0} @{ParameterName=sleepID; Bound=False; ParameterValue=0} @{ParameterName=Verbose; Bound=False; ParameterValue=} @{ParameterName=Debug; Bound=False; ParameterValue=} @{ParameterName=ErrorAction; Bound=False; ParameterValue=} @{ParameterName=WarningAction; Bound=False; ParameterValue=} @{ParameterName=InformationAction; Bound=False; ParameterValue=} @{ParameterName=ErrorVariable; Bound=False; ParameterValue=} @{ParameterName=WarningVariable; Bound=False; ParameterValue=} @{ParameterName=InformationVariable; Bound=False; ParameterValue=} @{ParameterName=OutVariable; Bound=False; ParameterValue=} @{ParameterName=OutBuffer; Bound=False; ParameterValue=} @{ParameterName=PipelineVariable; Bound=False; ParameterValue=}
[03/07/2023 10:54:42] - ********************************************************************************
[03/07/2023 10:54:42] - ********************************************************************************
[03/07/2023 10:54:42] - BEGIN  start-sleepProgess
[03/07/2023 10:54:42] - ********************************************************************************
Import-Module: The specified module 'c:\repository\dlconversionv2\dlconversionv2.psd1' was not loaded because no valid module file was found in any module directory.
Import-Module: The specified module 'c:\repository\dlconversionv2\dlconversionv2.psd1' was not loaded because no valid module file was found in any module directory.
[03/07/2023 10:55:12] - END start-sleepProgess
[03/07/2023 10:55:12] - ********************************************************************************
[03/07/2023 10:55:12] - The array location is = 5
[03/07/2023 10:55:12] - Job ID: 3 State: Failed
[03/07/2023 10:55:12] - Job ID: 5 State: Failed
[03/07/2023 10:55:12] - Job ID: 7 State: Failed
[03/07/2023 10:55:12] - Job ID: 9 State: Failed
[03/07/2023 10:55:12] - Job ID: 11 State: Failed
5
timmcmic commented 1 year ago

Current builds test for powershell version and fail if it is not 5.

Tim

============================== Timothy J. McMichael Senior Support Escalation Engineer @.**@.> (980)-776-7465

Hours: Sunday – Wednesday 08:00 – 16:00 eastern time zone.

Manager: Tom Roughley @.**@.>)

Premier Support - (800)-936-3100 Broad Commercial Support - (800)-936-4900

==============================


From: TSide @.> Sent: Wednesday, July 5, 2023 5:24 AM To: timmcmic/DLConversionV2 @.> Cc: Subscribed @.***> Subject: Re: [timmcmic/DLConversionV2] Import-Module: The specified module 'c:\repository\dlconversionv2\dlconversionv2.psd1' was not loaded because no valid module file was found in any module directory. (Issue #138)

This particular issue seems to be resolved when using Powershell 5

— Reply to this email directly, view it on GitHubhttps://github.com/timmcmic/DLConversionV2/issues/138#issuecomment-1621370094, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKGTN6LHFCGHRKXXMSK4TKLXOUXE7ANCNFSM6AAAAAAZ4HQMRI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

TSideScripting commented 1 year ago

Hi, I tested the module again in a new environment with only the necessary modules installed, running it in Windows Powershell (5.1) in Administrator mode, and unfortunately the issue above is still persisting.

image

This does not happen when using Test-PreMigration and Start-DistributionListMigration, which works fine from testing.

timmcmic commented 1 year ago

There’s a debug import line I neglected to convert properly before publishing. Let me fix it today.

============================== Timothy J. McMichael Senior Support Escalation Engineer @.**@.> (980)-776-7465

Hours: Sunday – Wednesday 08:00 – 16:00 eastern time zone.

Manager: Tom Roughley @.**@.>)

Premier Support - (800)-936-3100 Broad Commercial Support - (800)-936-4900

==============================


From: TSide @.> Sent: Friday, July 7, 2023 9:55 AM To: timmcmic/DLConversionV2 @.> Cc: Tim McMichael @.>; Comment @.> Subject: Re: [timmcmic/DLConversionV2] Import-Module: The specified module 'c:\repository\dlconversionv2\dlconversionv2.psd1' was not loaded because no valid module file was found in any module directory. (Issue #138)

Hi, I tested the module again in a new environment with only the necessary modules installed, running it in Windows Powershell (5.1) in Administrator mode, and unfortunately the issue above is still persisting. [image]https://user-images.githubusercontent.com/28244401/251753642-072b09b9-c3be-4c27-b04e-631a821248b3.png This does not happen when using Test-PreMigration, Start-DistributionListMigration and Start-MultipleDistributionListMigration, which works fine from testing.

— Reply to this email directly, view it on GitHubhttps://github.com/timmcmic/DLConversionV2/issues/138#issuecomment-1625454471, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKGTN6N7FEH4WENMV4HJHQDXPAINJANCNFSM6AAAAAAZ4HQMRI. You are receiving this because you commented.Message ID: @.***>

TSideScripting commented 1 year ago

Thank you

timmcmic commented 1 year ago

Fixed 2.9.8.13

============================== Timothy J. McMichael Senior Support Escalation Engineer @.**@.> (980)-776-7465

Hours: Sunday - Wednesday 08:00 - 16:00 eastern time zone.

Manager: Tom Roughley @.**@.>)

Premier Support - (800)-936-3100 Broad Commercial Support - (800)-936-4900

==============================

From: TSide @.> Sent: Friday, July 7, 2023 9:56 AM To: timmcmic/DLConversionV2 @.> Cc: Tim McMichael @.>; Comment @.> Subject: Re: [timmcmic/DLConversionV2] Import-Module: The specified module 'c:\repository\dlconversionv2\dlconversionv2.psd1' was not loaded because no valid module file was found in any module directory. (Issue #138)

Reopened #138https://github.com/timmcmic/DLConversionV2/issues/138.

- Reply to this email directly, view it on GitHubhttps://github.com/timmcmic/DLConversionV2/issues/138#event-9755495016, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKGTN6N7FEH4WENMV4HJHQDXPAINJANCNFSM6AAAAAAZ4HQMRI. You are receiving this because you commented.Message ID: @.**@.>>