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

App-V Powershell Module Could Not Be Loaded #226

Closed
infecticide opened this issue Mar 10, 2020 · 3 comments
Closed

App-V Powershell Module Could Not Be Loaded #226

infecticide opened this issue Mar 10, 2020 · 3 comments

Comments

@infecticide
Copy link

Describe the bug
Upon running BIS-F 7.1912.2 an error appears when removing App-V packages:

  • Product Microsoft App-V Client (Version 10.0.14393.3471 (rs1_release_1.191218-1729)) installed
    > Removing App-V packages
    Import-Module : The specified module 'C:\Windows\System32\AppvClient\AppvClient.psd1' was not loaded because no valid
    module file was found in any module directory.
    At C:\Program Files (x86)\Base Image Script Framework (BIS-F)\framework\SubCall\Preparation\10_PrepBISF_AppVClient.ps1:70
    char:7
  •                     Import-Module $ModulePath;
    
  •                     ~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ResourceUnavailable: (C:\Windows\Syst...AppvClient.psd1:String) [Import-Module], FileNotFound
      Exception
    • FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

To Reproduce
Steps to reproduce the behavior:
Enable App-V app clean up in BIS

Expected behavior
Script to run without errors

Screenshots

Desktop (please complete the following information):

  • OS: Windows Server 2016

Additional context

10_PrepBISF_AppVClient.ps1 resolves the path to the AppVClient.psd1 currently, as:
C:\Windows\System32

The path is actually:
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\AppvClient

I changed line 42 to:
$Installpath = "C:\Windows\System32\WindowsPowerShell\v1.0\Modules"

and it seems to work now.

@matthias-schlimm matthias-schlimm self-assigned this Mar 11, 2020
@matthias-schlimm matthias-schlimm added this to To do in 7.1912.3 via automation Mar 11, 2020
@matthias-schlimm
Copy link
Collaborator

I think that will come with latest change from this issue #210.
I must check it further to get it work in all worlds

@matthias-schlimm
Copy link
Collaborator

matthias-schlimm commented May 23, 2020

the directory can be dynamicly be resolved with the following command
(Get-ChildItem -Path $Installpath -Recurse -Filter $ModuleFile -ErrorAction SilentlyContinue).Directory.FullName

image

@matthias-schlimm
Copy link
Collaborator

included in developer branch

7.1912.3 automation moved this from To do to Done May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
7.1912.3
  
Done
Development

No branches or pull requests

2 participants