最近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
性能
測試
日誌