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
function GenerateFileName(string fName)
{
return String.Format("{0}{1}",fName.ToUpper().Substring(0, 3),DateTime.Now.ToString("yyyyMMddHHmmss"));
}
{
return String.Format("{0}{1}"
}
ExportBill.exe -fileName GenerateFileName() -customerType "WholeSeller -@Id query_parameters
How do i do it in Powershell?
Bhuvanesh MohankumarPosted May 3, 2016, 4:16 AM
Please refer thislink,
https://technet.microsoft.com/en-us/magazine/ff677563.aspx