【问题标题】:Cloudberry powershell snapin no longer workingCloudberry powershell 管理单元不再工作
【发布时间】:2018-05-28 09:19:39
【问题描述】:

在最近的 Windows 10 更新后,我使用 cloudberry 管理单元的 powershell 脚本不再工作。我已经重新安装了cloudberry,但没有成功。

即使管理单元显示为已注册:

PS C:\> Get-PSsnapin -Registered


Name        : CloudBerryLab.Explorer.PSSnapIn
PSVersion   : 2.0
Description : CloudBerry Explorer snap-in for PowerShell

Powershell 无法识别命令:

PS C:\> $destination = Get-CloudFilesystemConnection | Select-CloudFolder 
"\\diskstation\drive1\backups\ow-data\"
Get-CloudFilesystemConnection : The term 'Get-CloudFilesystemConnection' is 
not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, 
or if a path was included, verify that the
path is correct and try again.
At line:1 char:16
+ $destination = Get-CloudFilesystemConnection | Select-CloudFolder "\\ ...
+                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Get- 
CloudFilesystemConnection:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

管理单元也被添加到当前会话中,但仍未显示:

PS C:\> Add-PSSnapin CloudBerryLab.Explorer.PSSnapIn
PS C:\> Get-PSsnapin

Name        : Microsoft.PowerShell.Core
PSVersion   : 5.1.17134.81
Description : This Windows PowerShell snap-in contains cmdlets used to 
manage components of Windows PowerShell.

【问题讨论】:

  • 当您使用Get-PSSnapin 而不使用-Registered 时是否显示?
  • 不,没有 -registered 就不会显示
  • 不,没有 -registered 就不会显示 这就是问题所在。它只是注册的,但你没有将它添加到当前会话中。
  • 正在运行的脚本在第一行执行 Add-PSSnapin。如果没有 -registered,它仍然不会显示在 Get-PSsnapin 中。如果我在同一个会话中再次调用 Add-PSSnapin,我会收到一个错误,表明它已被添加。
  • 在当前会话中添加管理单元时是否遇到任何错误?导入管理单元时是否尝试使用-Verbose 参数:Add-PSSnapin CloudBerryLab.Explorer.PSSnapIn -Verbose$Error自动变量有什么东西吗?

标签: powershell cloudberry


【解决方案1】:

最终对 Win10 进行了重新铺平(通过“重置”),并花了一天时间重新安装应用程序。重置后安装的第一个应用是 Cloudberry,插件运行良好。从几年前的 7 升级而来的操作系统确实有点老了。感谢您的帮助尝试。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多