Microsoft Virtualization Discussions

Highlighted

Latest PowerShell toolkit will not import the module

All I have downloaded and installed the latest PowerShell Toolkit 9.7.1. I am running PowerShell 7.0.3 and when I try to run the command Import-Module DataONTAP I get this (verbose mode):

import-module DataONTAP -verbose

VERBOSE: Loading module from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.psd1'.
VERBOSE: Loading 'Assembly' from path 'C:\program files\powershell\7\Modules\DataONTAP\OntapiPS.dll'.
VERBOSE: Loading 'Executable' from path 'C:\program files\powershell\7\Modules\DataONTAP\OntapiPS.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.HostUtilities.dll'.
VERBOSE: Loading 'Executable' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.HostUtilities.dll'.
VERBOSE: Loading 'TypesToProcess' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.Type.ps1xml'.
VERBOSE: Loading 'TypesToProcess' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.C.Type.ps1xml'.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.Format.ps1xml'.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.C.Format.ps1xml'.
VERBOSE: Loading module from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.dll'.
Import-Module: Could not load type 'System.Management.Automation.PSSnapIn' from assembly 'System.Management.Automation, Version=7.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

That last error is on DataONTAP.dll I asume. Has any one run across this? 

4 REPLIES 4
Highlighted

Re: Latest PowerShell toolkit will not import the module

I have been able to recreate this issue with PowerShell 7.0.3 and opened bug 1344144 on this issue.  Using PowerShell 5.1 I did not have the issue. 

View solution in original post

Highlighted

Re: Latest PowerShell toolkit will not import the module

I did not either. I believe it worked in 7.0.1 but don't quote me as it was a preview release and I ripped it out to use the actual "supported" version of Powershell 7.0.3

Highlighted

Re: Latest PowerShell toolkit will not import the module

This error presents itself in 7.0.2 as well.

Highlighted

Re: Latest PowerShell toolkit will not import the module

Is the bug public so I can follow the progress? I looked it up (1344144) and did not see it.

Check out the KB!
Knowledge Base
All Community Forums