Not able to return performance data becasue of |


I have wrote a powershell script that gets the size of a fileshare and returns back the info, when ran in powershell it works fine and populates both the return message and the perf data but when I run it from Nagios it returns the message but not the performance data as shown below

From Powershell ’Sharesize’=5,500GB ‘FreeSpace’=15,000GB ‘TotalSize’=21,500GB From Nagios ’Sharesize’=0GB ‘FreeSpace’=0GB ‘TotalSize’=0GB

no from my testing I have worked out that when I use the | its that which is clearing the data and providing the From Nagios output, if I put the performance data before the | it returns the results, so I have an issue with the | character doing something in my script

Can anyone suggest what I am doing wrong please