I've noticed a strange occurence when calling a WCF service method from a Powershell script. I've implemented a basic service with one method as shown below:
public int receive_data(string machine_name, string ad_site, string user_name,string version)
{ //do some stuff in here }
This method takes 4 parameters as shown.
However, when creating an object of this service in powershell and doing a |GM to display it I see the following:
receive_data Method void receive_data(string machine_name, string ad_site, string user_name, string version, [ref] int receive_dataResult, [ref] bool receive_d...
This shows that 2 other [Ref] parameters are needed. The powershell will not submit without these two extra parameters.
My question is what are the parameters? Why are they needed and dont appear against the Service?