Thanks for that. Below is the error:
Import-Module : Exception calling "LoadFile" with "1" argument(s):
"Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))"At
C:\vsm.ps1:22 char:9
+ Import-Module VMware.VimAutomation.Core -ea stop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], MethodInvocat
ionException
+ FullyQualifiedErrorId : COMException,Microsoft.PowerShell.Commands.Impor
tModuleCommand
ErrorRecord : Exception calling "LoadFile" with "1"
argument(s): "Catastrophic failure (Exception
from HRESULT: 0x8000FFFF (E_UNEXPECTED))"
StackTrace : at System.Management.Automation.ExceptionHandl
ingOps.ConvertToMethodInvocationException(Excepti
on exception, Type typeToThrow, String
methodName, Int32 numArgs, MemberInfo memberInfo)
at CallSite.Target(Closure , CallSite ,
RuntimeType , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExe
cute2[T0,T1,TRet](CallSite site, T0 arg0, T1
arg1)
at System.Management.Automation.Interpreter.Dy
namicInstruction`3.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.En
terTryCatchFinallyInstruction.Run(InterpretedFram
e frame)
WasThrownFromThrowStatement : False
Message : Exception calling "LoadFile" with "1"
argument(s): "Catastrophic failure (Exception
from HRESULT: 0x8000FFFF (E_UNEXPECTED))"
Data : {System.Management.Automation.Interpreter.Interpr
etedFrameInfo}
InnerException : System.Runtime.InteropServices.COMException
(0x8000FFFF): Catastrophic failure (Exception
from HRESULT: 0x8000FFFF (E_UNEXPECTED))
at System.Reflection.RuntimeAssembly.nLoadFile
(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String
path)
at CallSite.Target(Closure , CallSite ,
RuntimeType , Object )
TargetSite : Void ConvertToMethodInvocationException(System.Ex
ception, System.Type, System.String, Int32,
System.Reflection.MemberInfo)
HelpLink :
Source : System.Management.Automation
HResult : -2146233087