深入浅出Powershell——拷贝GAC中dll文件

 场景:我们在客户的VM环境中进行SharePoint的开发工作,由于权限的限制(连IE的设置都无法修改),我们在很多情况除了以Administrator的身份执行应用程序(IE,VS2010,cmd窗口,集成SharePoint的PowerShell命令窗口等)外,我们可能需要拷贝GAC的dll文件,怎么办呢?

以下操作以从GAC中拷贝HR系统的Common.dll到D盘为例

PS C:\> cd .\Windows

PS C:\Windows> cd .\assembly

PS C:\Windows\assembly> cd .\GAC_MSIL

PS C:\Windows\assembly\GAC_MSIL> cd .\LJ.SharePoint.HR.Common

备注:按键盘上的下一个或上一个键可以顺序查看dll文件。

PS C:\Windows\assembly\GAC_MSIL\LJ.SharePoint.HR.Common> cd .\1.0.0.0__652eb99

08dcf33c9

PS C:\Windows\assembly\GAC_MSIL\LJ.SharePoint.HR.Common\1.0.0.0__652eb9908dcf3

3c9> dir 

    Directory: C:\Windows\assembly\GAC_MSIL\LJ.SharePoint.HR.Common\1.0.0.0__

    652eb9908dcf33c9 

Mode                LastWriteTime     Length Name

----                -------------     ------ ----

-a---        25/08/2011     10:01     140800 LJ.SharePoint.HR.Common.dll 

PS C:\Windows\assembly\GAC_MSIL\LJ.SharePoint.HR.Common\1.0.0.0__652eb9908dcf3

3c9> copy *.dll d:\

 

posted @ 2011-08-30 11:05  风影极光  阅读(261)  评论(0编辑  收藏  举报