我想在Powershell中使用COM對象創建一個清晰的視圖。CAL mkview命令失敗
$ccViews="\\Hostname.global.mycompany.com\cc-view\"
$ViewName="CodeCountView"
$ViewFullpath="$ccViews$ViewName"+".vws"
$ct = new-object -com ClearCase.ClearTool
try {
$ct.CmdExec('lsview $ViewName')
}
catch {
$ct.CmdExec('mkview -tag $ViewName -nsh $ViewFullpath')
}
它拋出以下異常。
> Exception calling "CmdExec" with "1" argument(s): "storage directory
> must be in UNC style (e.g. \\host\share\...) " At
> E:\Powershellscripts\CCountAutomation.ps1:81 char:19
> + $ct.CmdExec <<<< ('mkview -tag $ViewName -nsh $ViewFullpath')
> + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
> + FullyQualifiedErrorId : ComMethodTargetInvocation
有人可以幫我解決這個問題嗎?