How can i used powershell to get PI data from the PI Server?
Anyone have an idea???
PowerShell Tools for the PI System 2016 can be used to access both AF Server and PI Data Archive, while the 2015 version could not access the AF Server. (Technically, AF cmdlets were added in the 2015 R2 release). The PI Data Archive cmdlets didn't change a ton between 2015 and 2016, so generally PowerShell scripts that worked with 2015 should still work with 2016.
In addition to Daphne's post, we have an overview of all of the cmdlets here. That should get you started with using PowerShell to access PI System information.
There's a great article written by Daphne regarding to PowerShell Tools : Getting started with the new PowerShell Tools for the PI System
I hope this has the information you need
Hi Joon Hyung,
I saw the post before. But most of the command that i run not applicable for PI Server 2016.
Is there any different of using Powershell on PI Server 2015 and 2016?
Are you running powershell on the PI Data Archive machine? If you're running it on a client machine other than the Data Archive, you'll need PI System Management Tools (SMT) installed in order to use the Powershell tools.
Just to check, can you verify which version of Powershell you're running? Please run $PSVersiontable.PSVersion in powershell. The number in the Major Column would be the version.
Also can you verify if OSIsoft.Powershell module is imported?
Get-Command -Module OSIsoft.Powershell
A screenshot would also help identifying the problem
Retrieving data ...