![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | PowerShell Project? Hello, all. At work, we have many duplicate BAT files that essentially copy files, move files, rename files, and FTP files to various locations both locally on the same machine and to other remote machines. The current environment consists mainly of BAT files and COBOL .EXE programs. The COBOL programs basically read the contents of files and extracts the totals and whatnot from it and then creates other "database" type files to store the information. There are a few static HTML pages that are also updated. This entire process basically runs in a loop 24x7. My issue with the process is that is crap. There is virtually no error-checking. If a copy failes, no one knows about it until the client doesn't get their files. If an FTP fails, no one knows about it until client doesn't get their files. If there is a script change, we typically have to update/modify hundreds of similar BAT files (to keep them consistent) and have no good way to test. There is also no recovery points within the script. If a task fails, someone typically has to manually copy files or figure out where the script was at time of failure. This entier process is very hard to maintain, isn't very administratively friendly, and is very antiquated. This is basically what happens when you have mainframe programmers write server-side scripts and automation. Here comes my question: I would like to re-do this entire system in PowerShell. I would like to have parameter files or XML files that I can store client settings, options and easily retrieve them. I would also like to have one common script, or a few scripts that perform a particular task that is called by a main script. I need error-checking for file copies, FTPs, etc. I would also like to leverage ASP.NET and perhaps either create an XML file that I can use ASP.NET 2.0 Data Binding of XML to display the customer information for our operators when verifying totals and file delivery. Has anyone else done anything this ambitious with PowerShell before? I know Microsoft has a lot of cool technologies out there and to me WorkFlow Foundation sounds like a good candidate for the scripts, but I do not see how I can easily add it to a PowerShell script or if it would be easy to update. Before starting my PowerShell project, I was wondering if I should have cmdlets or functions for various routines to copy and FTP files. I figure I will eventually have to try and rewrite the 4 or 5 COBOL programs to .NET C# to avoid some of the limitations and licensing restrictions with using MicroFocus COBOL, plus to totally get away from the mainframe world. My last question related to this is: Does anyone know of any rent-a-coder or someone that I can temporarily or permanently hire to do this sort of project? I know it will take me a while and I'd rather find someone that has the skills to do it rather than me having to learn as I go. Thanks! |
My System Specs![]() |
| | #2 (permalink) |
| | RE: PowerShell Project? Where are you based? -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "dm3281" wrote: Quote: > Hello, all. > > At work, we have many duplicate BAT files that essentially copy files, move > files, rename files, and FTP files to various locations both locally on the > same machine and to other remote machines. The current environment consists > mainly of BAT files and COBOL .EXE programs. The COBOL programs basically > read the contents of files and extracts the totals and whatnot from it and > then creates other "database" type files to store the information. There > are a few static HTML pages that are also updated. > > This entire process basically runs in a loop 24x7. > > My issue with the process is that is crap. There is virtually no > error-checking. If a copy failes, no one knows about it until the client > doesn't get their files. If an FTP fails, no one knows about it until > client doesn't get their files. If there is a script change, we typically > have to update/modify hundreds of similar BAT files (to keep them > consistent) and have no good way to test. There is also no recovery points > within the script. If a task fails, someone typically has to manually copy > files or figure out where the script was at time of failure. > > This entier process is very hard to maintain, isn't very administratively > friendly, and is very antiquated. This is basically what happens when you > have mainframe programmers write server-side scripts and automation. > > Here comes my question: > > I would like to re-do this entire system in PowerShell. > > I would like to have parameter files or XML files that I can store client > settings, options and easily retrieve them. > > I would also like to have one common script, or a few scripts that perform a > particular task that is called by a main script. > > I need error-checking for file copies, FTPs, etc. > > I would also like to leverage ASP.NET and perhaps either create an XML file > that I can use ASP.NET 2.0 Data Binding of XML to display the customer > information for our operators when verifying totals and file delivery. > > Has anyone else done anything this ambitious with PowerShell before? > > I know Microsoft has a lot of cool technologies out there and to me WorkFlow > Foundation sounds like a good candidate for the scripts, but I do not see > how I can easily add it to a PowerShell script or if it would be easy to > update. > > Before starting my PowerShell project, I was wondering if I should have > cmdlets or functions for various routines to copy and FTP files. > > I figure I will eventually have to try and rewrite the 4 or 5 COBOL programs > to .NET C# to avoid some of the limitations and licensing restrictions with > using MicroFocus COBOL, plus to totally get away from the mainframe world. > > My last question related to this is: > > Does anyone know of any rent-a-coder or someone that I can temporarily or > permanently hire to do this sort of project? I know it will take me a while > and I'd rather find someone that has the skills to do it rather than me > having to learn as I go. > > Thanks! > > > > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: PowerShell Project? Hello dm3281, quite a long question, so you'll have to start bit - by - bit. powershell seems a good candidate for you development since it has excellent file reading and parsing mechanisms. the error handling in powershell is still not ideal, something you would need for production scripts that run 24x7. for instance there is nog try .... catch mechanism in the tread below this one 'how to automate ftp using powershell' you can find some answers about FTP related cmdlets that you could incorporate in your scripts. Greetz, Ben "dm3281" <dm3281@xxxxxx> wrote in message news:45FD10C6-93D8-40BA-B18C-AC4A7C8CE4D7@xxxxxx Quote: > Hello, all. > > At work, we have many duplicate BAT files that essentially copy files, > move files, rename files, and FTP files to various locations both locally > on the same machine and to other remote machines. The current environment > consists mainly of BAT files and COBOL .EXE programs. The COBOL programs > basically read the contents of files and extracts the totals and whatnot > from it and then creates other "database" type files to store the > information. There are a few static HTML pages that are also updated. > > This entire process basically runs in a loop 24x7. > > My issue with the process is that is crap. There is virtually no > error-checking. If a copy failes, no one knows about it until the client > doesn't get their files. If an FTP fails, no one knows about it until > client doesn't get their files. If there is a script change, we typically > have to update/modify hundreds of similar BAT files (to keep them > consistent) and have no good way to test. There is also no recovery > points within the script. If a task fails, someone typically has to > manually copy files or figure out where the script was at time of failure. > > This entier process is very hard to maintain, isn't very administratively > friendly, and is very antiquated. This is basically what happens when > you have mainframe programmers write server-side scripts and automation. > > Here comes my question: > > I would like to re-do this entire system in PowerShell. > > I would like to have parameter files or XML files that I can store client > settings, options and easily retrieve them. > > I would also like to have one common script, or a few scripts that perform > a particular task that is called by a main script. > > I need error-checking for file copies, FTPs, etc. > > I would also like to leverage ASP.NET and perhaps either create an XML > file that I can use ASP.NET 2.0 Data Binding of XML to display the > customer information for our operators when verifying totals and file > delivery. > > Has anyone else done anything this ambitious with PowerShell before? > > I know Microsoft has a lot of cool technologies out there and to me > WorkFlow Foundation sounds like a good candidate for the scripts, but I do > not see how I can easily add it to a PowerShell script or if it would be > easy to update. > > Before starting my PowerShell project, I was wondering if I should have > cmdlets or functions for various routines to copy and FTP files. > > I figure I will eventually have to try and rewrite the 4 or 5 COBOL > programs to .NET C# to avoid some of the limitations and licensing > restrictions with using MicroFocus COBOL, plus to totally get away from > the mainframe world. > > My last question related to this is: > > Does anyone know of any rent-a-coder or someone that I can temporarily or > permanently hire to do this sort of project? I know it will take me a > while and I'd rather find someone that has the skills to do it rather than > me having to learn as I go. > > Thanks! > > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: PowerShell Project? "Zanten, Ben van" <BZanten@xxxxxx> wrote in message news:A4FA6EC0-A7DF-4930-AAE5-90A10E5D4FD8@xxxxxx Quote: > > Hello dm3281, > quite a long question, so you'll have to start bit - by - bit. > powershell seems a good candidate for you development since it has > excellent file reading and parsing mechanisms. based and they have been working well. I have modularized these scripts so using one PowerShell script from another isn't a problem. Quote: > > the error handling in powershell is still not ideal, something you would > need for production scripts that run 24x7. for instance there is nog try > ... catch mechanism distinguishes between terminating and non-terminating errors. All-in-all I would say error handling in PowerShell is very powerful. The missing error handling functionality is that there is no "finally" equivalent. Also the logging support in PowerShell is a bit weak. With a 24x7 script you will need to keep an eye on memory consumption. In fact every once in a while it might be worth executing [System.GC]::Collect(). -- Keith |
My System Specs![]() |
| | #5 (permalink) |
| | Re: PowerShell Project? Hi -- We have main office in Glastonbury, CT and a satellite office in Virginia Beach, VA. I'm not saying there is a position or anything -- I would have to get it approved and whatnot. But I'm just throwing it out there since it's a possibility. "RichS" <RichS@xxxxxx> wrote in message news:0862CDEA-302F-43F4-822F-41F8565F7156@xxxxxx Quote: > Where are you based? > -- > Richard Siddaway > Please note that all scripts are supplied "as is" and with no warranty > Blog: http://richardsiddaway.spaces.live.com/ > PowerShell User Group: http://www.get-psuguk.org.uk > > > "dm3281" wrote: > Quote: >> Hello, all. >> >> At work, we have many duplicate BAT files that essentially copy files, >> move >> files, rename files, and FTP files to various locations both locally on >> the >> same machine and to other remote machines. The current environment >> consists >> mainly of BAT files and COBOL .EXE programs. The COBOL programs >> basically >> read the contents of files and extracts the totals and whatnot from it >> and >> then creates other "database" type files to store the information. There >> are a few static HTML pages that are also updated. >> >> This entire process basically runs in a loop 24x7. >> >> My issue with the process is that is crap. There is virtually no >> error-checking. If a copy failes, no one knows about it until the client >> doesn't get their files. If an FTP fails, no one knows about it until >> client doesn't get their files. If there is a script change, we >> typically >> have to update/modify hundreds of similar BAT files (to keep them >> consistent) and have no good way to test. There is also no recovery >> points >> within the script. If a task fails, someone typically has to manually >> copy >> files or figure out where the script was at time of failure. >> >> This entier process is very hard to maintain, isn't very administratively >> friendly, and is very antiquated. This is basically what happens when >> you >> have mainframe programmers write server-side scripts and automation. >> >> Here comes my question: >> >> I would like to re-do this entire system in PowerShell. >> >> I would like to have parameter files or XML files that I can store client >> settings, options and easily retrieve them. >> >> I would also like to have one common script, or a few scripts that >> perform a >> particular task that is called by a main script. >> >> I need error-checking for file copies, FTPs, etc. >> >> I would also like to leverage ASP.NET and perhaps either create an XML >> file >> that I can use ASP.NET 2.0 Data Binding of XML to display the customer >> information for our operators when verifying totals and file delivery. >> >> Has anyone else done anything this ambitious with PowerShell before? >> >> I know Microsoft has a lot of cool technologies out there and to me >> WorkFlow >> Foundation sounds like a good candidate for the scripts, but I do not see >> how I can easily add it to a PowerShell script or if it would be easy to >> update. >> >> Before starting my PowerShell project, I was wondering if I should have >> cmdlets or functions for various routines to copy and FTP files. >> >> I figure I will eventually have to try and rewrite the 4 or 5 COBOL >> programs >> to .NET C# to avoid some of the limitations and licensing restrictions >> with >> using MicroFocus COBOL, plus to totally get away from the mainframe >> world. >> >> My last question related to this is: >> >> Does anyone know of any rent-a-coder or someone that I can temporarily or >> permanently hire to do this sort of project? I know it will take me a >> while >> and I'd rather find someone that has the skills to do it rather than me >> having to learn as I go. >> >> Thanks! >> >> >> >> |
My System Specs![]() |
| | #6 (permalink) |
| | Re: PowerShell Project? Thanks -- Yes, I want want error logging. There are just a serious of ECHO >> logfilename.log today in the script. Which is OK, but doesn't really catch everything. I know I can use Log4Net, but that, too, is a bit of a hassle and not a sure thing, but does have lots of output options... SMTP, file, database, etc. "Keith Hill [MVP]" <r_keith_hill@xxxxxx_spam_I> wrote in message news:F50C4426-702F-4DFE-B396-4977BB80F7D9@xxxxxx Quote: > "Zanten, Ben van" <BZanten@xxxxxx> wrote in message > news:A4FA6EC0-A7DF-4930-AAE5-90A10E5D4FD8@xxxxxx Quote: >> >> Hello dm3281, >> quite a long question, so you'll have to start bit - by - bit. >> powershell seems a good candidate for you development since it has >> excellent file reading and parsing mechanisms. > +1. All of our build and regression test harness scripts are PowerShell > based and they have been working well. I have modularized these scripts > so using one PowerShell script from another isn't a problem. > Quote: >> >> the error handling in powershell is still not ideal, something you would >> need for production scripts that run 24x7. for instance there is nog try >> ... catch mechanism > -1. trap is effectively a try/catch mechanism. PowerShell also > distinguishes between terminating and non-terminating errors. All-in-all > I would say error handling in PowerShell is very powerful. The missing > error handling functionality is that there is no "finally" equivalent. > Also the logging support in PowerShell is a bit weak. > > With a 24x7 script you will need to keep an eye on memory consumption. In > fact every once in a while it might be worth executing > [System.GC]::Collect(). > > -- > Keith |
My System Specs![]() |
| | #7 (permalink) |
| | Re: PowerShell Project? Hi, For what it's worth I recently set up a system, that sounds a little bit similar to what you seem to be describing, across a clients 24 Win2003 servers. 22 of those machine were churning out reports every 15 minutes and the customer was chasing those reports around their network using batch files and vbscript developed by ppl who didn't get what was really needed. Now I have a ps script run as a scheduled task 6 time a day on each machine to propel the data to machine 23 and 24 where additional ps scripts run 6 times a day to transform all the raw data into much more meaningful and pleasing summaries of whats been going on everywhere. These reports are archived as part of the script and the value that has been added by analysing the content line by line looking for customer meaningful patterns is amazing - directly contributing to major commercial decisions and were not talking pennies. I put this together on the hoof over a period of a couple of weeks developing on the fly and I'm a PS newbie really. Powershell makes it possible for ordinary people (like me) to do extraordinary things with Microsoft Windows. Good luck Stuart |
My System Specs![]() |
| | #8 (permalink) |
| | Re: PowerShell Project? Thanks for the reply. The more I think about it, I almost think I need to use WorkFlow Foundation, but that would probably mean having a console .EXE program or something spawning off tasks and junk. Not sure if that is way overkill and would make modifying the scripts in the future a bit more work. The other big think is options. Today, the BAT file has a bunch of parameter files, one per customer, which is another reason why each customer has its own .BAT... which makes maintenance and administration really tendious as more and more customers are cloned. I'm sure Powershell would be much better than what I have now--especially with the date parsing, file checking, error checking, and the full power of ..NET. I just want to be sure I'm on the right track first. It's either that or go back and use BAT along with VBscript and .EXE programs. "Keith Hill [MVP]" <r_keith_hill@xxxxxx_spam_I> wrote in message news:F50C4426-702F-4DFE-B396-4977BB80F7D9@xxxxxx Quote: > "Zanten, Ben van" <BZanten@xxxxxx> wrote in message > news:A4FA6EC0-A7DF-4930-AAE5-90A10E5D4FD8@xxxxxx Quote: >> >> Hello dm3281, >> quite a long question, so you'll have to start bit - by - bit. >> powershell seems a good candidate for you development since it has >> excellent file reading and parsing mechanisms. > +1. All of our build and regression test harness scripts are PowerShell > based and they have been working well. I have modularized these scripts > so using one PowerShell script from another isn't a problem. > Quote: >> >> the error handling in powershell is still not ideal, something you would >> need for production scripts that run 24x7. for instance there is nog try >> ... catch mechanism > -1. trap is effectively a try/catch mechanism. PowerShell also > distinguishes between terminating and non-terminating errors. All-in-all > I would say error handling in PowerShell is very powerful. The missing > error handling functionality is that there is no "finally" equivalent. > Also the logging support in PowerShell is a bit weak. > > With a 24x7 script you will need to keep an eye on memory consumption. In > fact every once in a while it might be worth executing > [System.GC]::Collect(). > > -- > Keith |
My System Specs![]() |
| | #9 (permalink) |
| | Re: PowerShell Project? Hi -- I couldn't find the FTP and Cmdlet post that you were referring to?? "Zanten, Ben van" <BZanten@xxxxxx> wrote in message news:A4FA6EC0-A7DF-4930-AAE5-90A10E5D4FD8@xxxxxx Quote: > > Hello dm3281, > quite a long question, so you'll have to start bit - by - bit. > powershell seems a good candidate for you development since it has > excellent file reading and parsing mechanisms. > > the error handling in powershell is still not ideal, something you would > need for production scripts that run 24x7. for instance there is nog try > ... catch mechanism > > in the tread below this one 'how to automate ftp using powershell' you can > find some answers about FTP related cmdlets that you could incorporate in > your scripts. > > Greetz, > Ben > > > "dm3281" <dm3281@xxxxxx> wrote in message > news:45FD10C6-93D8-40BA-B18C-AC4A7C8CE4D7@xxxxxx Quote: >> Hello, all. >> >> At work, we have many duplicate BAT files that essentially copy files, >> move files, rename files, and FTP files to various locations both locally >> on the same machine and to other remote machines. The current >> environment consists mainly of BAT files and COBOL .EXE programs. The >> COBOL programs basically read the contents of files and extracts the >> totals and whatnot from it and then creates other "database" type files >> to store the information. There are a few static HTML pages that are >> also updated. >> >> This entire process basically runs in a loop 24x7. >> >> My issue with the process is that is crap. There is virtually no >> error-checking. If a copy failes, no one knows about it until the client >> doesn't get their files. If an FTP fails, no one knows about it until >> client doesn't get their files. If there is a script change, we >> typically have to update/modify hundreds of similar BAT files (to keep >> them consistent) and have no good way to test. There is also no recovery >> points within the script. If a task fails, someone typically has to >> manually copy files or figure out where the script was at time of >> failure. >> >> This entier process is very hard to maintain, isn't very administratively >> friendly, and is very antiquated. This is basically what happens when >> you have mainframe programmers write server-side scripts and automation. >> >> Here comes my question: >> >> I would like to re-do this entire system in PowerShell. >> >> I would like to have parameter files or XML files that I can store client >> settings, options and easily retrieve them. >> >> I would also like to have one common script, or a few scripts that >> perform a particular task that is called by a main script. >> >> I need error-checking for file copies, FTPs, etc. >> >> I would also like to leverage ASP.NET and perhaps either create an XML >> file that I can use ASP.NET 2.0 Data Binding of XML to display the >> customer information for our operators when verifying totals and file >> delivery. >> >> Has anyone else done anything this ambitious with PowerShell before? >> >> I know Microsoft has a lot of cool technologies out there and to me >> WorkFlow Foundation sounds like a good candidate for the scripts, but I >> do not see how I can easily add it to a PowerShell script or if it would >> be easy to update. >> >> Before starting my PowerShell project, I was wondering if I should have >> cmdlets or functions for various routines to copy and FTP files. >> >> I figure I will eventually have to try and rewrite the 4 or 5 COBOL >> programs to .NET C# to avoid some of the limitations and licensing >> restrictions with using MicroFocus COBOL, plus to totally get away from >> the mainframe world. >> >> My last question related to this is: >> >> Does anyone know of any rent-a-coder or someone that I can temporarily or >> permanently hire to do this sort of project? I know it will take me a >> while and I'd rather find someone that has the skills to do it rather >> than me having to learn as I go. >> >> Thanks! >> >> >> >> |
My System Specs![]() |
| | #10 (permalink) |
| | Re: PowerShell Project? In my browser, it is 9 threads below this one, it is called 'how to automate ftp using powershell?' and I didn't want to repeat that information here, so I assume you can find that thread. Ben "dm3281" <dm3281@xxxxxx> wrote in message news:320A03B6-7AE5-410E-9219-C9AB1D7FE7D7@xxxxxx Quote: > Hi -- I couldn't find the FTP and Cmdlet post that you were referring to?? > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| PowerShell Visual Studio project template wiped out all other templates | PowerShell | |||
| In any project, Can't we refer classes directly, (without addingphysically in the project)? | .NET General | |||
| Building a project that uses PowerShell using MSBuild | PowerShell | |||
| Info: I am creating a "Powershell Information Blogging Central Project" | PowerShell | |||
| New community project created for Windows PowerShell Extensions | PowerShell | |||