How would one Create or Update Data References using OSIsoft.Powershell? Would it be an option under the Set-AFAttribute command or some other command?
It is currently not possible through the cmdlet directly. You would need to use AFSDK.
There is an existing enhancement request for this, but I would suggest posting the idea on User Voice
Ok, thank you
is there an update to this enhancement request? I'd like to do this via powershell as well.
There has not been any update on this. I would suggest submitting a enhancement request on our Feedback site. This helps product management prioritize features.
Also, this way, you will be automatically update on any status change.
Hi all, curious what you're trying to do that you couldn't do with UpdatePluginConfiguration tool?
I am adding an AF element based on a template using
Add-AFElement -AFElement $myParentElement -Name $myElement -AFElementTemplate (Get-AFElementTemplate -AFDatabase $MyAFDB -Name $MyTemplateName) -CheckIn
If I run this, the element gets created, but if the template contains tag creation rules, the tags are not automatically created. Instead I have to use the System Explorer, right click on the newly created element instance and select "Create or Update Data Reference" to actually create the tags in the PI data archive.
I don't know a tool called "UpdatePluginConfiguration tool", is there a link or a description for it?
You can find the info here:
https://livelibrary.osisoft.com/LiveLibrary/content/en/server-v13/GUID-21E93704-B8BB-42B1-A993-4B0F7C84A43CAs another alternative, the cmdlets are great for PowerShell users are they are user friendly; however, if you're an experienced programmer, you can load the AF SDK directly into PowerShell and use the properties andmethods of AF Objects directly. If you're curious about this, I can provide a simple example.
Retrieving data ...