Click here to Skip to main content
15,888,044 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have zero knowledge of widows powershell. I have situation where i need to create parameter and function(a wrapper). Function when invoked return string and set the value to one of the parameter. I don't even know where do i write powershell script and i think there is ISE where i can write but how to build them get the bat file?

My situation is something like this.

Command is ExportBill.exe which takes three arguements : filename, customerType and Id
C#
function GenerateFileName(string fName)
{
    return String.Format("{0}{1}",fName.ToUpper().Substring(0, 3),DateTime.Now.ToString("yyyyMMddHHmmss"));
}

ExportBill.exe -fileName GenerateFileName() -customerType "WholeSeller -@Id query_parameters

How do i do it in Powershell?

What I have tried:

I have never write a script in powershell. I have no idea.
Posted
Updated 1-May-16 21:24pm
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900