I am trying to create a clearcase view using COM object in Powershell.
$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')
}
It throws following exception.
> 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
Can some one help me to solve this?