1
我的脚本使用Powershell splitpipeline模块来实现并行进程和队列功能。如何从共享服务器导入splitpipeline模块?
脚本和模块存储在共享服务器上,如\ server \ c $,这个想法可以从任何计算机上运行它。
试图把在脚本import-module \\server\c$\SplitPipeline
的begining,但我收到的错误:
import-module : Could not load file or assembly 'file://\\server\c$\SplitPipeline\SplitPipeline.dll' or one of its dependencies.
Operation is not supported. (Exception from HRESULT: 0x80131515)
At D:\scripts\powershell\OstReport_BETA-PIPE.ps1:6 char:1
+ import-module \\server\c$\SplitPipeline
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException
+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
如果我尝试将其从SRV与复制到PC:
Copy-Item -Path \\server\c$\SplitPipeline -Destination C:\windows\system32\WindowsPowerShell\v1.0\Modules -recurse -force
我得到一个访问被拒绝
任何想法?
感谢
感谢,没有尝试过,因为如果你去env变量低谷系统,为psmodulepath只是出现system32路径 – pedaleo