wpurrer

PowerShell & Getpoints & Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))

Discussion created by wpurrer on Feb 16, 2012
Latest reply on Feb 16, 2012 by mhamel

[reflection.assembly]::loadwithpartialname("OSIsoft.PISDK") | out-null

 

$pisdk = new-object PISDK.PISDKClass;

 

$server = $pisdk.Servers.DefaultServer

 

$pointlist = $server.GetPoints("Tag='I*'")

 

I get the following error message:

 

 

 

PS C:\Windows\system32> F:\PI_Archive\RemovePTCreated.ps1
Exception calling "GetPoints" with "1" argument(s): "Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))"
At F:\PI_Archive\RemovePTCreated.ps1:5 char:31
+ $pointlist = $server.GetPoints <<<< ("Tag='I*'")
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation

 

Why it doesn't work ?

 

 

Outcomes