本文介绍了Powershell示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我根据以下链接构建了powershell sdk示例。

I built powershell sdk sample based on the below link.

http://msdn.microsoft.com/en-us/library/ff396032(v = expression .30).aspx

但它不会在我的文档中创建任何文件夹。所以我手动将以下dll添加到C:\ Users \ myuser \Documents \ WindowsPowershell \ modules \expressionencoder

But it doesn't create any folder in my documents. So I manually added the following dlls to C:\Users\myuser\Documents\WindowsPowershell\modules\expressionencoder

ExpressionEncoder.dll,  Microsoft.Expression。 Encoder.dll,  Microsoft.Expression.Encoder.Types.dll和  Microsoft.Expression.Encoder.Utilities.dll

ExpressionEncoder.dll, Microsoft.Expression.Encoder.dll, Microsoft.Expression.Encoder.Types.dll and Microsoft.Expression.Encoder.Utilities.dll

然后在C:\\中添加了powershell_ise.exe.config  \\ Windows \ System32 \ WindowsPowerShell \v1.0(修复运行时问题)

Then added powershell_ise.exe.config in C:\Windows\System32\WindowsPowerShell\v1.0 (to fix runtime issue)

 

 

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

 <!-- http://msdn.microsoft.com/en-us/library/w4atty68.aspx -->

 <startup useLegacyV2RuntimeActivationPolicy="true">

  <supportedRuntime version="v4.0" />

  <supportedRuntime version="v2.0.50727" />

 </startup>

</configuration>

 

 

然后我打开了powershell  ISE,并执行了以下

Then I opened powershell  ISE and did the following

import-module expressionencoder(现在运行成功,出现错误)

import-module expressionencoder (run successfully with out error now)

sl $ home\desktop

sl $home\desktop

转换媒体 - 输入'D:\Doc \ Media \ test.wmv'。获取错误

Convert-Media -Input 'D:\Doc\Media\test.wmv'. Getting error as

转换媒体:无法加载文件或程序集'Microsoft.Expression.Encoder,Version = 4.0.0.0,Culture =中性,PublicKeyToken = 31bf385

Convert-Media : Could not load file or assembly 'Microsoft.Expression.Encoder, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf385

6ad364e35'或其中一个依赖项。系统找不到指定的文件。

6ad364e35' or one of its dependencies. The system cannot find the file specified.

在行:1字符:14

+转换媒体<<<<   - 输入'D:\Doc \ Media \ test.wmv'

+ Convert-Media <<<<  -Input 'D:\Doc\Media\test.wmv'

  &NBSP; + CategoryInfo  &NBSP; &NBSP; &NBSP;   ;: NotSpecified :( :) [Convert-Media],FileNotFoundException

    + CategoryInfo          : NotSpecified: (:) [Convert-Media], FileNotFoundException

  &NBSP; + FullyQualifiedErrorId:System.IO.FileNotFoundException,EncoderCmdlet.ConvertMedia

    + FullyQualifiedErrorId : System.IO.FileNotFoundException,EncoderCmdlet.ConvertMedia

 

告诉我如何解决这个问题。

Let me know how to fix this issue.

推荐答案


这篇关于Powershell示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 04:35