June 3, 2013 at 1:17 pm #7214
I am looking for some guidance in which direction I should go for a project I am working on. We currently have approximately 20 scheduled tasks (windows 2003 server) running and scanning folders on various shares to send files outside to other companies and to download files. All of this utilizes winscp. We are looking to streamline all of the processes to 1 or 2 jobs. Our environment will not be on server 2012 for another a while. I was reading the Powershell In Depth 3.0 pdf – Workflows – and I think this would be the route to take? Until such time, what could I do to streamline all of the tasks to 1 or 2 jobs? Would something like Visual Studio, or .Net be viable now? Should I take a VS and .Net course and then incorprate powershell and winscp?
June 4, 2013 at 8:40 am #7235
I am open to all suggestions. I'm not sure what BBcodes are, but I can probably find it. Thank you.
June 4, 2013 at 8:44 am #7241
Bulletin Board Code for sending an receiving files? BBCodes are for posting messages. Im not sure how that can help my situation.
June 5, 2013 at 10:15 am #7247
I've written some scripts using the WinSCP API. It more C# than powershell, but it works great for what we need. Have you seen this link?
June 5, 2013 at 10:51 am #7252
Thanks David, I appreciate your reply. I did see the code, yes, Im sure it would work. But strange as this may seem, I am looking to learn more techniques as well, and improve myself along the way, I dont think copying code would help me in the long run.
June 6, 2013 at 2:55 am #7254
Without knowing more details it's impossible to say if workflows would be a good fit.
If you're just looking to consolidate a bunch of upload/download tasks and run them in parallel a workflow might be overkill.
Since you're using WinSCP for this, it might be simpler and easier on your system resources to just use Start-Process to launch instances of WinSCP with the necessary command line parameters for each upload or download, and monitor the processes from the main script. You'd probably want to use logging options to log the results to a file and check that after to process completes for error reporting.
June 10, 2013 at 7:57 am #7374
You are right on, good point.Â Â Making more use of the posh tools is a good habit to do..those "swiss army knives"........get-member, get-process, get-psdrive, get-help.Â I need to go back to the building blocks.
You must be logged in to reply to this topic.