TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nepethya Rana
NA
335
152.8k
how do i create cmdlets that invokes a function
May 1 2016 5:57 PM
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"));
}
ExportBill.exe
-fileName GenerateFileName() -
customerType
"WholeSeller -@Id query_parameters
How do i do it in Powershell?
Reply
Answers (
1
)
Inserting current time displayed by label into database
Differences between objects with and without instance variab