最近SCOM的主机升级OS到windows server 2012 r2 , 以前经过调用Powershell来使用webservice发送短信的脚本老是报错。web
PSMessageDetails : Exception : System.IO.FileNotFoundException: 未能加载文件或程序集“file:///C:\ Windows\TEMP\2alyptoa.dll”或它的某一个依赖项。系统找不到指定的文件。 文件名:“file:///C:\Windows\TEMP\2alyptoa.dll” 在 System.Reflection.RuntimeAssembly._nLoad(AssemblyN ame fileName, String codeBase, Evidence assemblySecurit y, RuntimeAssembly locationHint, StackCrawlMark& stackM ark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFoun d, Boolean forIntrospection, Boolean suppressSecurityCh ecks) 在 System.Reflection.RuntimeAssembly.InternalLoadAsse mblyName(AssemblyName assemblyRef, Evidence assemblySec urity, RuntimeAssembly reqAssembly, StackCrawlMark& sta ckMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotF ound, Boolean forIntrospection, Boolean suppressSecurit yChecks) 在 System.Reflection.Assembly.Load(AssemblyName assem blyRef, Evidence assemblySecurity) 在 System.CodeDom.Compiler.CompilerResults.get_Compil edAssembly() 在 Microsoft.PowerShell.Commands.NewWebServiceProxy.G enerateWebServiceProxyAssembly(String NameSpace, String ClassName) 在 Microsoft.PowerShell.Commands.NewWebServiceProxy.B eginProcessing() 在 System.Management.Automation.Cmdlet.DoBeginProcess ing() 在 System.Management.Automation.CommandProcessorBase. DoBegin() 警告: 程序集绑定日志记录被关闭。 要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!E nableLog] (DWORD)设置为 1。 注意: 会有一些与程序集绑定失败日志记录关联的性能损失。 要关闭此功能,请移除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLo g]。 TargetObject : CategoryInfo : NotSpecified: (:) [New-WebServiceProxy], FileNotFoundEx ception FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Co mmands.NewWebServiceProxy ErrorDetails : InvocationInfo : System.Management.Automation.InvocationInfo ScriptStackTrace : 在 send-smsMessage、C:\Scripts\SendSmsByAlertCustomSettin g.ps1 中: 第 98 行 在
shell
windows
ide
性能
测试
日志