PowerShell Integrated Console unable to import certain modules
See original GitHub issueIssue Description
I am experiencing a problem with powershell integrated console. When I’m trying to import module Centrify.DirectControl.PowerShell I receive an error, however when I open a new powershell terminal with ps5.1 or ps7 import works fine.
Attached Logs
=====> PowerShell Integrated Console v2020.6.0 <=====
PS C:\Users\user\Desktop> Import-Module Centrify.DirectControl.PowerShell
Import-Module : Could not load file or assembly 'util, Version=5.7.0.168, Culture=neutral, PublicKeyToken=1f9cb67793557b0b' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1
+ Import-Module Centrify.DirectControl.PowerShell
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
Follow the instructions in the README about capturing and sending logs.
PowerShell 7.0.3
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/powershell
Type 'help' to get help.
PS C:\Users\user\Desktop> Import-Module Centrify.DirectControl.PowerShell
PS C:\Users\user\Desktop>
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\user\Desktop> Import-Module Centrify.DirectControl.PowerShell
PS C:\Users\user\Desktop>
Environment Information
Visual Studio Code
Name | Version |
---|---|
Operating System | Windows_NT x64 10.0.18363 |
VSCode | 1.49.2 |
PowerShell Extension Version | 2020.6.0 |
PowerShell Information
Name | Value |
---|---|
PSVersion | 5.1.18362.752 |
PSEdition | Desktop |
PSCompatibleVersions | 1.0 2.0 3.0 4.0 5.0 5.1.18362.752 |
BuildVersion | 10.0.18362.752 |
CLRVersion | 4.0.30319.42000 |
WSManStackVersion | 3.0 |
PSRemotingProtocolVersion | 2.3 |
SerializationVersion | 1.1.0.1 |
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
Extension | Author | Version |
---|---|---|
csv-editor | estivo | 0.2.2 |
powershell | ms-vscode | 2020.6.0 |
saltstack | korekontrol | 0.0.8 |
shell-format | foxundermoon | 7.0.1 |
shell-launcher | Tyriar | 0.4.1 |
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
The specified module 'Module Name' was not loaded because ...
This error is because the PowerShell console or ISE is unable to get the module from given module path's in the environment variable...
Read more >Can't import PowerShell module that depends on NuGet library
I have a C# PowerShell module coded for .NET 6.0. It depends on a C# library that started life in the same solution....
Read more >'using module' error in VScode : r/PowerShell - Reddit
I can Import the module just fine with no errors in a default and separate powershell 5.1 console window, and run Cmdlets with...
Read more >Integrated Terminal doesn't load my Powershell profile
import -module : The specified module 'posh-git' was not loaded because no valid module file was found in any module directory. At line:1...
Read more >PowerShell Module won't import from $profile - Stack Overflow
Is there anything before that in your profile script that may be failing? Try moving the Import-Module PSReadline to the very top of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s a GIF of changing which PowerShell the Integrated Console uses
No worries, getting the right PowerShell is actually complicated, and given that we share a UI with the rest of VSCode and the extensions, it can be tricky to navigate it all.
It seems we could improve documentation here I think.